Skip to content

Commit 5c69849

Browse files
Merge dev to main (#408)
Co-authored-by: Lokesh Goel <113521973+lokesh-couchbase@users.noreply.github.com> Co-authored-by: Lokesh Goel <lokesh.goel@couchbase.com>
1 parent 1966866 commit 5c69849

149 files changed

Lines changed: 15687 additions & 3466 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
echo "PATH=${WORKING_DIRECTORY}/cmake-3.27.9-linux-x86_64/bin:$PATH" >> $GITHUB_ENV
7979
- name: general
8080
run: npm i && npm run rebuild
81-
- run: npx vsce package --target ${{ env.target }}
81+
- run: npx vsce package --target ${{ env.target }} --pre-release
8282
- uses: actions/upload-artifact@v4
8383
with:
8484
name: ${{ env.target }}

.github/workflows/test.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,28 @@ jobs:
1414
- name: Setup Node
1515
uses: actions/setup-node@v3
1616
with:
17-
node-version: 16.x
17+
node-version: 20
18+
- run: echo '${{ secrets.CONFIG_JSON }}' > ${{ github.workspace }}/src/config.json
19+
- uses: ilammy/setup-nasm@v1
20+
- name: windows-specific
21+
shell: pwsh
22+
if: runner.os == 'Windows'
23+
run: choco install openssl.light --version=1.1.1 && choco install cmake --global && npm install --global cmake-js node-gyp && echo CMAKE_JS_LIB - $CMAKE_JS_LIB
24+
- name: linux-specific
25+
shell: bash
26+
if: runner.os == 'Linux'
27+
run: |
28+
ldd --version
29+
rm -rf /usr/local/bin/cmake
30+
wget https://cmake.org/files/v3.27/cmake-3.27.9-linux-x86_64.tar.gz
31+
tar xf cmake-3.27.9-linux-x86_64.tar.gz
32+
WORKING_DIRECTORY=$(pwd)
33+
echo "${WORKING_DIRECTORY}/cmake-3.27.9-linux-x86_64/bin" >> $GITHUB_PATH
34+
echo "PATH=${WORKING_DIRECTORY}/cmake-3.27.9-linux-x86_64/bin:$PATH" >> $GITHUB_ENV
1835
- name: Install Dependencies
1936
run: npm install
37+
- name: Run Rebuild
38+
run: npm run rebuild
2039
- name: Run Tests
2140
if: runner.os == 'Linux'
2241
run: xvfb-run -a npm test

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# Change Log
22

3+
## [v2.1.0]
4+
- Add FTS workbench support inside extension
5+
- Add FTS workbench json validation
6+
- Add FTS workbench json auto complete feature
7+
- Add FTS workbench documentation
8+
9+
## [v2.0.5]
10+
- Add UI support for DynamoDB To Couchbase Data Migration
11+
12+
## [v2.0.4]
13+
- Add support for N1QL (.n1ql) files in query workbench
14+
15+
## [v2.0.3]
16+
- KV Range based document filter
17+
- Named Parameters Support
18+
- Basic Autocomplete Support
19+
20+
## [v2.0.1]
21+
- Update Filter Documents and Capella iQ Bug Fixes
22+
323
## [v2.0.0]
424
- Bump Node.js version to 20
525
- Add MongoDB to Couchbase data Migration tool

__mocks__/vscode.js

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
// __mocks__/vscode.js
2+
3+
const vscode = {
4+
languages: {
5+
createDiagnosticCollection: jest.fn().mockImplementation(() => {
6+
const diagnosticsMap = new Map();
7+
return {
8+
clear: jest.fn(() => diagnosticsMap.clear()),
9+
dispose: jest.fn(),
10+
get: jest.fn((uri) => diagnosticsMap.get(uri.toString())),
11+
set: jest.fn((uri, diagnostics) =>
12+
diagnosticsMap.set(uri.toString(), diagnostics),
13+
),
14+
delete: jest.fn((uri) => diagnosticsMap.delete(uri.toString())),
15+
forEach: jest.fn((callback) =>
16+
diagnosticsMap.forEach(callback),
17+
),
18+
};
19+
}),
20+
},
21+
Uri: {
22+
parse: jest.fn().mockImplementation((str) => ({
23+
toString: () => str,
24+
})),
25+
},
26+
workspace: {
27+
openTextDocument: jest.fn().mockImplementation((uri) => ({
28+
getText: jest.fn(() => ""),
29+
uri: uri,
30+
positionAt: jest.fn().mockImplementation((index) => {
31+
return new vscode.Position(
32+
Math.floor(index / 100),
33+
index % 100,
34+
);
35+
}),
36+
})),
37+
fs: {
38+
writeFile: jest.fn(),
39+
},
40+
},
41+
Range: jest.fn().mockImplementation((start, end) => ({
42+
start: start,
43+
end: end,
44+
})),
45+
Position: jest.fn().mockImplementation((line, character) => ({
46+
line: line,
47+
character: character,
48+
})),
49+
Diagnostic: jest.fn().mockImplementation((range, message, severity) => ({
50+
range: range,
51+
message: message,
52+
severity: severity,
53+
})),
54+
DiagnosticSeverity: {
55+
Error: 0,
56+
Warning: 1,
57+
Information: 2,
58+
Hint: 3,
59+
},
60+
};
61+
62+
module.exports = vscode;

docs/search/analyzer.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Use the **analyzer** property to modify the behavior of a match query or a match phrase query.
2+
3+
Set the **analyzer** property to the name of the analyzer you want to use on the contents of the match property or match_phrase property.
4+
5+
The specified analyzer only applies to the content of your Search request. It does not apply to the contents of documents in the Search index. However, the analyzer set on your Search request and in your Search index should match.
6+
7+
[Additional Query Object Documentation](https://docs.couchbase.com/server/current/search/search-request-params.html#additional-query-properties)

docs/search/bool.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Use the **bool** property to query a field that contains a boolean value.
2+
3+
Use the field property and set the **bool** property to true or false to run a search.
4+
5+
The Search Service does not use any analyzers on the contents of your query.
6+
7+
[Non-Analytics Query Documentation]("https://docs.couchbase.com/server/current/search/search-request-params.html#non-analytic-queries")

docs/search/boost.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
If you use multiple clauses in a query, you can use the **boost** property to assign the relative importance to a clause.
2+
3+
Clauses with a higher value in the **boost** property score higher and appear earlier in search results.
4+
5+
[Additional Query Object Documentation](https://docs.couchbase.com/server/current/search/search-request-params.html#additional-query-properties)

docs/search/bottom_right.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Set the geo location value to use as the bottom-right corner point of the rectangle search area.
2+
3+
If you use **bottom_right** as an object, you must set two values:
4+
5+
**lon**: The longitude of the geo location to use as the bottom-right corner of the rectangle.
6+
7+
**lat**: The latitude of the geo location to use as the bottom-right corner of the rectangle.
8+
9+
If you use **bottom_right** as an array, your array must contain a longitude value followed by a latitude value. For example, [-2.235143, 53.482358], where -2.235143 is the longitude.
10+
11+
[Rectangle-Based Geopoint Query Documentation](https://docs.couchbase.com/server/current/search/search-request-params.html#geopoint-queries-rectangle)

docs/search/cidr.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Enter an IP address range or single IP address, in IPv4 or IPv6 CIDR notation.
2+
3+
The Search Service returns documents with IP addresses that fall inside the specified range or match the specified IP address.
4+
5+
[IP Address Range Query Documentation](https://docs.couchbase.com/server/current/search/search-request-params.html#ip-address-range-queries)

docs/search/collections.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Contains an array of strings that specify the collections where you want to run the query.
2+
3+
[Search Request Json Documentation](https://docs.couchbase.com/server/current/search/search-request-params.html)

0 commit comments

Comments
 (0)