From 6d087f9340abae690daee3f71423022408f81c01 Mon Sep 17 00:00:00 2001 From: Tomer Epstein Date: Thu, 4 Feb 2021 11:12:59 +0200 Subject: [PATCH] ci: move bas-platform to https://github.com/SAP/app-studio-toolkit --- .circleci/config.yml | 25 -------- .vscode/launch.json | 23 -------- .vscode/tasks.json | 14 ----- backend/package.json | 4 +- bas-platform-types/.gitignore | 2 - bas-platform-types/.npmignore | 3 - bas-platform-types/package.json | 26 --------- bas-platform/.gitignore | 2 - bas-platform/.vscode/launch.json | 36 ------------ bas-platform/.vscode/settings.json | 11 ---- bas-platform/.vscode/tasks.json | 20 ------- bas-platform/.vscodeignore | 11 ---- bas-platform/README.md | 12 ---- bas-platform/icon.png | Bin 5953 -> 0 bytes bas-platform/package.json | 54 ----------------- bas-platform/src/actions/basctlServer.ts | 65 --------------------- bas-platform/src/actions/client.ts | 24 -------- bas-platform/src/actions/impl.ts | 56 ------------------ bas-platform/src/actions/interfaces.ts | 38 ------------ bas-platform/src/actions/performer.ts | 25 -------- bas-platform/src/api.ts | 37 ------------ bas-platform/src/extension.ts | 34 ----------- bas-platform/tsconfig.json | 24 -------- bas-platform/tslint.json | 15 ----- guided-development-types/package.json | 2 +- sample-action-client/.gitignore | 2 - sample-action-client/.vscode/launch.json | 36 ------------ sample-action-client/.vscode/settings.json | 11 ---- sample-action-client/.vscode/tasks.json | 20 ------- sample-action-client/.vscodeignore | 10 ---- sample-action-client/README.md | 27 --------- sample-action-client/package.json | 54 ----------------- sample-action-client/src/extension.ts | 29 --------- sample-action-client/tsconfig.json | 23 -------- sample-action-client/tslint.json | 15 ----- vscode-contrib-cake/package.json | 2 +- vscode-contrib1/package.json | 2 +- vscode-contrib2/package.json | 2 +- vscode-contrib3/package.json | 2 +- vscode-simple-contrib/package.json | 2 +- vscode-snippet-food-contrib/package.json | 2 +- 41 files changed, 9 insertions(+), 793 deletions(-) delete mode 100644 bas-platform-types/.gitignore delete mode 100644 bas-platform-types/.npmignore delete mode 100644 bas-platform-types/package.json delete mode 100644 bas-platform/.gitignore delete mode 100644 bas-platform/.vscode/launch.json delete mode 100644 bas-platform/.vscode/settings.json delete mode 100644 bas-platform/.vscode/tasks.json delete mode 100644 bas-platform/.vscodeignore delete mode 100644 bas-platform/README.md delete mode 100644 bas-platform/icon.png delete mode 100644 bas-platform/package.json delete mode 100644 bas-platform/src/actions/basctlServer.ts delete mode 100644 bas-platform/src/actions/client.ts delete mode 100644 bas-platform/src/actions/impl.ts delete mode 100644 bas-platform/src/actions/interfaces.ts delete mode 100644 bas-platform/src/actions/performer.ts delete mode 100644 bas-platform/src/api.ts delete mode 100644 bas-platform/src/extension.ts delete mode 100644 bas-platform/tsconfig.json delete mode 100644 bas-platform/tslint.json delete mode 100644 sample-action-client/.gitignore delete mode 100644 sample-action-client/.vscode/launch.json delete mode 100644 sample-action-client/.vscode/settings.json delete mode 100644 sample-action-client/.vscode/tasks.json delete mode 100644 sample-action-client/.vscodeignore delete mode 100644 sample-action-client/README.md delete mode 100644 sample-action-client/package.json delete mode 100644 sample-action-client/src/extension.ts delete mode 100644 sample-action-client/tsconfig.json delete mode 100644 sample-action-client/tslint.json diff --git a/.circleci/config.yml b/.circleci/config.yml index 362d555..58a5357 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -114,41 +114,16 @@ jobs: # a collection of steps name: Lint commit message working_directory: backend command: echo "$COMMIT_MESSAGE" | npx commitlint - - run: - name: install bas-platform - working_directory: bas-platform - command: npm install - - run: - name: build bas-platform - working_directory: bas-platform - command: npm run compile - - run: - name: create .vsix - working_directory: bas-platform - command: npx vsce package . - # - run: - # name: test bas-platform - # working_directory: bas-platform - # command: npm run test - - store_artifacts: # special step to save test results as as artifact - path: bas-platform/coverage - destination: bas-platform-coverage - save_cache: paths: - backend/node_modules - frontend/node_modules - - bas-platform/node_modules key: dependency-cache-{{ checksum "backend/package.json" }}-{{ checksum "frontend/package.json" }} - persist_to_workspace: root: backend paths: # https://golang.org/pkg/path/filepath/#Match - guided-development-* - - persist_to_workspace: - root: bas-platform - paths: - # https://golang.org/pkg/path/filepath/#Match - - bas-platform-* - store_test_results: # for display in Test Summary: https://circleci.com/docs/2.0/collect-test-data/ path: test-results.xml diff --git a/.vscode/launch.json b/.vscode/launch.json index 8f6c9ab..1b5ed03 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -12,12 +12,10 @@ "runtimeExecutable": "${execPath}", "args": [ "--extensionDevelopmentPath=${workspaceFolder}/backend", - "--extensionDevelopmentPath=${workspaceFolder}/bas-platform", "--extensionDevelopmentPath=${workspaceFolder}/vscode-simple-contrib", ], "outFiles": [ "${workspaceFolder}/backend/out/**/*.js", - "${workspaceFolder/bas-platform/out/**/*.js", "${workspaceFolder/vscode-simple-contrib/out/**/*.js", ], "preLaunchTask": "watch backend (webpack)" @@ -29,14 +27,12 @@ "runtimeExecutable": "${execPath}", "args": [ "--extensionDevelopmentPath=${workspaceFolder}/backend", - "--extensionDevelopmentPath=${workspaceFolder}/bas-platform", "--extensionDevelopmentPath=${workspaceFolder}/vscode-contrib1", "--extensionDevelopmentPath=${workspaceFolder}/vscode-contrib2", "--extensionDevelopmentPath=${workspaceFolder}/vscode-contrib3", ], "outFiles": [ "${workspaceFolder}/backend/out/**/*.js", - "${workspaceFolder/bas-platform/out/**/*.js", "${workspaceFolder/vscode-contrib1/out/**/*.js", "${workspaceFolder/vscode-contrib2/out/**/*.js", "${workspaceFolder/vscode-contrib3/out/**/*.js" @@ -50,12 +46,10 @@ "runtimeExecutable": "${execPath}", "args": [ "--extensionDevelopmentPath=${workspaceFolder}/backend", - "--extensionDevelopmentPath=${workspaceFolder}/bas-platform", "--extensionDevelopmentPath=${workspaceFolder}/vscode-contrib-cake", ], "outFiles": [ "${workspaceFolder}/backend/out/**/*.js", - "${workspaceFolder/bas-platform/out/**/*.js", "${workspaceFolder/vscode-contrib-cake/out/**/*.js", ], "preLaunchTask": "watch backend (webpack)" @@ -67,12 +61,10 @@ "runtimeExecutable": "${execPath}", "args": [ "--extensionDevelopmentPath=${workspaceFolder}/backend", - "--extensionDevelopmentPath=${workspaceFolder}/bas-platform", "--extensionDevelopmentPath=${workspaceFolder}/vscode-snippet-food-contrib", ], "outFiles": [ "${workspaceFolder}/backend/out/**/*.js", - "${workspaceFolder/bas-platform/out/**/*.js", "${workspaceFolder/vscode-snippet-food-contrib/out/**/*.js", ], "preLaunchTask": "watch backend (webpack)" @@ -90,21 +82,6 @@ }, "preLaunchTask": "watch backend (tsc)" }, - { - "name": "Platform: Sample action client", - "type": "extensionHost", - "request": "launch", - "runtimeExecutable": "${execPath}", - "args": [ - "--extensionDevelopmentPath=${workspaceFolder}/bas-platform", - "--extensionDevelopmentPath=${workspaceFolder}/sample-action-client", - ], - "outFiles": [ - "${workspaceFolder}/bas-platfom/out/**/*.js", - "${workspaceFolder/sample-action-client/out/**/*.js", - ], - "preLaunchTask": "watch bas-platform" - }, { "name": "Client: chrome (8080)", "request": "launch", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 2ef6275..90ce912 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -48,20 +48,6 @@ "isDefault": true } }, - // { - // "type": "npm", - // "label": "watch bas-platform", - // "isBackground": true, - // "options": { - // "cwd": "${workspaceFolder}/bas-platform" - // }, - // "script": "watch", - // "problemMatcher": "$tsc-watch", - // "group": { - // "kind": "build", - // "isDefault": true - // } - // }, { "type": "npm", "label": "serve frontend", diff --git a/backend/package.json b/backend/package.json index 10ef0f8..cf32378 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "guided-development", - "version": "0.0.16", + "version": "0.0.17", "displayName": "Guided Development", "publisher": "SAPOSS", "author": { @@ -116,7 +116,7 @@ "lint:fix": "eslint . --ext .ts,.tsx --cache --fix" }, "dependencies": { - "@sap-devx/bas-platform-types": "0.0.10", + "@sap-devx/bas-platform-types": "0.0.13", "@sap-devx/webview-rpc": "^0.2.2", "@sap-devx/yeoman-ui-types": "0.0.1", "@vscode-logging/logger": "1.2.1", diff --git a/bas-platform-types/.gitignore b/bas-platform-types/.gitignore deleted file mode 100644 index 9209ef5..0000000 --- a/bas-platform-types/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -out diff --git a/bas-platform-types/.npmignore b/bas-platform-types/.npmignore deleted file mode 100644 index ef7ccbb..0000000 --- a/bas-platform-types/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -/out/src/* -!/out/src/api.d.ts -!/out/src/actions/ diff --git a/bas-platform-types/package.json b/bas-platform-types/package.json deleted file mode 100644 index 8b1f183..0000000 --- a/bas-platform-types/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "@sap-devx/bas-platform-types", - "publisher": "SAPOSS", - "version": "0.0.10", - "author": "", - "license": "Apache-2.0", - "description": "An npm package that includes Business Application Studio declarations", - "repository": { - "type": "git", - "url": "https://github.com/SAP/guided-development.git", - "directory": "bas-platform-types" - }, - "main": "./out/src/actions/interfaces", - "types": "./out/src/api", - "scripts": { - "prep": "npm i && cd ../bas-platform && npm i && npm run compile", - "copy": "ncp ../bas-platform/out out", - "prepublishOnly": "npm run prep && npm run copy" - }, - "dependencies": { - "@types/vscode": "^1.49.0" - }, - "devDependencies": { - "ncp": "^2.0.0" - } -} diff --git a/bas-platform/.gitignore b/bas-platform/.gitignore deleted file mode 100644 index 9209ef5..0000000 --- a/bas-platform/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -out diff --git a/bas-platform/.vscode/launch.json b/bas-platform/.vscode/launch.json deleted file mode 100644 index b1fbaf5..0000000 --- a/bas-platform/.vscode/launch.json +++ /dev/null @@ -1,36 +0,0 @@ -// A launch configuration that compiles the extension and then opens it inside a new window -// Use IntelliSense to learn about possible attributes. -// Hover to view descriptions of existing attributes. -// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 -{ - "version": "0.2.0", - "configurations": [ - { - "name": "Run Extension", - "type": "extensionHost", - "request": "launch", - "runtimeExecutable": "${execPath}", - "args": [ - "--extensionDevelopmentPath=${workspaceFolder}" - ], - "outFiles": [ - "${workspaceFolder}/out/**/*.js" - ], - "preLaunchTask": "${defaultBuildTask}" - }, - { - "name": "Extension Tests", - "type": "extensionHost", - "request": "launch", - "runtimeExecutable": "${execPath}", - "args": [ - "--extensionDevelopmentPath=${workspaceFolder}", - "--extensionTestsPath=${workspaceFolder}/out/test/suite/index" - ], - "outFiles": [ - "${workspaceFolder}/out/test/**/*.js" - ], - "preLaunchTask": "${defaultBuildTask}" - } - ] -} diff --git a/bas-platform/.vscode/settings.json b/bas-platform/.vscode/settings.json deleted file mode 100644 index 30bf8c2..0000000 --- a/bas-platform/.vscode/settings.json +++ /dev/null @@ -1,11 +0,0 @@ -// Place your settings in this file to overwrite default and user settings. -{ - "files.exclude": { - "out": false // set this to true to hide the "out" folder with the compiled JS files - }, - "search.exclude": { - "out": true // set this to false to include "out" folder in search results - }, - // Turn off tsc task auto detection since we have the necessary tasks as npm scripts - "typescript.tsc.autoDetect": "off" -} \ No newline at end of file diff --git a/bas-platform/.vscode/tasks.json b/bas-platform/.vscode/tasks.json deleted file mode 100644 index 3b17e53..0000000 --- a/bas-platform/.vscode/tasks.json +++ /dev/null @@ -1,20 +0,0 @@ -// See https://go.microsoft.com/fwlink/?LinkId=733558 -// for the documentation about the tasks.json format -{ - "version": "2.0.0", - "tasks": [ - { - "type": "npm", - "script": "watch", - "problemMatcher": "$tsc-watch", - "isBackground": true, - "presentation": { - "reveal": "never" - }, - "group": { - "kind": "build", - "isDefault": true - } - } - ] -} diff --git a/bas-platform/.vscodeignore b/bas-platform/.vscodeignore deleted file mode 100644 index c144948..0000000 --- a/bas-platform/.vscodeignore +++ /dev/null @@ -1,11 +0,0 @@ -.vscode/** -.vscode-test/** -out/test/** -src/** -.gitignore -!icon.png -vsc-extension-quickstart.md -**/tsconfig.json -**/tslint.json -**/*.map -**/*.ts \ No newline at end of file diff --git a/bas-platform/README.md b/bas-platform/README.md deleted file mode 100644 index f7a2cf9..0000000 --- a/bas-platform/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# BAS Platform Extension -SAP Business Application Studio Platform Extension - -## Project setup -``` -npm install -``` - -### Compile -``` -npm run compile -``` diff --git a/bas-platform/icon.png b/bas-platform/icon.png deleted file mode 100644 index c3713271ad929f28a45483ef8d2098896bcdb59b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5953 zcmV-H7ry9;P)Px#1ZP1_K>z@;j|==^1pojR>q$gGRCr$Poe6XmRhq}YdP|m_2qUiALX2~~ANlK1L<_uFqhl1L;Hi9{liNF)-8L?V$$ zBoc{4@`J{yA5D>wo1fV?D|csV-@)g2GKaP_dCQ9QZ%KLyiheXjzu}V}bvTq|`XxCX z&XV?a-UUF8kxFXDg6poPO&=FfeM5u(T_RPbf_A0tRw)RH zjcF6$>6`N(ib9u9n{oj?aNpf@;|=pEZ}cciN^(2 zZ1sZ{x=#lD4UND&lyJ3rd&vav$JX2j$KR*P%{&Nzw&QN5)y}gj0u9a?a-`l7z&R z0Qgmc`lpSb6!7a{%$?0;gqZ=yb=rv}5iutK4&N#q;rW-Js^DXR2s7YNlv(^ll8~4Z z02bQSusH8!oNsvNeLfZl%)p@Rfy@t7GqQ5eU!o675)89G0QnT(avcA$>7RZ+5QMpx zX=XrCl^Og*l5m(703>)+Ro&Ov*yMmI2*!LCB>+WnEZ`@Sgu}D|a1`}f9A5YXw+7uX znt}eglVmiIfLIcMs^UE_Ghd(xDPW%X3Bt6g7iuRe$!H(}v8DkSs-kjVAe1wB%TI66 z&lITvVgyMvra5Q!A2DfN)`&@a@r44M{%u>ZECB7){x*&W4ju{`5(+aw3S|z=yZ)z>QAJ%Vs;q09Ys)&kZfJ@0jGQ%| z%%NU0{TP-t0AL~EeK>C2_J!YA5*Ex6SwU$AA_8@<5Uos2cBcL2`m<@>9r-B>FC0S0 zE1Oj|?)5u-T|91w-?bDPg4yB?DAMV}QDch$ATh)w^X*U}VczJG9cIAHi~O;`BPBMO z=_yYCs>Ng7x6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2f#S98o)sgEgc-TA}Fz&nhNb%!d9|?z_I{{dO)~> z5O-B1wo+G9%{8x;EFiEf0G)*HFqclC{Zv<0@COMB4Qv+60wC%EXbhG0fS#kh-N$_Z zrh(7A21xOw@fRV}!94?V06Yt*QjL`?Ah1OM`u5A(i(|>rBm6oLzh4S~onSv8V0YE> zhe+EZ0F4a|t8v`1@gu4Tk`iujZ`02tR>A83Wc^=wD;_hgmLdRPX>XvB-0`zNtFQI) zhv%Gk$qX7ebQmS48lNbZ9Pz`XB;i5!?~9K=YHw|6aWc26pj~NOV741rV4DDd+zGSa zsrP!X)h{J+!mh~&wh92?A1O=fOhr}mRZ@EACp;x6Q2F@yc)LGATq2Q3Boc{4B9TZW j5{X12kw_#zV2J)72WZN*MObR+00000NkvXXu0mjftH?qi diff --git a/bas-platform/package.json b/bas-platform/package.json deleted file mode 100644 index 7c37719..0000000 --- a/bas-platform/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "bas-platform", - "displayName": "BAS Platform Extension", - "description": "SAP Business Application Studio platform extension", - "version": "0.0.10", - "publisher": "SAPOSS", - "license": "Apache-2.0", - "icon": "icon.png", - "engines": { - "vscode": "^1.44.2" - }, - "repository": { - "type": "git", - "url": "https://github.com/SAP/guided-development", - "directory": "bas-platform" - }, - "categories": [ - "Other" - ], - "main": "./out/src/extension.js", - "types": "./out/src/api", - "activationEvents": [ - "*" - ], - "contributes": { - "configuration": { - "title": "Actions", - "properties": { - "actions": { - "type": "array" - } - } - } - }, - "scripts": { - "vscode:prepublish": "npm run compile", - "compile": "tsc -p ./", - "watch": "tsc -watch -p ./", - "pretest": "npm run compile", - "test": "node ./out/test/runTest.js", - "package": "vsce package ." - }, - "dependencies": { - "lodash": "^4.17.20" - }, - "devDependencies": { - "@types/node": "^14.14.14", - "@types/lodash": "^4.14.165", - "@types/vscode": "^1.40.0", - "typescript": "^3.9.7", - "vsce": "^1.69.0", - "vscode-test": "^1.2.2" - } -} diff --git a/bas-platform/src/actions/basctlServer.ts b/bas-platform/src/actions/basctlServer.ts deleted file mode 100644 index ba8f9ce..0000000 --- a/bas-platform/src/actions/basctlServer.ts +++ /dev/null @@ -1,65 +0,0 @@ -import * as vscode from 'vscode'; -import * as net from 'net'; -import * as fs from 'fs'; -import * as _ from 'lodash'; - -const SOCKETFILE = '/extbin/basctlSocket'; - -let basctlServer: net.Server; - - -function handleRequest(socket: net.Socket) { - socket.on('data', dataBuffer => { - const data: any = getRequestData(dataBuffer); - - if (data.command === 'openExternal') { - const uri = vscode.Uri.parse(data.url, true); - vscode.env.openExternal(uri); - } - }); -} - -function getRequestData(dataBuffer: any) { - try { - return JSON.parse(_.toString(dataBuffer)); - } catch (error) { - showErrorMessage(error, 'failed to parse basctl request data'); - return {}; - } -} - -function showErrorMessage(error: any, defaultError: string) { - const errorMessage = _.get(error, 'stack', _.get(error, 'message', defaultError)); - vscode.window.showErrorMessage(errorMessage); -} - -export function closeBasctlServer() { - if (basctlServer) { - basctlServer.close(); - } -} - -function createBasctlServer() { - try { - basctlServer = net.createServer(socket => { - handleRequest(socket); - }).listen(SOCKETFILE); - } catch (error) { - showErrorMessage(error, 'basctl server error'); - } -} - -export function startBasctlServer() { - fs.stat(SOCKETFILE, err => { - if (err) { - createBasctlServer(); - } else { - fs.unlink(SOCKETFILE, err => { - if (err) { - throw new Error(err.stack); - } - createBasctlServer(); - }); - } - }); -} diff --git a/bas-platform/src/actions/client.ts b/bas-platform/src/actions/client.ts deleted file mode 100644 index 9502807..0000000 --- a/bas-platform/src/actions/client.ts +++ /dev/null @@ -1,24 +0,0 @@ -import * as vscode from 'vscode'; -import { IAction } from "./interfaces"; -import { _performAction } from "./performer"; - -export function performAction(action: IAction, options?: any): void { - if (options?.schedule) { - _scheduleAction(action); - } else { - _performAction(action); - } -} - -/** Schedule an action for execution after restart */ -function _scheduleAction(action: IAction) { - const actionsSettings = vscode.workspace.getConfiguration(); - let actionsList: any[] | undefined = actionsSettings.get("actions"); - if (!actionsList) { - actionsList = []; - } - actionsList.push(action); - actionsSettings.update("actions", actionsList, vscode.ConfigurationTarget.Workspace).then(() => { }, (reason) => { - console.error(`Couldn't schedule action: ${reason}`); - }); -} diff --git a/bas-platform/src/actions/impl.ts b/bas-platform/src/actions/impl.ts deleted file mode 100644 index 6dffa26..0000000 --- a/bas-platform/src/actions/impl.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { Uri } from "vscode"; -import { ActionType, IAction, ICommandAction, IExecuteAction, IFileAction, ISnippetAction, - CommandActionParams, ExecuteActionParams, SnippetActionParams, FileActionParams } from "./interfaces"; - -abstract class Action implements IAction { - actionType: ActionType | undefined; -} - -/** Specific action classes */ -export class ExecuteAction extends Action implements IExecuteAction { - executeAction: (params?: ExecuteActionParams) => Thenable; - params?: ExecuteActionParams; - - constructor() { - super(); - this.actionType = ActionType.Execute; - this.executeAction = (params?: ExecuteActionParams) => { return Promise.resolve() } - this.params = []; - } -} - -export class CommandAction extends Action implements ICommandAction { - name: string; - params?: CommandActionParams; - - constructor() { - super(); - this.actionType = ActionType.Command; - this.name = ""; - this.params = []; - } -} - -export class SnippetAction extends Action implements ISnippetAction { - contributorId: string; - snippetName: string; - context: SnippetActionParams; - - constructor() { - super(); - this.actionType = ActionType.Snippet; - this.contributorId = ""; - this.snippetName = ""; - this.context = ""; - } -} - -export class FileAction extends Action implements IFileAction { - uri: FileActionParams; - - constructor() { - super(); - this.actionType = ActionType.File; - this.uri = Uri.parse(""); - } -} diff --git a/bas-platform/src/actions/interfaces.ts b/bas-platform/src/actions/interfaces.ts deleted file mode 100644 index 854e028..0000000 --- a/bas-platform/src/actions/interfaces.ts +++ /dev/null @@ -1,38 +0,0 @@ -import * as vscode from "vscode"; - -export enum ActionType { - Execute = "EXECUTE", - Command = "COMMAND", - Task = "TASK", - File = "FILE", - Snippet = "SNIPPET" -} - -export type CommandActionParams = any []; -export type ExecuteActionParams = any []; -export type SnippetActionParams = any; -export type FileActionParams = vscode.Uri; - -export interface IAction { - actionType: ActionType | undefined; -} - -export interface IExecuteAction extends IAction { - executeAction: (params?: ExecuteActionParams) => Thenable; - params?: ExecuteActionParams; -} - -export interface ICommandAction extends IAction { - name: string; - params?: CommandActionParams; -} - -export interface ISnippetAction extends IAction { - contributorId: string; - snippetName: string; - context: SnippetActionParams; -} - -export interface IFileAction extends IAction { - uri: FileActionParams; -} diff --git a/bas-platform/src/actions/performer.ts b/bas-platform/src/actions/performer.ts deleted file mode 100644 index fbe49e2..0000000 --- a/bas-platform/src/actions/performer.ts +++ /dev/null @@ -1,25 +0,0 @@ -import * as vscode from "vscode"; -import { ActionType, IAction, ICommandAction, IExecuteAction, IFileAction, ISnippetAction } from "./interfaces"; - -export async function _performAction(action: IAction): Promise { - if (action) { - switch ((action as IAction).actionType) { - case ActionType.Command: - let commandAction = (action as ICommandAction); - return vscode.commands.executeCommand(commandAction.name, commandAction.params); - case ActionType.Execute: - let executeAction = (action as IExecuteAction); - if (executeAction.params) { - return executeAction.executeAction(executeAction.params); - } else { - return executeAction.executeAction(); - } - case ActionType.Snippet: - let snippetAction = (action as ISnippetAction); - return vscode.commands.executeCommand("loadCodeSnippet", { viewColumn: vscode.ViewColumn.Two, contributorId: snippetAction.contributorId, snippetName: snippetAction.snippetName, context: snippetAction.context }); - case ActionType.File: - let fileAction = (action as IFileAction); - return vscode.commands.executeCommand('vscode.open', fileAction.uri, {viewColumn: vscode.ViewColumn.Two}); - } - } -} diff --git a/bas-platform/src/api.ts b/bas-platform/src/api.ts deleted file mode 100644 index 0061840..0000000 --- a/bas-platform/src/api.ts +++ /dev/null @@ -1,37 +0,0 @@ -import * as vscode from 'vscode'; -import { performAction } from './actions/client'; -import { ExecuteAction, SnippetAction, CommandAction, FileAction } from './actions/impl'; -export * from "./actions/interfaces"; - -export const bas = { - getExtensionAPI: (extensionId: string): Promise => { - const extension = vscode.extensions.getExtension(extensionId); - - const promise = new Promise((resolve, reject) => { - let intervalId: NodeJS.Timeout; - if (!(extension?.isActive)) { - console.info(`Waiting for activation of ${extensionId}`); - intervalId = setInterval(() => { - if (extension?.isActive) { - console.info(`Detected activation of ${extensionId}`); - clearInterval(intervalId); - resolve(extension?.exports as T); - } - }, 500); - } else { - console.info(`Detected ${extensionId} is active`); - resolve(extension?.exports as T); - } - }); - - return promise; - }, - - actions: { - performAction, - ExecuteAction, - SnippetAction, - CommandAction, - FileAction - } -} diff --git a/bas-platform/src/extension.ts b/bas-platform/src/extension.ts deleted file mode 100644 index 20514d3..0000000 --- a/bas-platform/src/extension.ts +++ /dev/null @@ -1,34 +0,0 @@ -import * as vscode from 'vscode'; -import { bas } from './api'; -import { _performAction } from "./actions/performer"; -import { startBasctlServer, closeBasctlServer } from './actions/basctlServer'; - -const subscriptions: Array = []; - -function performScheduledActions() { - const actionsSettings = vscode.workspace.getConfiguration(); - const actionsList: any[] | undefined = actionsSettings.get("actions"); - if (actionsList && actionsList.length) { - for (const action of actionsList) { - console.log(`performing action ${action.name} of type ${action.constructor.name}`) - _performAction(action); - } - actionsSettings.update("actions", []); - } -} - -export async function activate() { - startBasctlServer(); - - performScheduledActions(); - - return bas; -} - -export function deactivate() { - closeBasctlServer(); - - for (const subscription of subscriptions) { - subscription.dispose(); - } -} diff --git a/bas-platform/tsconfig.json b/bas-platform/tsconfig.json deleted file mode 100644 index 64a5943..0000000 --- a/bas-platform/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "compilerOptions": { - "skipLibCheck": true, - "declaration": true, - "module": "commonjs", - "target": "es6", - "outDir": "out", - "lib": [ - "es6" - ], - "allowJs": true, - "sourceMap": true, - "rootDir": ".", - "rootDirs" : [ - "src" - ], - "strict": true - }, - "exclude": [ - "out", - "node_modules", - ".vscode-test" - ] -} diff --git a/bas-platform/tslint.json b/bas-platform/tslint.json deleted file mode 100644 index c81ff28..0000000 --- a/bas-platform/tslint.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "rules": { - "no-string-throw": true, - "no-unused-expression": true, - "no-duplicate-variable": true, - "curly": true, - "class-name": true, - "semicolon": [ - true, - "always" - ], - "triple-equals": true - }, - "defaultSeverity": "warning" -} diff --git a/guided-development-types/package.json b/guided-development-types/package.json index fb4b3f4..63cf3d0 100644 --- a/guided-development-types/package.json +++ b/guided-development-types/package.json @@ -18,7 +18,7 @@ "prepublishOnly": "npm run prep && npm run copy" }, "devDependencies": { - "@sap-devx/bas-platform-types": "0.0.10", + "@sap-devx/bas-platform-types": "0.0.13", "ncp": "^2.0.0" } } diff --git a/sample-action-client/.gitignore b/sample-action-client/.gitignore deleted file mode 100644 index 9209ef5..0000000 --- a/sample-action-client/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -out diff --git a/sample-action-client/.vscode/launch.json b/sample-action-client/.vscode/launch.json deleted file mode 100644 index b1fbaf5..0000000 --- a/sample-action-client/.vscode/launch.json +++ /dev/null @@ -1,36 +0,0 @@ -// A launch configuration that compiles the extension and then opens it inside a new window -// Use IntelliSense to learn about possible attributes. -// Hover to view descriptions of existing attributes. -// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 -{ - "version": "0.2.0", - "configurations": [ - { - "name": "Run Extension", - "type": "extensionHost", - "request": "launch", - "runtimeExecutable": "${execPath}", - "args": [ - "--extensionDevelopmentPath=${workspaceFolder}" - ], - "outFiles": [ - "${workspaceFolder}/out/**/*.js" - ], - "preLaunchTask": "${defaultBuildTask}" - }, - { - "name": "Extension Tests", - "type": "extensionHost", - "request": "launch", - "runtimeExecutable": "${execPath}", - "args": [ - "--extensionDevelopmentPath=${workspaceFolder}", - "--extensionTestsPath=${workspaceFolder}/out/test/suite/index" - ], - "outFiles": [ - "${workspaceFolder}/out/test/**/*.js" - ], - "preLaunchTask": "${defaultBuildTask}" - } - ] -} diff --git a/sample-action-client/.vscode/settings.json b/sample-action-client/.vscode/settings.json deleted file mode 100644 index 30bf8c2..0000000 --- a/sample-action-client/.vscode/settings.json +++ /dev/null @@ -1,11 +0,0 @@ -// Place your settings in this file to overwrite default and user settings. -{ - "files.exclude": { - "out": false // set this to true to hide the "out" folder with the compiled JS files - }, - "search.exclude": { - "out": true // set this to false to include "out" folder in search results - }, - // Turn off tsc task auto detection since we have the necessary tasks as npm scripts - "typescript.tsc.autoDetect": "off" -} \ No newline at end of file diff --git a/sample-action-client/.vscode/tasks.json b/sample-action-client/.vscode/tasks.json deleted file mode 100644 index 3b17e53..0000000 --- a/sample-action-client/.vscode/tasks.json +++ /dev/null @@ -1,20 +0,0 @@ -// See https://go.microsoft.com/fwlink/?LinkId=733558 -// for the documentation about the tasks.json format -{ - "version": "2.0.0", - "tasks": [ - { - "type": "npm", - "script": "watch", - "problemMatcher": "$tsc-watch", - "isBackground": true, - "presentation": { - "reveal": "never" - }, - "group": { - "kind": "build", - "isDefault": true - } - } - ] -} diff --git a/sample-action-client/.vscodeignore b/sample-action-client/.vscodeignore deleted file mode 100644 index ed3f9d3..0000000 --- a/sample-action-client/.vscodeignore +++ /dev/null @@ -1,10 +0,0 @@ -.vscode/** -.vscode-test/** -out/test/** -src/** -.gitignore -vsc-extension-quickstart.md -**/tsconfig.json -**/tslint.json -**/*.map -**/*.ts \ No newline at end of file diff --git a/sample-action-client/README.md b/sample-action-client/README.md deleted file mode 100644 index 20d1985..0000000 --- a/sample-action-client/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# Sample Action Emitter -Can perform action immediately or schedule an action to run. - -## Project setup -``` -npm install -``` - -### Compile -``` -npm run compile -``` - -## Performing Actions -There are 2 alternatives for performing an action **immediately**: -* Using events: - 1. Expose an API - 1. Have the action-broker extension listen to this event - 1. Fire the event -* Directly performing the action (using a library function) - -When **scheduling** an action to run later: -1. *This* extension uses a library function that adds the action to the `settings.json` workspace file. -1. The `action-broker` extension reads from the settings file on startup, performs the actions, and clears the relevant section from the settings file. - -## Limitations -Actions of type `EXECUTE` cannot be scheduled to run, as the `performAction()` method is not serialized in the `settings.json` file. diff --git a/sample-action-client/package.json b/sample-action-client/package.json deleted file mode 100644 index 38e3e23..0000000 --- a/sample-action-client/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "sample-action-emitter", - "displayName": "Sample Action Emitter", - "description": "", - "version": "0.0.1", - "publisher": "SAPOSS", - "engines": { - "vscode": "^1.44.2" - }, - "repository": { - "type": "git", - "url": "https://github.com/SAP/guided-development", - "directory": "sample-action-emitter" - }, - "categories": [ - "Other" - ], - "main": "./out/extension.js", - "activationEvents": [ - "onCommand:perform.action.now", - "onCommand:schedule.action" - ], - "contributes": { - "commands": [ - { - "title": "Perform Action Immediately", - "command": "perform.action.now" - }, - { - "title": "Schedule Action", - "command": "schedule.action" - } - ] - }, - "scripts": { - "vscode:prepublish": "npm run compile", - "compile": "tsc -p ./", - "watch": "tsc -watch -p ./", - "pretest": "npm run compile", - "test": "node ./out/test/runTest.js", - "package": "vsce package ." - }, - "devDependencies": { - "@sap-devx/bas-platform-types": "0.0.10", - "@types/vscode": "^1.40.0", - "typescript": "^3.9.7", - "vsce": "^1.69.0", - "vscode-test": "^1.2.2" - }, - "extensionDependencies": [ - "SAPOSS.bas-platform" - ], - "dependencies": {} -} diff --git a/sample-action-client/src/extension.ts b/sample-action-client/src/extension.ts deleted file mode 100644 index da7f3be..0000000 --- a/sample-action-client/src/extension.ts +++ /dev/null @@ -1,29 +0,0 @@ -import * as vscode from 'vscode'; - -export async function activate(context: vscode.ExtensionContext) { - const basAPI = await vscode.extensions.getExtension("SAPOSS.bas-platform")?.exports; - - context.subscriptions.push(vscode.commands.registerCommand("perform.action.now", () => { - const action = new basAPI.actions.CommandAction(); - action.name = "openGlobalSettings"; - action.command = { - name: "workbench.action.openGlobalSettings" - }; - - basAPI.actions.performAction(action); - })); - - context.subscriptions.push(vscode.commands.registerCommand("schedule.action", () => { - const action = new basAPI.actions.CommandAction(); - action.name = "openGlobalSettings"; - action.command = { - name: "workbench.action.openGlobalSettings" - }; - - vscode.window.showInformationMessage(`Action ${action.name} was scheduled to run`,); - basAPI.actions.performAction(action, {schedule: true}); - })); -} - -export function deactivate() { -} diff --git a/sample-action-client/tsconfig.json b/sample-action-client/tsconfig.json deleted file mode 100644 index 3ab287e..0000000 --- a/sample-action-client/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compilerOptions": { - "skipLibCheck": true, - "module": "commonjs", - "target": "es6", - "outDir": "out", - "lib": [ - "es6" - ], - "sourceMap": true, - "rootDir": "src", - "strict": true /* enable all strict type-checking options */ - /* Additional Checks */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - }, - "exclude": [ - "out", - "node_modules", - ".vscode-test" - ] -} diff --git a/sample-action-client/tslint.json b/sample-action-client/tslint.json deleted file mode 100644 index c81ff28..0000000 --- a/sample-action-client/tslint.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "rules": { - "no-string-throw": true, - "no-unused-expression": true, - "no-duplicate-variable": true, - "curly": true, - "class-name": true, - "semicolon": [ - true, - "always" - ], - "triple-equals": true - }, - "defaultSeverity": "warning" -} diff --git a/vscode-contrib-cake/package.json b/vscode-contrib-cake/package.json index c091657..5782f6f 100644 --- a/vscode-contrib-cake/package.json +++ b/vscode-contrib-cake/package.json @@ -29,7 +29,7 @@ "package": "vsce package ." }, "dependencies": { - "@sap-devx/bas-platform-types": "0.0.10", + "@sap-devx/bas-platform-types": "0.0.13", "@sap-devx/guided-development-types": "0.0.12", "comment-json": "2.1.0", "datauri": "^2.0.0" diff --git a/vscode-contrib1/package.json b/vscode-contrib1/package.json index 4326e30..e541804 100644 --- a/vscode-contrib1/package.json +++ b/vscode-contrib1/package.json @@ -29,7 +29,7 @@ "package": "vsce package ." }, "dependencies": { - "@sap-devx/bas-platform-types": "0.0.10", + "@sap-devx/bas-platform-types": "0.0.13", "@sap-devx/guided-development-types": "0.0.12", "comment-json": "2.1.0", "datauri": "^2.0.0", diff --git a/vscode-contrib2/package.json b/vscode-contrib2/package.json index 92a6615..088a3cf 100644 --- a/vscode-contrib2/package.json +++ b/vscode-contrib2/package.json @@ -29,7 +29,7 @@ "package": "vsce package ." }, "dependencies": { - "@sap-devx/bas-platform-types": "0.0.10", + "@sap-devx/bas-platform-types": "0.0.13", "@sap-devx/guided-development-types": "0.0.12", "comment-json": "2.1.0", "lodash": "^4.17.15" diff --git a/vscode-contrib3/package.json b/vscode-contrib3/package.json index 152b76f..83c7590 100644 --- a/vscode-contrib3/package.json +++ b/vscode-contrib3/package.json @@ -29,7 +29,7 @@ "package": "vsce package ." }, "dependencies": { - "@sap-devx/bas-platform-types": "0.0.10", + "@sap-devx/bas-platform-types": "0.0.13", "@sap-devx/guided-development-types": "0.0.12", "comment-json": "2.1.0", "datauri": "^2.0.0", diff --git a/vscode-simple-contrib/package.json b/vscode-simple-contrib/package.json index 46e041a..11f5f3e 100644 --- a/vscode-simple-contrib/package.json +++ b/vscode-simple-contrib/package.json @@ -37,7 +37,7 @@ "SAPOSS.bas-platform" ], "dependencies": { - "@sap-devx/bas-platform-types": "0.0.10", + "@sap-devx/bas-platform-types": "0.0.13", "@sap-devx/guided-development-types": "0.0.12" } } diff --git a/vscode-snippet-food-contrib/package.json b/vscode-snippet-food-contrib/package.json index af699e8..0b3d7b9 100644 --- a/vscode-snippet-food-contrib/package.json +++ b/vscode-snippet-food-contrib/package.json @@ -37,7 +37,7 @@ "package": "vsce package ." }, "dependencies": { - "@sap-devx/bas-platform-types": "0.0.10", + "@sap-devx/bas-platform-types": "0.0.13", "@sap-devx/code-snippet-types": "0.0.6", "@sap-devx/guided-development-types": "0.0.12", "comment-json": "2.1.0",