Skip to content

Commit e2f7242

Browse files
committed
initial support for server's settings from intersystems.servers
1 parent 7d8f3c8 commit e2f7242

File tree

12 files changed

+290
-135
lines changed

12 files changed

+290
-135
lines changed

package.json

Lines changed: 90 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -445,66 +445,96 @@
445445
"objectscript.conn": {
446446
"type": "object",
447447
"description": "Server Access",
448-
"scope": "resource"
449-
},
450-
"objectscript.conn.active": {
451-
"description": "Active",
452-
"type": "boolean",
453-
"default": false
454-
},
455-
"objectscript.conn.host": {
456-
"description": "Hostname",
457-
"format": "hostname",
458-
"type": "string",
459-
"default": "localhost"
460-
},
461-
"objectscript.conn.port": {
462-
"description": "Port number",
463-
"type": "number",
464-
"default": 52773
465-
},
466-
"objectscript.conn.username": {
467-
"description": "Username",
468-
"type": "string",
469-
"default": "_SYSTEM"
470-
},
471-
"objectscript.conn.password": {
472-
"description": "User's Password",
473-
"type": "string",
474-
"default": "SYS"
475-
},
476-
"objectscript.conn.ns": {
477-
"description": "Server Namespace",
478-
"type": "string",
479-
"default": "USER"
480-
},
481-
"objectscript.conn.https": {
482-
"description": "Use SSL to access to API",
483-
"type": "boolean",
484-
"default": false
485-
},
486-
"objectscript.conn.docker-compose": {
487-
"description": "Connect to server running in docker-compose",
488-
"type": "object",
489-
"scope": "resource"
490-
},
491-
"objectscript.conn.docker-compose.service": {
492-
"description": "Name of service in docker-compose",
493-
"type": "string"
494-
},
495-
"objectscript.conn.docker-compose.internalPort": {
496-
"description": "Target port inside the service in docker-compose",
497-
"type": "number",
498-
"default": 52773
499-
},
500-
"objectscript.conn.docker-compose.file": {
501-
"description": "docker-compose file",
502-
"type": "string",
503-
"default": "docker-compose.yml"
504-
},
505-
"objectscript.conn.links": {
506-
"description": "Extra links for the server",
507-
"type": "object"
448+
"scope": "resource",
449+
"additionalProperties": false,
450+
"default": {
451+
"active": true,
452+
"host": "localhost",
453+
"port": 52773,
454+
"ns": "USER"
455+
},
456+
"required": [
457+
"active"
458+
],
459+
"properties": {
460+
"active": {
461+
"type": "boolean",
462+
"description": "This connection is active"
463+
},
464+
"server": {
465+
"type": "string",
466+
"pattern": "^[A-Za-z0-9-._~]+$",
467+
"markdownDescription": "Server defined in `intersystems.servers`"
468+
},
469+
"host": {
470+
"type": "string",
471+
"description": "Hostname or IP address of the web server.",
472+
"anyOf": [
473+
{
474+
"format": "hostname"
475+
},
476+
{
477+
"format": "ipv4"
478+
},
479+
{
480+
"format": "ipv6"
481+
}
482+
],
483+
"default": "localhost"
484+
},
485+
"port": {
486+
"type": "integer",
487+
"description": "TCP port number the web server listens on.",
488+
"minimum": 1,
489+
"maximum": 65535,
490+
"default": 52773
491+
},
492+
"ns": {
493+
"description": "Server Namespace",
494+
"type": "string",
495+
"default": "USER"
496+
},
497+
"username": {
498+
"type": "string",
499+
"description": "Username to connect as. If not set here it must be provided when connecting.",
500+
"default": "_SYSTEM"
501+
},
502+
"password": {
503+
"type": "string",
504+
"description": "Password of username. If not set here it must be provided when connecting.",
505+
"default": "SYS"
506+
},
507+
"https": {
508+
"description": "Use SSL to access to API",
509+
"type": "boolean",
510+
"default": false
511+
},
512+
"links": {
513+
"description": "Extra links for the server",
514+
"type": "object"
515+
},
516+
"docker-compose": {
517+
"type": "object",
518+
"description": "Connect to server running in docker-compose",
519+
"additionalProperties": false,
520+
"properties": {
521+
"service": {
522+
"description": "Name of service in docker-compose",
523+
"type": "string"
524+
},
525+
"internalPort": {
526+
"description": "Target port inside the service in docker-compose",
527+
"type": "number",
528+
"default": 52773
529+
},
530+
"file": {
531+
"description": "docker-compose file",
532+
"type": "string",
533+
"default": "docker-compose.yml"
534+
}
535+
}
536+
}
537+
}
508538
},
509539
"objectscript.export": {
510540
"type": "object",

src/api/atelier.d.ts

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/**
2+
* Atelier API
3+
*/
4+
5+
interface ResponseStatus {
6+
errors: string[];
7+
summary: string;
8+
}
9+
10+
interface ResponseResult<T> {
11+
content: T;
12+
}
13+
14+
export interface Response<T = any> {
15+
status: ResponseStatus;
16+
console: string[];
17+
result: ResponseResult<T>;
18+
}
19+
20+
interface ServerInfoFeature {
21+
name: string;
22+
enabled: string;
23+
}
24+
25+
export interface ServerInfo {
26+
version: string;
27+
id: string;
28+
api: number;
29+
features: ServerInfoFeature[];
30+
namespaces: string[];
31+
}
32+
33+
export interface AtelierSearchMatch {
34+
text: string;
35+
line?: number;
36+
member?: string;
37+
attr?: string;
38+
attrline?: number;
39+
}
40+
41+
export interface AtelierSearchResult {
42+
doc: string;
43+
matches: AtelierSearchMatch[];
44+
}
45+
46+
export interface AtelierJob {
47+
pid: number;
48+
namespace: string;
49+
routine: string;
50+
state: string;
51+
device: string;
52+
}

0 commit comments

Comments
 (0)