Skip to content

Commit 1f9a718

Browse files
Merge branch 'main' into check-error
2 parents 476f79f + c70be34 commit 1f9a718

File tree

278 files changed

+14248
-6372
lines changed

Some content is hidden

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

278 files changed

+14248
-6372
lines changed

common/config/rush/pnpm-lock.yaml

Lines changed: 2534 additions & 1523 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

workspaces/api-designer/api-designer-extension/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
},
114114
"dependencies": {
115115
"copyfiles": "^2.4.1",
116-
"@vscode/vsce": "~2.21.0",
116+
"@vscode/vsce": "^3.7.0",
117117
"vscode-messenger": "^0.4.5",
118118
"vscode-messenger-common": "^0.4.5",
119119
"@wso2/api-designer-core": "workspace:*",
@@ -136,6 +136,6 @@
136136
"cors-anywhere": "^0.4.4",
137137
"@apidevtools/json-schema-ref-parser": "11.6.1",
138138
"adm-zip": "~0.5.14",
139-
"js-yaml": "~4.1.0"
139+
"js-yaml": "~4.1.1"
140140
}
141141
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
lib/
2+
storybook-static/
3+
.storybook/fonts/

workspaces/api-designer/api-designer-visualizer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"@wso2/font-wso2-vscode": "workspace:*",
2727
"react-dom": "18.2.0",
2828
"react-markdown": "~9.0.1",
29-
"js-yaml": "~4.1.0",
29+
"js-yaml": "~4.1.1",
3030
"process": "~0.11.10",
3131
"path": "~0.12.7",
3232
"@hookform/resolvers": "~3.3.4",

workspaces/apk/apk-extension/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@
6565
"@typescript-eslint/parser": "~5.48.2",
6666
"@vscode/test-electron": "^2.3.2",
6767
"eslint": "^8.32.0",
68-
"glob": "^8.1.0",
68+
"glob": "^11.1.0",
6969
"mocha": "^10.2.0",
7070
"typescript": "5.8.3",
71-
"vsce": "^2.15.0",
72-
"copyfiles": "^2.4.1"
71+
"copyfiles": "^2.4.1",
72+
"@vscode/vsce": "^3.7.0"
7373
}
7474
}
7575

workspaces/apk/apk-extension/src/test/suite/index.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
import * as path from 'path';
2020
import * as Mocha from 'mocha';
21-
import * as glob from 'glob';
21+
import { glob } from 'glob';
2222

2323
export function run(): Promise<void> {
2424
// Create the mocha test
@@ -29,11 +29,9 @@ export function run(): Promise<void> {
2929

3030
const testsRoot = path.resolve(__dirname, '..');
3131

32-
return new Promise((c, e) => {
33-
glob('**/**.test.js', { cwd: testsRoot }, (err, files) => {
34-
if (err) {
35-
return e(err);
36-
}
32+
return new Promise(async (c, e) => {
33+
try {
34+
const files = await glob('**/**.test.js', { cwd: testsRoot });
3735

3836
// Add files to the test suite
3937
files.forEach(f => mocha.addFile(path.resolve(testsRoot, f)));
@@ -51,6 +49,8 @@ export function run(): Promise<void> {
5149
console.error(err);
5250
e(err);
5351
}
54-
});
52+
} catch (err) {
53+
e(err);
54+
}
5555
});
5656
}

workspaces/ballerina/ballerina-core/src/interfaces/bi.ts

Lines changed: 42 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -256,21 +256,49 @@ export enum FUNCTION_TYPE {
256256
ALL = "all",
257257
}
258258

259-
export interface ProjectStructureResponse {
259+
/**
260+
* Represents the directory structure of artifacts in a project.
261+
*/
262+
export type ProjectDirectoryMap = {
263+
[DIRECTORY_MAP.SERVICE]: ProjectStructureArtifactResponse[];
264+
[DIRECTORY_MAP.AUTOMATION]: ProjectStructureArtifactResponse[];
265+
[DIRECTORY_MAP.LISTENER]: ProjectStructureArtifactResponse[];
266+
[DIRECTORY_MAP.FUNCTION]: ProjectStructureArtifactResponse[];
267+
[DIRECTORY_MAP.CONNECTION]: ProjectStructureArtifactResponse[];
268+
[DIRECTORY_MAP.TYPE]: ProjectStructureArtifactResponse[];
269+
[DIRECTORY_MAP.CONFIGURABLE]: ProjectStructureArtifactResponse[];
270+
[DIRECTORY_MAP.DATA_MAPPER]: ProjectStructureArtifactResponse[];
271+
[DIRECTORY_MAP.NP_FUNCTION]: ProjectStructureArtifactResponse[];
272+
[DIRECTORY_MAP.AGENTS]: ProjectStructureArtifactResponse[];
273+
[DIRECTORY_MAP.LOCAL_CONNECTORS]: ProjectStructureArtifactResponse[];
274+
};
275+
276+
/**
277+
* Represents a single project's structure with its artifacts organized by directory type.
278+
*/
279+
export interface ProjectStructure {
260280
projectName: string;
261-
directoryMap: {
262-
[DIRECTORY_MAP.SERVICE]: ProjectStructureArtifactResponse[];
263-
[DIRECTORY_MAP.AUTOMATION]: ProjectStructureArtifactResponse[];
264-
[DIRECTORY_MAP.LISTENER]: ProjectStructureArtifactResponse[];
265-
[DIRECTORY_MAP.FUNCTION]: ProjectStructureArtifactResponse[];
266-
[DIRECTORY_MAP.CONNECTION]: ProjectStructureArtifactResponse[];
267-
[DIRECTORY_MAP.TYPE]: ProjectStructureArtifactResponse[];
268-
[DIRECTORY_MAP.CONFIGURABLE]: ProjectStructureArtifactResponse[];
269-
[DIRECTORY_MAP.DATA_MAPPER]: ProjectStructureArtifactResponse[];
270-
[DIRECTORY_MAP.NP_FUNCTION]: ProjectStructureArtifactResponse[];
271-
[DIRECTORY_MAP.AGENTS]: ProjectStructureArtifactResponse[];
272-
[DIRECTORY_MAP.LOCAL_CONNECTORS]: ProjectStructureArtifactResponse[];
273-
};
281+
projectPath?: string;
282+
projectTitle?: string;
283+
directoryMap: ProjectDirectoryMap;
284+
}
285+
286+
/**
287+
* Unified response structure for both single projects and multi-project workspaces.
288+
*
289+
* For single project:
290+
* - workspaceName: undefined
291+
* - projects: array with single project
292+
*
293+
* For workspace with multiple projects:
294+
* - workspaceName: name of the workspace
295+
* - projects: array with multiple projects
296+
*/
297+
export interface ProjectStructureResponse {
298+
workspaceName?: string;
299+
workspaceTitle?: string;
300+
workspacePath?: string;
301+
projects: ProjectStructure[];
274302
}
275303

276304
export interface ProjectStructureArtifactResponse {

workspaces/ballerina/ballerina-core/src/interfaces/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ export const BI_COMMANDS = {
4646
VIEW_CONFIGURATION: 'BI.project-explorer.view-configuration',
4747
ADD_PROJECT: 'BI.project-explorer.add',
4848
SHOW_OVERVIEW: 'BI.project-explorer.overview',
49-
SWITCH_PROJECT: 'BI.project-explorer.switch-project',
5049
ADD_DATA_MAPPER: 'BI.project-explorer.add-data-mapper',
5150
BI_EDIT_TEST_FUNCTION: 'BI.test.edit.function',
5251
BI_ADD_TEST_FUNCTION: 'BI.test.add.function',
5352
BI_EDIT_TEST_FUNCTION_DEF: 'BI.test.edit.function.def',
5453
ADD_NATURAL_FUNCTION: 'BI.project-explorer.add-natural-function',
5554
TOGGLE_TRACE_LOGS: 'BI.toggle.trace.logs',
55+
ADD_INTEGRATION: 'BI.project-explorer.add-integration',
5656
};

workspaces/ballerina/ballerina-core/src/interfaces/data-mapper.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ export enum IntermediateClauseType {
5858
WHERE = "where",
5959
FROM = "from",
6060
ORDER_BY = "order by",
61-
LIMIT = "limit"
61+
LIMIT = "limit",
62+
JOIN = "join",
6263
}
6364

6465
export enum ResultClauseType {
@@ -93,7 +94,6 @@ export interface IOType {
9394
members?: IOType[];
9495
defaultValue?: unknown;
9596
optional?: boolean;
96-
focusedMemberId?: string;
9797
isFocused?: boolean;
9898
isRecursive?: boolean;
9999
isDeepNested?: boolean;
@@ -125,6 +125,7 @@ export interface ExpandedDMModel {
125125
query?: Query;
126126
mapping_fields?: Record<string, any>;
127127
triggerRefresh?: boolean;
128+
focusInputRootMap?: Record<string, string>;
128129
}
129130

130131
export interface DMModel {
@@ -138,6 +139,8 @@ export interface DMModel {
138139
focusInputs?: Record<string, IOTypeField>;
139140
mapping_fields?: Record<string, any>;
140141
triggerRefresh?: boolean;
142+
traversingRoot?: string;
143+
focusInputRootMap?: Record<string, string>;
141144
}
142145

143146
export interface ModelState {
@@ -205,6 +208,9 @@ export interface IntermediateClauseProps {
205208
type?: string;
206209
expression: string;
207210
order?: "ascending" | "descending";
211+
lhsExpression?: string;
212+
rhsExpression?: string;
213+
isOuter?: boolean;
208214
}
209215

210216
export interface IntermediateClause {

workspaces/ballerina/ballerina-core/src/interfaces/extended-lang-client.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,6 +1245,14 @@ export interface ImportIntegrationRequest {
12451245
parameters?: Record<string, any>;
12461246
}
12471247

1248+
export interface ProjectMigrationResult {
1249+
projectName: string;
1250+
textEdits: {
1251+
[key: string]: string;
1252+
};
1253+
report: string;
1254+
}
1255+
12481256
export interface ImportIntegrationResponse {
12491257
error: string;
12501258
textEdits: {
@@ -1882,6 +1890,11 @@ export enum ARTIFACT_TYPE {
18821890
Variables = "Variables"
18831891
}
18841892

1893+
export enum PROJECT_KIND {
1894+
WORKSPACE_PROJECT = "WORKSPACE_PROJECT",
1895+
BUILD_PROJECT = "BUILD_PROJECT"
1896+
}
1897+
18851898
export interface Artifacts {
18861899
[ARTIFACT_TYPE.Functions]: Record<string, BaseArtifact>;
18871900
[ARTIFACT_TYPE.Connections]: Record<string, BaseArtifact>;
@@ -1901,10 +1914,26 @@ export interface ArtifactsNotification {
19011914
export interface ProjectArtifactsRequest {
19021915
projectPath: string;
19031916
}
1917+
19041918
export interface ProjectArtifacts {
19051919
artifacts: Artifacts;
19061920
}
19071921

1922+
export interface ProjectInfoRequest {
1923+
projectPath: string;
1924+
}
1925+
1926+
export interface ProjectInfo {
1927+
projectKind: PROJECT_KIND;
1928+
name?: string;
1929+
title?: string;
1930+
orgName?: string;
1931+
org?: string;
1932+
version?: string;
1933+
projectPath?: string;
1934+
children?: ProjectInfo[];
1935+
};
1936+
19081937
// <------------ BI INTERFACES --------->
19091938

19101939
export interface BaseLangClientInterface {
@@ -2002,5 +2031,6 @@ export interface ExtendedLangClientInterface extends BIInterface {
20022031
updateStatusBar(): void;
20032032
getDidOpenParams(): DidOpenParams;
20042033
getProjectArtifacts(params: ProjectArtifactsRequest): Promise<ProjectArtifacts>;
2034+
getProjectInfo(params: ProjectInfoRequest): Promise<ProjectInfo>;
20052035
openConfigToml(params: OpenConfigTomlRequest): Promise<void>;
20062036
}

0 commit comments

Comments
 (0)