Skip to content
This repository has been archived by the owner on Aug 10, 2024. It is now read-only.

wip anypoint-als client #57

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 22 additions & 23 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 2 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "AML support",
"description": "",
"publisher": "MuleSoftInc",
"version": "0.5.0",
"version": "0.6.0-TopoEdition",
"engines": {
"vscode": "^1.52.0"
},
Expand Down Expand Up @@ -271,26 +271,6 @@
"when": "resourceLangId == aml || resourceLangId == aml-json",
"command": "als.conversion",
"group": "7_modification"
},
{
"when": "resourceLangId == aml || resourceLangId == aml-json",
"command": "als.setMainFile",
"group": "7_modification"
},
{
"when": "resourceLangId == aml || resourceLangId == aml-json",
"command": "als.registerProfile",
"group": "7_modification"
},
{
"when": "resourceLangId == aml || resourceLangId == aml-json",
"command": "als.unregisterProfile",
"group": "7_modification"
},
{
"when": "resourceLangId == aml || resourceLangId == aml-json",
"command": "als.registerSemantic",
"group": "7_modification"
}
]
},
Expand All @@ -313,7 +293,7 @@
}
},
"dependencies": {
"@aml-org/als-node-client": "5.0.1",
"@mulesoft/anypoint-node-client": "/Users/llibarona/mulesoft/anypoint-als/anypoint-node-client/node-package/mulesoft-anypoint-node-client-5.1.0-SNAPSHOT.tgz",
"@types/mocha": "^8.2.1",
"@types/node": "^11.15.20",
"@types/vscode": "1.52.0",
Expand Down
2 changes: 1 addition & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { AlsInitializeParamsFeature, ConversionFeature } from './features'
import { AlsLanguageClient } from './server/als'
import { SettingsManager } from './settings'

var jsAls = require.resolve("@aml-org/als-node-client")
var jsAls = require.resolve("@mulesoft/anypoint-node-client")
export let alsLog = vscode.window.createOutputChannel("alsLog");

export class AlsResolver {
Expand Down
4 changes: 2 additions & 2 deletions src/features.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AlsClientCapabilities, AlsInitializeParams } from '@aml-org/als-node-client';
import { AlsClientCapabilities, AlsInitializeParams } from '@mulesoft/anypoint-node-client';
import { DocumentSelector } from 'vscode';
import { ClientCapabilities, InitializeParams, ServerCapabilities, StaticFeature } from 'vscode-languageclient';
export class ConversionFeature implements StaticFeature {
Expand Down Expand Up @@ -33,7 +33,7 @@ export class AlsInitializeParamsFeature implements StaticFeature {
}
fillInitializeParams?: (params: InitializeParams) => void = (params: InitializeParams) => {
var castedParams = params as AlsInitializeParams
castedParams.hotReload = this.hotReload
// castedParams.hotReload = this.hotReload
}

fillClientCapabilities(capabilities: ClientCapabilities): void {
Expand Down
2 changes: 1 addition & 1 deletion src/server/als.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { conversionHandler, registerProfileHandler, registerSemanticHandler, ren
import { ConfigurationViewProvider } from '../ui/configurationView';
import { SettingsManager } from '../settings';
import { Disposable } from 'vscode';
import { ConversionParams, DidChangeConfigurationNotificationParams, GetWorkspaceConfigurationParams, GetWorkspaceConfigurationResult, RenameFileActionParams, RenameFileActionResult, SerializationParams, SerializationResult, SerializedDocument } from '@aml-org/als-node-client';
import { ConversionParams, DidChangeConfigurationNotificationParams, GetWorkspaceConfigurationParams, GetWorkspaceConfigurationResult, RenameFileActionParams, RenameFileActionResult, SerializationParams, SerializationResult, SerializedDocument } from '@mulesoft/anypoint-node-client';
import { messages } from '../types';


Expand Down
5 changes: 3 additions & 2 deletions src/server/alsConfiguration.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import { messages } from "../types";
import { LanguageClient } from "vscode-languageclient/node";
import { workspace } from "vscode";
import { AlsConfiguration } from "@aml-org/als-node-client";
import { AlsConfiguration } from "@mulesoft/anypoint-node-client";


export const initialConfiguration: AlsConfiguration = {
formattingOptions: {
"application/raml+yaml": { tabSize: 2, preferSpaces: true }
},
templateType: "FULL",
prettyPrintSerialization: true
prettyPrintSerialization: true,

}

export var currentConfiguration: AlsConfiguration = initialConfiguration
Expand Down
2 changes: 1 addition & 1 deletion src/server/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { AlsLanguageClient } from "./als"
import * as vscode from 'vscode';
import { awaitInputBox } from "../ui/ui";
import {alsLog} from "../extension"
import { DidChangeConfigurationNotificationParams } from "@aml-org/als-node-client";
import { DidChangeConfigurationNotificationParams } from "@mulesoft/anypoint-node-client";
import { isDependencyConfiguration } from "../types";
var path = require("path")
export const setMainFileHandler = (als: AlsLanguageClient) => {
Expand Down
2 changes: 1 addition & 1 deletion src/test/e2e/fileRename.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as vscode from 'vscode';
import * as assert from 'assert';
import { getDocUri, activate, testFilesDirectory, activateExtension } from '../helper';
import { messages } from '../../types';
import { RenameFileActionParams, RenameFileActionResult } from '@aml-org/als-node-client';
import { RenameFileActionParams, RenameFileActionResult } from '@mulesoft/anypoint-node-client';

suite('Should rename file', async function () {
test('Rename file DataType.raml', async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AlsConfiguration, ConfigurationNotification, GetWorkspaceConfigurationRequestType, AlsRenameFileRequestType, RenameFileActionParams, RenameFileActionResult, SerializationRequestType, SerializationParams, SerializationResult, ConversionParams, SerializedDocument, ConversionRequestType, GetWorkspaceConfigurationParams, GetWorkspaceConfigurationResult, AlsDependency, Dependency } from "@aml-org/als-node-client"
import { AlsConfiguration, ConfigurationNotification, GetWorkspaceConfigurationRequestType, AlsRenameFileRequestType, RenameFileActionParams, RenameFileActionResult, SerializationRequestType, SerializationParams, SerializationResult, ConversionParams, SerializedDocument, ConversionRequestType, GetWorkspaceConfigurationParams, GetWorkspaceConfigurationResult, AlsDependency, Dependency } from "@mulesoft/anypoint-node-client"
import { NotificationType, RequestType } from "vscode-languageclient"

export namespace messages {
Expand Down
2 changes: 1 addition & 1 deletion src/ui/configurationView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as vscode from 'vscode';
import * as path from 'path';
import { AlsLanguageClient } from '../server/als';
import { isDependencyConfiguration } from '../types';
import { AlsDependency, Dependency, GetWorkspaceConfigurationResult } from '@aml-org/als-node-client';
import { AlsDependency, Dependency, GetWorkspaceConfigurationResult } from '@mulesoft/anypoint-node-client';

export class ConfigurationViewProvider implements vscode.TreeDataProvider<WorkspaceConfigurationEntry> {
constructor(private workspaces: ReadonlyArray<vscode.WorkspaceFolder>, private als: AlsLanguageClient) { }
Expand Down