Skip to content

initial support for server's settings from intersystems.servers #172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jul 7, 2020
Merged
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
4 changes: 3 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"${workspaceFolder}/test-fixtures/test.code-workspace",
"--disable-extensions",
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
"outFiles": [
"${workspaceFolder}/out/test/**/*.js"
],
"preLaunchTask": "npm: watch"
"preLaunchTask": "npm: test-compile"
}
]
}
24 changes: 24 additions & 0 deletions package-lock.json

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

155 changes: 93 additions & 62 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@
"onDebugInitialConfigurations"
],
"main": "./dist/extension",
"extensionDependencies": [
"intersystems-community.servermanager"
],
"contributes": {
"menus": {
"commandPalette": [
Expand Down Expand Up @@ -506,70 +509,96 @@
"objectscript.conn": {
"type": "object",
"description": "Server Access",
"scope": "resource"
},
"objectscript.conn.active": {
"description": "Active",
"type": "boolean",
"default": false
},
"objectscript.conn.host": {
"description": "Hostname",
"format": "hostname",
"type": "string",
"default": "localhost"
},
"objectscript.conn.port": {
"description": "Port number",
"type": "number",
"default": 52773
},
"objectscript.conn.username": {
"description": "Username",
"type": "string",
"default": "_SYSTEM"
},
"objectscript.conn.password": {
"description": "User's Password",
"type": "string",
"default": "SYS"
},
"objectscript.conn.ns": {
"description": "Server Namespace",
"type": "string",
"default": "USER"
},
"objectscript.conn.https": {
"description": "Use SSL to access to API",
"type": "boolean",
"default": false
},
"objectscript.conn.docker-compose": {
"description": "Connect to server running in docker-compose",
"type": "object",
"scope": "resource"
},
"objectscript.conn.docker-compose.service": {
"description": "Name of service in docker-compose",
"type": "string"
},
"objectscript.conn.docker-compose.internalPort": {
"description": "Target port inside the service in docker-compose",
"type": "number",
"default": 52773
},
"objectscript.conn.docker-compose.file": {
"description": "docker-compose file",
"type": "string",
"default": "docker-compose.yml"
},
"objectscript.conn.links": {
"description": "Extra links for the server",
"type": "object"
"scope": "resource",
"additionalProperties": false,
"required": [
"active"
],
"properties": {
"active": {
"type": "boolean",
"description": "This connection is active.",
"default": false
},
"server": {
"type": "string",
"pattern": "^[a-z0-9-._~]+$",
"markdownDescription": "Server defined in `#intersystems.servers#`"
},
"host": {
"type": "string",
"description": "Hostname or IP address of the web server.",
"anyOf": [
{
"format": "hostname"
},
{
"format": "ipv4"
},
{
"format": "ipv6"
}
],
"default": "localhost"
},
"port": {
"type": "integer",
"description": "TCP port number the web server listens on.",
"minimum": 1,
"maximum": 65535
},
"ns": {
"description": "Server namespace.",
"type": "string",
"default": "USER"
},
"username": {
"type": "string",
"description": "Username to connect as. If not set here it must be provided when connecting."
},
"password": {
"type": "string",
"description": "Password of username. If not set here it must be provided when connecting."
},
"https": {
"description": "Use SSL/TLS to access the server.",
"type": "boolean",
"default": false
},
"links": {
"description": "Extra links for the server.",
"type": "object",
"patternProperties": {
".*": {
"type": "string",
"format": "uri"
}
}
},
"docker-compose": {
"type": "object",
"description": "Connect to server running in docker-compose.",
"additionalProperties": false,
"properties": {
"service": {
"description": "Name of service in docker-compose.",
"type": "string"
},
"internalPort": {
"description": "Target port inside the service in docker-compose.",
"type": "number"
},
"file": {
"description": "Name of docker-compose file.",
"type": "string"
}
}
}
}
},
"objectscript.export": {
"type": "object",
"description": "Export only the necessary stuff ",
"description": "Export only the necessary stuff.",
"scope": "resource"
},
"objectscript.export.folder": {
Expand Down Expand Up @@ -782,8 +811,9 @@
"webpack-dev": "webpack --mode development --watch",
"package": "vsce package",
"compile": "webpack --mode production && tsc -p ./",
"test-compile": "webpack --mode development && tsc -p ./",
"watch": "tsc -w -p ./tsconfig.json",
"pretest": "npm run compile",
"pretest": "npm run test-compile",
"test": "node ./out/test/runTest.js",
"lint": "eslint src/**",
"lint-fix": "eslint --fix src/**",
Expand Down Expand Up @@ -812,6 +842,7 @@
"extend": "^3.0.2",
"minimist": ">=1.2.5",
"mocha": "^8.0.1",
"nock": "^13.0.0",
"prettier": "^2.0.5",
"tape": "^5.0.1",
"ts-loader": "^7.0.5",
Expand Down
71 changes: 71 additions & 0 deletions src/api/atelier.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/**
* Atelier API
*/

interface ResponseStatus {
errors: string[];
summary: string;
}

interface Content<T> {
content: T;
}

export interface Response<T = any> {
status: ResponseStatus;
console: string[];
result: T;
}

interface ServerInfoFeature {
name: string;
enabled: string;
}

export interface Document {
name: string;
db: string;
ts: string;
upd: boolean;
cat: "RTN" | "CLS" | "CSP" | "OTH";
status: string;
enc: boolean;
flags: number;
content: string[];
ext: string;
}

export interface ServerInfo {
version: string;
id: string;
api: number;
features: ServerInfoFeature[];
namespaces: string[];
}

export interface SearchMatch {
text: string;
line?: number;
member?: string;
attr?: string;
attrline?: number;
}

export interface SearchResult {
doc: string;
matches: SearchMatch[];
}

export interface AtelierJob {
pid: number;
namespace: string;
routine: string;
state: string;
device: string;
}

export interface DeleteStatus {
name: string;
db: string;
status: string;
}
Loading