Skip to content

Commit f00474d

Browse files
committed
initial support for server's settings from intersystems.servers
1 parent ef4f2f1 commit f00474d

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
@@ -506,66 +506,96 @@
506506
"objectscript.conn": {
507507
"type": "object",
508508
"description": "Server Access",
509-
"scope": "resource"
510-
},
511-
"objectscript.conn.active": {
512-
"description": "Active",
513-
"type": "boolean",
514-
"default": false
515-
},
516-
"objectscript.conn.host": {
517-
"description": "Hostname",
518-
"format": "hostname",
519-
"type": "string",
520-
"default": "localhost"
521-
},
522-
"objectscript.conn.port": {
523-
"description": "Port number",
524-
"type": "number",
525-
"default": 52773
526-
},
527-
"objectscript.conn.username": {
528-
"description": "Username",
529-
"type": "string",
530-
"default": "_SYSTEM"
531-
},
532-
"objectscript.conn.password": {
533-
"description": "User's Password",
534-
"type": "string",
535-
"default": "SYS"
536-
},
537-
"objectscript.conn.ns": {
538-
"description": "Server Namespace",
539-
"type": "string",
540-
"default": "USER"
541-
},
542-
"objectscript.conn.https": {
543-
"description": "Use SSL to access to API",
544-
"type": "boolean",
545-
"default": false
546-
},
547-
"objectscript.conn.docker-compose": {
548-
"description": "Connect to server running in docker-compose",
549-
"type": "object",
550-
"scope": "resource"
551-
},
552-
"objectscript.conn.docker-compose.service": {
553-
"description": "Name of service in docker-compose",
554-
"type": "string"
555-
},
556-
"objectscript.conn.docker-compose.internalPort": {
557-
"description": "Target port inside the service in docker-compose",
558-
"type": "number",
559-
"default": 52773
560-
},
561-
"objectscript.conn.docker-compose.file": {
562-
"description": "docker-compose file",
563-
"type": "string",
564-
"default": "docker-compose.yml"
565-
},
566-
"objectscript.conn.links": {
567-
"description": "Extra links for the server",
568-
"type": "object"
509+
"scope": "resource",
510+
"additionalProperties": false,
511+
"default": {
512+
"active": true,
513+
"host": "localhost",
514+
"port": 52773,
515+
"ns": "USER"
516+
},
517+
"required": [
518+
"active"
519+
],
520+
"properties": {
521+
"active": {
522+
"type": "boolean",
523+
"description": "This connection is active"
524+
},
525+
"server": {
526+
"type": "string",
527+
"pattern": "^[A-Za-z0-9-._~]+$",
528+
"markdownDescription": "Server defined in `intersystems.servers`"
529+
},
530+
"host": {
531+
"type": "string",
532+
"description": "Hostname or IP address of the web server.",
533+
"anyOf": [
534+
{
535+
"format": "hostname"
536+
},
537+
{
538+
"format": "ipv4"
539+
},
540+
{
541+
"format": "ipv6"
542+
}
543+
],
544+
"default": "localhost"
545+
},
546+
"port": {
547+
"type": "integer",
548+
"description": "TCP port number the web server listens on.",
549+
"minimum": 1,
550+
"maximum": 65535,
551+
"default": 52773
552+
},
553+
"ns": {
554+
"description": "Server Namespace",
555+
"type": "string",
556+
"default": "USER"
557+
},
558+
"username": {
559+
"type": "string",
560+
"description": "Username to connect as. If not set here it must be provided when connecting.",
561+
"default": "_SYSTEM"
562+
},
563+
"password": {
564+
"type": "string",
565+
"description": "Password of username. If not set here it must be provided when connecting.",
566+
"default": "SYS"
567+
},
568+
"https": {
569+
"description": "Use SSL to access to API",
570+
"type": "boolean",
571+
"default": false
572+
},
573+
"links": {
574+
"description": "Extra links for the server",
575+
"type": "object"
576+
},
577+
"docker-compose": {
578+
"type": "object",
579+
"description": "Connect to server running in docker-compose",
580+
"additionalProperties": false,
581+
"properties": {
582+
"service": {
583+
"description": "Name of service in docker-compose",
584+
"type": "string"
585+
},
586+
"internalPort": {
587+
"description": "Target port inside the service in docker-compose",
588+
"type": "number",
589+
"default": 52773
590+
},
591+
"file": {
592+
"description": "docker-compose file",
593+
"type": "string",
594+
"default": "docker-compose.yml"
595+
}
596+
}
597+
}
598+
}
569599
},
570600
"objectscript.export": {
571601
"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)