juxscript 1.1.402 → 1.1.404
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{components → containers}/c.d.ts.map +1 -1
- package/dist/{components → containers}/c.js.map +1 -1
- package/dist/containers/flex.d.ts +49 -0
- package/dist/containers/flex.d.ts.map +1 -0
- package/dist/containers/flex.js +122 -0
- package/dist/containers/flex.js.map +1 -0
- package/dist/{components → containers}/g.d.ts.map +1 -1
- package/dist/{components → containers}/g.js.map +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/widgets/canvas.d.ts +31 -55
- package/dist/widgets/canvas.d.ts.map +1 -1
- package/dist/widgets/canvas.js +690 -539
- package/dist/widgets/canvas.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/barChart.d.ts +0 -119
- package/dist/components/barChart.d.ts.map +0 -1
- package/dist/components/barChart.js +0 -555
- package/dist/components/barChart.js.map +0 -1
- package/dist/components/container.d.ts +0 -58
- package/dist/components/container.d.ts.map +0 -1
- package/dist/components/container.js +0 -152
- package/dist/components/container.js.map +0 -1
- package/dist/components/grid.d.ts +0 -58
- package/dist/components/grid.d.ts.map +0 -1
- package/dist/components/grid.js +0 -128
- package/dist/components/grid.js.map +0 -1
- package/dist/components/lineChart.d.ts +0 -104
- package/dist/components/lineChart.d.ts.map +0 -1
- package/dist/components/lineChart.js +0 -466
- package/dist/components/lineChart.js.map +0 -1
- package/dist/components/pieChart.d.ts +0 -93
- package/dist/components/pieChart.d.ts.map +0 -1
- package/dist/components/pieChart.js +0 -397
- package/dist/components/pieChart.js.map +0 -1
- package/dist/components/stack.d.ts +0 -42
- package/dist/components/stack.d.ts.map +0 -1
- package/dist/components/stack.js +0 -109
- package/dist/components/stack.js.map +0 -1
- package/dist/devtools/devtools.d.ts +0 -3
- package/dist/devtools/devtools.d.ts.map +0 -1
- package/dist/devtools/devtools.js +0 -182
- package/dist/devtools/devtools.js.map +0 -1
- package/dist/primitives/button.d.ts +0 -53
- package/dist/primitives/button.d.ts.map +0 -1
- package/dist/primitives/button.js +0 -170
- package/dist/primitives/button.js.map +0 -1
- package/dist/primitives/c.d.ts +0 -53
- package/dist/primitives/c.d.ts.map +0 -1
- package/dist/primitives/c.js +0 -127
- package/dist/primitives/c.js.map +0 -1
- package/dist/primitives/checkbox.d.ts +0 -92
- package/dist/primitives/checkbox.d.ts.map +0 -1
- package/dist/primitives/checkbox.js +0 -217
- package/dist/primitives/checkbox.js.map +0 -1
- package/dist/primitives/data.d.ts +0 -58
- package/dist/primitives/data.d.ts.map +0 -1
- package/dist/primitives/data.js +0 -131
- package/dist/primitives/data.js.map +0 -1
- package/dist/primitives/grid.d.ts +0 -58
- package/dist/primitives/grid.d.ts.map +0 -1
- package/dist/primitives/grid.js +0 -128
- package/dist/primitives/grid.js.map +0 -1
- package/dist/primitives/include.d.ts +0 -86
- package/dist/primitives/include.d.ts.map +0 -1
- package/dist/primitives/include.js +0 -239
- package/dist/primitives/include.js.map +0 -1
- package/dist/primitives/indexDb.d.ts +0 -80
- package/dist/primitives/indexDb.d.ts.map +0 -1
- package/dist/primitives/indexDb.js +0 -253
- package/dist/primitives/indexDb.js.map +0 -1
- package/dist/primitives/input.d.ts +0 -88
- package/dist/primitives/input.d.ts.map +0 -1
- package/dist/primitives/input.js +0 -216
- package/dist/primitives/input.js.map +0 -1
- package/dist/primitives/link.d.ts +0 -51
- package/dist/primitives/link.d.ts.map +0 -1
- package/dist/primitives/link.js +0 -178
- package/dist/primitives/link.js.map +0 -1
- package/dist/primitives/list.d.ts +0 -66
- package/dist/primitives/list.d.ts.map +0 -1
- package/dist/primitives/list.js +0 -233
- package/dist/primitives/list.js.map +0 -1
- package/dist/primitives/nav.d.ts +0 -64
- package/dist/primitives/nav.d.ts.map +0 -1
- package/dist/primitives/nav.js +0 -236
- package/dist/primitives/nav.js.map +0 -1
- package/dist/primitives/radio.d.ts +0 -58
- package/dist/primitives/radio.d.ts.map +0 -1
- package/dist/primitives/radio.js +0 -135
- package/dist/primitives/radio.js.map +0 -1
- package/dist/primitives/routes.d.ts +0 -15
- package/dist/primitives/routes.d.ts.map +0 -1
- package/dist/primitives/routes.js +0 -34
- package/dist/primitives/routes.js.map +0 -1
- package/dist/primitives/select.d.ts +0 -67
- package/dist/primitives/select.d.ts.map +0 -1
- package/dist/primitives/select.js +0 -160
- package/dist/primitives/select.js.map +0 -1
- package/dist/primitives/style.d.ts +0 -27
- package/dist/primitives/style.d.ts.map +0 -1
- package/dist/primitives/style.js +0 -53
- package/dist/primitives/style.js.map +0 -1
- package/dist/primitives/table.d.ts +0 -83
- package/dist/primitives/table.d.ts.map +0 -1
- package/dist/primitives/table.js +0 -264
- package/dist/primitives/table.js.map +0 -1
- package/dist/primitives/tabs.d.ts +0 -75
- package/dist/primitives/tabs.d.ts.map +0 -1
- package/dist/primitives/tabs.js +0 -263
- package/dist/primitives/tabs.js.map +0 -1
- package/dist/primitives/tag.d.ts +0 -92
- package/dist/primitives/tag.d.ts.map +0 -1
- package/dist/primitives/tag.js +0 -151
- package/dist/primitives/tag.js.map +0 -1
- package/dist/services/db.d.ts +0 -44
- package/dist/services/db.d.ts.map +0 -1
- package/dist/services/db.js +0 -59
- package/dist/services/db.js.map +0 -1
- package/dist/services/email.d.ts +0 -50
- package/dist/services/email.d.ts.map +0 -1
- package/dist/services/email.js +0 -60
- package/dist/services/email.js.map +0 -1
- package/dist/services/s3.d.ts +0 -61
- package/dist/services/s3.d.ts.map +0 -1
- package/dist/services/s3.js +0 -79
- package/dist/services/s3.js.map +0 -1
- /package/dist/{components → containers}/c.d.ts +0 -0
- /package/dist/{components → containers}/c.js +0 -0
- /package/dist/{components → containers}/g.d.ts +0 -0
- /package/dist/{components → containers}/g.js +0 -0
package/dist/services/db.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* db.ts — Jux database service client
|
|
3
|
-
*
|
|
4
|
-
* JuxDb establishes connectivity to the `db` downstream service via the
|
|
5
|
-
* ApiGateway backend. It provides a domain-specific API for database
|
|
6
|
-
* operations; every method ultimately delegates to `this.call(path, options)`,
|
|
7
|
-
* which routes through the Jux Gateway transport layer.
|
|
8
|
-
*
|
|
9
|
-
* Usage in a .jux file:
|
|
10
|
-
* const api = await jux.gateway(username, password);
|
|
11
|
-
* const db = api.connect('db');
|
|
12
|
-
*
|
|
13
|
-
* // Check connectivity
|
|
14
|
-
* const ping = await db.health();
|
|
15
|
-
*
|
|
16
|
-
* // Query rows
|
|
17
|
-
* const result = await db.query('SELECT * FROM users WHERE active = ?', [1]);
|
|
18
|
-
* if (result.ok) { console.log(result.data); }
|
|
19
|
-
*
|
|
20
|
-
* // Execute a write statement
|
|
21
|
-
* await db.execute('INSERT INTO logs (msg) VALUES (?)', ['hello']);
|
|
22
|
-
*/
|
|
23
|
-
import { ApiGateway, JuxService, ApiResult, ApiCallOptions } from '../components/gateway.js';
|
|
24
|
-
export declare class JuxDb extends JuxService {
|
|
25
|
-
constructor(gateway: ApiGateway);
|
|
26
|
-
/** Verify connectivity to the db downstream service. */
|
|
27
|
-
health(): Promise<ApiResult>;
|
|
28
|
-
/**
|
|
29
|
-
* Execute a read query and return result rows.
|
|
30
|
-
*
|
|
31
|
-
* @param sql SQL statement to run (SELECT …)
|
|
32
|
-
* @param params Optional positional parameters
|
|
33
|
-
*/
|
|
34
|
-
query(sql: string, params?: any[]): Promise<ApiResult>;
|
|
35
|
-
/**
|
|
36
|
-
* Execute a write statement (INSERT / UPDATE / DELETE).
|
|
37
|
-
*
|
|
38
|
-
* @param sql SQL statement to run
|
|
39
|
-
* @param params Optional positional parameters
|
|
40
|
-
*/
|
|
41
|
-
execute(sql: string, params?: any[]): Promise<ApiResult>;
|
|
42
|
-
}
|
|
43
|
-
export { ApiCallOptions, ApiResult };
|
|
44
|
-
//# sourceMappingURL=db.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"db.d.ts","sourceRoot":"","sources":["../../lib/services/db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,cAAc,EAA2B,MAAM,0BAA0B,CAAC;AAEtH,qBAAa,KAAM,SAAQ,UAAU;gBACrB,OAAO,EAAE,UAAU;IAI/B,wDAAwD;IAClD,MAAM,IAAI,OAAO,CAAC,SAAS,CAAC;IAIlC;;;;;OAKG;IACG,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,SAAS,CAAC;IAO5D;;;;;OAKG;IACG,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,SAAS,CAAC;CAMjE;AAKD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,CAAC"}
|
package/dist/services/db.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* db.ts — Jux database service client
|
|
3
|
-
*
|
|
4
|
-
* JuxDb establishes connectivity to the `db` downstream service via the
|
|
5
|
-
* ApiGateway backend. It provides a domain-specific API for database
|
|
6
|
-
* operations; every method ultimately delegates to `this.call(path, options)`,
|
|
7
|
-
* which routes through the Jux Gateway transport layer.
|
|
8
|
-
*
|
|
9
|
-
* Usage in a .jux file:
|
|
10
|
-
* const api = await jux.gateway(username, password);
|
|
11
|
-
* const db = api.connect('db');
|
|
12
|
-
*
|
|
13
|
-
* // Check connectivity
|
|
14
|
-
* const ping = await db.health();
|
|
15
|
-
*
|
|
16
|
-
* // Query rows
|
|
17
|
-
* const result = await db.query('SELECT * FROM users WHERE active = ?', [1]);
|
|
18
|
-
* if (result.ok) { console.log(result.data); }
|
|
19
|
-
*
|
|
20
|
-
* // Execute a write statement
|
|
21
|
-
* await db.execute('INSERT INTO logs (msg) VALUES (?)', ['hello']);
|
|
22
|
-
*/
|
|
23
|
-
import { JuxService, _registerServiceFactory } from '../components/gateway.js';
|
|
24
|
-
export class JuxDb extends JuxService {
|
|
25
|
-
constructor(gateway) {
|
|
26
|
-
super(gateway, 'db');
|
|
27
|
-
}
|
|
28
|
-
/** Verify connectivity to the db downstream service. */
|
|
29
|
-
async health() {
|
|
30
|
-
return this.call('health');
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Execute a read query and return result rows.
|
|
34
|
-
*
|
|
35
|
-
* @param sql SQL statement to run (SELECT …)
|
|
36
|
-
* @param params Optional positional parameters
|
|
37
|
-
*/
|
|
38
|
-
async query(sql, params) {
|
|
39
|
-
return this.call('query', {
|
|
40
|
-
method: 'POST',
|
|
41
|
-
body: { sql, params },
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Execute a write statement (INSERT / UPDATE / DELETE).
|
|
46
|
-
*
|
|
47
|
-
* @param sql SQL statement to run
|
|
48
|
-
* @param params Optional positional parameters
|
|
49
|
-
*/
|
|
50
|
-
async execute(sql, params) {
|
|
51
|
-
return this.call('execute', {
|
|
52
|
-
method: 'POST',
|
|
53
|
-
body: { sql, params },
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
// Register this service so ApiGateway.connect('db') returns a JuxDb instance.
|
|
58
|
-
_registerServiceFactory('db', (gw) => new JuxDb(gw));
|
|
59
|
-
//# sourceMappingURL=db.js.map
|
package/dist/services/db.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"db.js","sourceRoot":"","sources":["../../lib/services/db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAc,UAAU,EAA6B,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAEtH,MAAM,OAAO,KAAM,SAAQ,UAAU;IACjC,YAAY,OAAmB;QAC3B,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACzB,CAAC;IAED,wDAAwD;IACxD,KAAK,CAAC,MAAM;QACR,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC/B,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,KAAK,CAAC,GAAW,EAAE,MAAc;QACnC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACtB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE;SACxB,CAAC,CAAC;IACP,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,OAAO,CAAC,GAAW,EAAE,MAAc;QACrC,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACxB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE;SACxB,CAAC,CAAC;IACP,CAAC;CACJ;AAED,8EAA8E;AAC9E,uBAAuB,CAAC,IAAI,EAAE,CAAC,EAAc,EAAE,EAAE,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC"}
|
package/dist/services/email.d.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* email.ts — Jux email service client
|
|
3
|
-
*
|
|
4
|
-
* JuxEmail establishes connectivity to the `email` downstream service via the
|
|
5
|
-
* ApiGateway backend. It provides a domain-specific API for email operations;
|
|
6
|
-
* every method ultimately delegates to `this.call(path, options)`, which routes
|
|
7
|
-
* through the Jux Gateway transport layer.
|
|
8
|
-
*
|
|
9
|
-
* Usage in a .jux file:
|
|
10
|
-
* const api = await jux.gateway(username, password);
|
|
11
|
-
* const email = api.connect('email');
|
|
12
|
-
*
|
|
13
|
-
* // Inspect service settings (configured sender, templates, limits, etc.)
|
|
14
|
-
* const cfg = await email.settings();
|
|
15
|
-
*
|
|
16
|
-
* // Send a plain-text email
|
|
17
|
-
* await email.send('recipient@example.com', 'Hello', 'Plain-text body');
|
|
18
|
-
*
|
|
19
|
-
* // Send an HTML email
|
|
20
|
-
* await email.send('recipient@example.com', 'Hello', 'Plain text', '<b>HTML body</b>');
|
|
21
|
-
*/
|
|
22
|
-
import { ApiGateway, JuxService, ApiResult, ApiCallOptions } from '../components/gateway.js';
|
|
23
|
-
export declare class JuxEmail extends JuxService {
|
|
24
|
-
constructor(gateway: ApiGateway);
|
|
25
|
-
/**
|
|
26
|
-
* Retrieve the email service settings (configured sender address, available
|
|
27
|
-
* templates, sending limits, etc.).
|
|
28
|
-
*
|
|
29
|
-
* @returns ApiResult where `data` contains the service configuration object.
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* const cfg = await email.settings();
|
|
33
|
-
* if (cfg.ok) { console.log(cfg.data); }
|
|
34
|
-
*/
|
|
35
|
-
settings(): Promise<ApiResult>;
|
|
36
|
-
/**
|
|
37
|
-
* Send an email through the email downstream service.
|
|
38
|
-
*
|
|
39
|
-
* @param to Recipient email address
|
|
40
|
-
* @param subject Email subject line
|
|
41
|
-
* @param text Plain-text body
|
|
42
|
-
* @param html Optional HTML body (falls back to `text` when omitted)
|
|
43
|
-
*
|
|
44
|
-
* @example
|
|
45
|
-
* await email.send('user@example.com', 'Welcome!', 'Thanks for joining.');
|
|
46
|
-
*/
|
|
47
|
-
send(to: string, subject: string, text: string, html?: string): Promise<ApiResult>;
|
|
48
|
-
}
|
|
49
|
-
export { ApiCallOptions, ApiResult };
|
|
50
|
-
//# sourceMappingURL=email.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../lib/services/email.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,cAAc,EAA2B,MAAM,0BAA0B,CAAC;AAEtH,qBAAa,QAAS,SAAQ,UAAU;gBACxB,OAAO,EAAE,UAAU;IAI/B;;;;;;;;;OASG;IACG,QAAQ,IAAI,OAAO,CAAC,SAAS,CAAC;IAIpC;;;;;;;;;;OAUG;IACG,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;CAM3F;AAKD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,CAAC"}
|
package/dist/services/email.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* email.ts — Jux email service client
|
|
3
|
-
*
|
|
4
|
-
* JuxEmail establishes connectivity to the `email` downstream service via the
|
|
5
|
-
* ApiGateway backend. It provides a domain-specific API for email operations;
|
|
6
|
-
* every method ultimately delegates to `this.call(path, options)`, which routes
|
|
7
|
-
* through the Jux Gateway transport layer.
|
|
8
|
-
*
|
|
9
|
-
* Usage in a .jux file:
|
|
10
|
-
* const api = await jux.gateway(username, password);
|
|
11
|
-
* const email = api.connect('email');
|
|
12
|
-
*
|
|
13
|
-
* // Inspect service settings (configured sender, templates, limits, etc.)
|
|
14
|
-
* const cfg = await email.settings();
|
|
15
|
-
*
|
|
16
|
-
* // Send a plain-text email
|
|
17
|
-
* await email.send('recipient@example.com', 'Hello', 'Plain-text body');
|
|
18
|
-
*
|
|
19
|
-
* // Send an HTML email
|
|
20
|
-
* await email.send('recipient@example.com', 'Hello', 'Plain text', '<b>HTML body</b>');
|
|
21
|
-
*/
|
|
22
|
-
import { JuxService, _registerServiceFactory } from '../components/gateway.js';
|
|
23
|
-
export class JuxEmail extends JuxService {
|
|
24
|
-
constructor(gateway) {
|
|
25
|
-
super(gateway, 'email');
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Retrieve the email service settings (configured sender address, available
|
|
29
|
-
* templates, sending limits, etc.).
|
|
30
|
-
*
|
|
31
|
-
* @returns ApiResult where `data` contains the service configuration object.
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* const cfg = await email.settings();
|
|
35
|
-
* if (cfg.ok) { console.log(cfg.data); }
|
|
36
|
-
*/
|
|
37
|
-
async settings() {
|
|
38
|
-
return this.call('settings');
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Send an email through the email downstream service.
|
|
42
|
-
*
|
|
43
|
-
* @param to Recipient email address
|
|
44
|
-
* @param subject Email subject line
|
|
45
|
-
* @param text Plain-text body
|
|
46
|
-
* @param html Optional HTML body (falls back to `text` when omitted)
|
|
47
|
-
*
|
|
48
|
-
* @example
|
|
49
|
-
* await email.send('user@example.com', 'Welcome!', 'Thanks for joining.');
|
|
50
|
-
*/
|
|
51
|
-
async send(to, subject, text, html) {
|
|
52
|
-
return this.call('send', {
|
|
53
|
-
method: 'POST',
|
|
54
|
-
body: { to, subject, text, html },
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
// Register this service so ApiGateway.connect('email') returns a JuxEmail instance.
|
|
59
|
-
_registerServiceFactory('email', (gw) => new JuxEmail(gw));
|
|
60
|
-
//# sourceMappingURL=email.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"email.js","sourceRoot":"","sources":["../../lib/services/email.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAc,UAAU,EAA6B,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAEtH,MAAM,OAAO,QAAS,SAAQ,UAAU;IACpC,YAAY,OAAmB;QAC3B,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC5B,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,QAAQ;QACV,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACjC,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,IAAI,CAAC,EAAU,EAAE,OAAe,EAAE,IAAY,EAAE,IAAa;QAC/D,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YACrB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE;SACpC,CAAC,CAAC;IACP,CAAC;CACJ;AAED,oFAAoF;AACpF,uBAAuB,CAAC,OAAO,EAAE,CAAC,EAAc,EAAE,EAAE,CAAC,IAAI,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC"}
|
package/dist/services/s3.d.ts
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* s3.ts — Jux object-storage service client
|
|
3
|
-
*
|
|
4
|
-
* JuxS3 establishes connectivity to the `storage` downstream service via the
|
|
5
|
-
* ApiGateway backend. It provides a domain-specific API for S3-compatible
|
|
6
|
-
* object storage; every method ultimately delegates to `this.call(path, options)`,
|
|
7
|
-
* which routes through the Jux Gateway transport layer.
|
|
8
|
-
*
|
|
9
|
-
* Usage in a .jux file:
|
|
10
|
-
* const api = await jux.gateway(username, password);
|
|
11
|
-
* const store = api.connect('storage');
|
|
12
|
-
*
|
|
13
|
-
* // Check connectivity
|
|
14
|
-
* await store.health();
|
|
15
|
-
*
|
|
16
|
-
* // Upload an object
|
|
17
|
-
* await store.upload('avatars/user-1.png', imageBytes, 'image/png');
|
|
18
|
-
*
|
|
19
|
-
* // Download an object
|
|
20
|
-
* const file = await store.download('avatars/user-1.png');
|
|
21
|
-
*
|
|
22
|
-
* // List objects under a prefix
|
|
23
|
-
* const list = await store.list('avatars/');
|
|
24
|
-
*
|
|
25
|
-
* // Remove an object
|
|
26
|
-
* await store.remove('avatars/user-1.png');
|
|
27
|
-
*/
|
|
28
|
-
import { ApiGateway, JuxService, ApiResult, ApiCallOptions } from '../components/gateway.js';
|
|
29
|
-
export declare class JuxS3 extends JuxService {
|
|
30
|
-
constructor(gateway: ApiGateway);
|
|
31
|
-
/** Verify connectivity to the storage downstream service. */
|
|
32
|
-
health(): Promise<ApiResult>;
|
|
33
|
-
/**
|
|
34
|
-
* Upload an object to storage.
|
|
35
|
-
*
|
|
36
|
-
* @param key Object key (path within the bucket)
|
|
37
|
-
* @param data Content to upload (string, object, or binary data)
|
|
38
|
-
* @param contentType MIME type (default: 'application/octet-stream')
|
|
39
|
-
*/
|
|
40
|
-
upload(key: string, data: any, contentType?: string): Promise<ApiResult>;
|
|
41
|
-
/**
|
|
42
|
-
* Download an object from storage.
|
|
43
|
-
*
|
|
44
|
-
* @param key Object key to retrieve
|
|
45
|
-
*/
|
|
46
|
-
download(key: string): Promise<ApiResult>;
|
|
47
|
-
/**
|
|
48
|
-
* Remove an object from storage.
|
|
49
|
-
*
|
|
50
|
-
* @param key Object key to delete
|
|
51
|
-
*/
|
|
52
|
-
remove(key: string): Promise<ApiResult>;
|
|
53
|
-
/**
|
|
54
|
-
* List objects in storage, optionally filtered by prefix.
|
|
55
|
-
*
|
|
56
|
-
* @param prefix Optional key prefix to filter results
|
|
57
|
-
*/
|
|
58
|
-
list(prefix?: string): Promise<ApiResult>;
|
|
59
|
-
}
|
|
60
|
-
export { ApiCallOptions, ApiResult };
|
|
61
|
-
//# sourceMappingURL=s3.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"s3.d.ts","sourceRoot":"","sources":["../../lib/services/s3.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,cAAc,EAA2B,MAAM,0BAA0B,CAAC;AAEtH,qBAAa,KAAM,SAAQ,UAAU;gBACrB,OAAO,EAAE,UAAU;IAI/B,6DAA6D;IACvD,MAAM,IAAI,OAAO,CAAC,SAAS,CAAC;IAIlC;;;;;;OAMG;IACG,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,WAAW,GAAE,MAAmC,GAAG,OAAO,CAAC,SAAS,CAAC;IAQ1G;;;;OAIG;IACG,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IAI/C;;;;OAIG;IACG,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IAI7C;;;;OAIG;IACG,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;CAIlD;AAKD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,CAAC"}
|
package/dist/services/s3.js
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* s3.ts — Jux object-storage service client
|
|
3
|
-
*
|
|
4
|
-
* JuxS3 establishes connectivity to the `storage` downstream service via the
|
|
5
|
-
* ApiGateway backend. It provides a domain-specific API for S3-compatible
|
|
6
|
-
* object storage; every method ultimately delegates to `this.call(path, options)`,
|
|
7
|
-
* which routes through the Jux Gateway transport layer.
|
|
8
|
-
*
|
|
9
|
-
* Usage in a .jux file:
|
|
10
|
-
* const api = await jux.gateway(username, password);
|
|
11
|
-
* const store = api.connect('storage');
|
|
12
|
-
*
|
|
13
|
-
* // Check connectivity
|
|
14
|
-
* await store.health();
|
|
15
|
-
*
|
|
16
|
-
* // Upload an object
|
|
17
|
-
* await store.upload('avatars/user-1.png', imageBytes, 'image/png');
|
|
18
|
-
*
|
|
19
|
-
* // Download an object
|
|
20
|
-
* const file = await store.download('avatars/user-1.png');
|
|
21
|
-
*
|
|
22
|
-
* // List objects under a prefix
|
|
23
|
-
* const list = await store.list('avatars/');
|
|
24
|
-
*
|
|
25
|
-
* // Remove an object
|
|
26
|
-
* await store.remove('avatars/user-1.png');
|
|
27
|
-
*/
|
|
28
|
-
import { JuxService, _registerServiceFactory } from '../components/gateway.js';
|
|
29
|
-
export class JuxS3 extends JuxService {
|
|
30
|
-
constructor(gateway) {
|
|
31
|
-
super(gateway, 'storage');
|
|
32
|
-
}
|
|
33
|
-
/** Verify connectivity to the storage downstream service. */
|
|
34
|
-
async health() {
|
|
35
|
-
return this.call('health');
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Upload an object to storage.
|
|
39
|
-
*
|
|
40
|
-
* @param key Object key (path within the bucket)
|
|
41
|
-
* @param data Content to upload (string, object, or binary data)
|
|
42
|
-
* @param contentType MIME type (default: 'application/octet-stream')
|
|
43
|
-
*/
|
|
44
|
-
async upload(key, data, contentType = 'application/octet-stream') {
|
|
45
|
-
return this.call(`upload/${encodeURIComponent(key)}`, {
|
|
46
|
-
method: 'POST',
|
|
47
|
-
body: data,
|
|
48
|
-
headers: { 'Content-Type': contentType },
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Download an object from storage.
|
|
53
|
-
*
|
|
54
|
-
* @param key Object key to retrieve
|
|
55
|
-
*/
|
|
56
|
-
async download(key) {
|
|
57
|
-
return this.call(`download/${encodeURIComponent(key)}`);
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Remove an object from storage.
|
|
61
|
-
*
|
|
62
|
-
* @param key Object key to delete
|
|
63
|
-
*/
|
|
64
|
-
async remove(key) {
|
|
65
|
-
return this.call(`delete/${encodeURIComponent(key)}`, { method: 'DELETE' });
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* List objects in storage, optionally filtered by prefix.
|
|
69
|
-
*
|
|
70
|
-
* @param prefix Optional key prefix to filter results
|
|
71
|
-
*/
|
|
72
|
-
async list(prefix) {
|
|
73
|
-
const path = prefix ? `list/${encodeURIComponent(prefix)}` : 'list';
|
|
74
|
-
return this.call(path);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
// Register this service so ApiGateway.connect('storage') returns a JuxS3 instance.
|
|
78
|
-
_registerServiceFactory('storage', (gw) => new JuxS3(gw));
|
|
79
|
-
//# sourceMappingURL=s3.js.map
|
package/dist/services/s3.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"s3.js","sourceRoot":"","sources":["../../lib/services/s3.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAc,UAAU,EAA6B,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAEtH,MAAM,OAAO,KAAM,SAAQ,UAAU;IACjC,YAAY,OAAmB;QAC3B,KAAK,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IAC9B,CAAC;IAED,6DAA6D;IAC7D,KAAK,CAAC,MAAM;QACR,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC/B,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,MAAM,CAAC,GAAW,EAAE,IAAS,EAAE,cAAsB,0BAA0B;QACjF,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,kBAAkB,CAAC,GAAG,CAAC,EAAE,EAAE;YAClD,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,EAAE,cAAc,EAAE,WAAW,EAAE;SAC3C,CAAC,CAAC;IACP,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,QAAQ,CAAC,GAAW;QACtB,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,kBAAkB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,MAAM,CAAC,GAAW;QACpB,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,kBAAkB,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,IAAI,CAAC,MAAe;QACtB,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,QAAQ,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;QACpE,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;CACJ;AAED,mFAAmF;AACnF,uBAAuB,CAAC,SAAS,EAAE,CAAC,EAAc,EAAE,EAAE,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|