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.
Files changed (133) hide show
  1. package/dist/{components → containers}/c.d.ts.map +1 -1
  2. package/dist/{components → containers}/c.js.map +1 -1
  3. package/dist/containers/flex.d.ts +49 -0
  4. package/dist/containers/flex.d.ts.map +1 -0
  5. package/dist/containers/flex.js +122 -0
  6. package/dist/containers/flex.js.map +1 -0
  7. package/dist/{components → containers}/g.d.ts.map +1 -1
  8. package/dist/{components → containers}/g.js.map +1 -1
  9. package/dist/index.d.ts +6 -4
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +6 -4
  12. package/dist/index.js.map +1 -1
  13. package/dist/widgets/canvas.d.ts +31 -55
  14. package/dist/widgets/canvas.d.ts.map +1 -1
  15. package/dist/widgets/canvas.js +690 -539
  16. package/dist/widgets/canvas.js.map +1 -1
  17. package/package.json +1 -1
  18. package/dist/components/barChart.d.ts +0 -119
  19. package/dist/components/barChart.d.ts.map +0 -1
  20. package/dist/components/barChart.js +0 -555
  21. package/dist/components/barChart.js.map +0 -1
  22. package/dist/components/container.d.ts +0 -58
  23. package/dist/components/container.d.ts.map +0 -1
  24. package/dist/components/container.js +0 -152
  25. package/dist/components/container.js.map +0 -1
  26. package/dist/components/grid.d.ts +0 -58
  27. package/dist/components/grid.d.ts.map +0 -1
  28. package/dist/components/grid.js +0 -128
  29. package/dist/components/grid.js.map +0 -1
  30. package/dist/components/lineChart.d.ts +0 -104
  31. package/dist/components/lineChart.d.ts.map +0 -1
  32. package/dist/components/lineChart.js +0 -466
  33. package/dist/components/lineChart.js.map +0 -1
  34. package/dist/components/pieChart.d.ts +0 -93
  35. package/dist/components/pieChart.d.ts.map +0 -1
  36. package/dist/components/pieChart.js +0 -397
  37. package/dist/components/pieChart.js.map +0 -1
  38. package/dist/components/stack.d.ts +0 -42
  39. package/dist/components/stack.d.ts.map +0 -1
  40. package/dist/components/stack.js +0 -109
  41. package/dist/components/stack.js.map +0 -1
  42. package/dist/devtools/devtools.d.ts +0 -3
  43. package/dist/devtools/devtools.d.ts.map +0 -1
  44. package/dist/devtools/devtools.js +0 -182
  45. package/dist/devtools/devtools.js.map +0 -1
  46. package/dist/primitives/button.d.ts +0 -53
  47. package/dist/primitives/button.d.ts.map +0 -1
  48. package/dist/primitives/button.js +0 -170
  49. package/dist/primitives/button.js.map +0 -1
  50. package/dist/primitives/c.d.ts +0 -53
  51. package/dist/primitives/c.d.ts.map +0 -1
  52. package/dist/primitives/c.js +0 -127
  53. package/dist/primitives/c.js.map +0 -1
  54. package/dist/primitives/checkbox.d.ts +0 -92
  55. package/dist/primitives/checkbox.d.ts.map +0 -1
  56. package/dist/primitives/checkbox.js +0 -217
  57. package/dist/primitives/checkbox.js.map +0 -1
  58. package/dist/primitives/data.d.ts +0 -58
  59. package/dist/primitives/data.d.ts.map +0 -1
  60. package/dist/primitives/data.js +0 -131
  61. package/dist/primitives/data.js.map +0 -1
  62. package/dist/primitives/grid.d.ts +0 -58
  63. package/dist/primitives/grid.d.ts.map +0 -1
  64. package/dist/primitives/grid.js +0 -128
  65. package/dist/primitives/grid.js.map +0 -1
  66. package/dist/primitives/include.d.ts +0 -86
  67. package/dist/primitives/include.d.ts.map +0 -1
  68. package/dist/primitives/include.js +0 -239
  69. package/dist/primitives/include.js.map +0 -1
  70. package/dist/primitives/indexDb.d.ts +0 -80
  71. package/dist/primitives/indexDb.d.ts.map +0 -1
  72. package/dist/primitives/indexDb.js +0 -253
  73. package/dist/primitives/indexDb.js.map +0 -1
  74. package/dist/primitives/input.d.ts +0 -88
  75. package/dist/primitives/input.d.ts.map +0 -1
  76. package/dist/primitives/input.js +0 -216
  77. package/dist/primitives/input.js.map +0 -1
  78. package/dist/primitives/link.d.ts +0 -51
  79. package/dist/primitives/link.d.ts.map +0 -1
  80. package/dist/primitives/link.js +0 -178
  81. package/dist/primitives/link.js.map +0 -1
  82. package/dist/primitives/list.d.ts +0 -66
  83. package/dist/primitives/list.d.ts.map +0 -1
  84. package/dist/primitives/list.js +0 -233
  85. package/dist/primitives/list.js.map +0 -1
  86. package/dist/primitives/nav.d.ts +0 -64
  87. package/dist/primitives/nav.d.ts.map +0 -1
  88. package/dist/primitives/nav.js +0 -236
  89. package/dist/primitives/nav.js.map +0 -1
  90. package/dist/primitives/radio.d.ts +0 -58
  91. package/dist/primitives/radio.d.ts.map +0 -1
  92. package/dist/primitives/radio.js +0 -135
  93. package/dist/primitives/radio.js.map +0 -1
  94. package/dist/primitives/routes.d.ts +0 -15
  95. package/dist/primitives/routes.d.ts.map +0 -1
  96. package/dist/primitives/routes.js +0 -34
  97. package/dist/primitives/routes.js.map +0 -1
  98. package/dist/primitives/select.d.ts +0 -67
  99. package/dist/primitives/select.d.ts.map +0 -1
  100. package/dist/primitives/select.js +0 -160
  101. package/dist/primitives/select.js.map +0 -1
  102. package/dist/primitives/style.d.ts +0 -27
  103. package/dist/primitives/style.d.ts.map +0 -1
  104. package/dist/primitives/style.js +0 -53
  105. package/dist/primitives/style.js.map +0 -1
  106. package/dist/primitives/table.d.ts +0 -83
  107. package/dist/primitives/table.d.ts.map +0 -1
  108. package/dist/primitives/table.js +0 -264
  109. package/dist/primitives/table.js.map +0 -1
  110. package/dist/primitives/tabs.d.ts +0 -75
  111. package/dist/primitives/tabs.d.ts.map +0 -1
  112. package/dist/primitives/tabs.js +0 -263
  113. package/dist/primitives/tabs.js.map +0 -1
  114. package/dist/primitives/tag.d.ts +0 -92
  115. package/dist/primitives/tag.d.ts.map +0 -1
  116. package/dist/primitives/tag.js +0 -151
  117. package/dist/primitives/tag.js.map +0 -1
  118. package/dist/services/db.d.ts +0 -44
  119. package/dist/services/db.d.ts.map +0 -1
  120. package/dist/services/db.js +0 -59
  121. package/dist/services/db.js.map +0 -1
  122. package/dist/services/email.d.ts +0 -50
  123. package/dist/services/email.d.ts.map +0 -1
  124. package/dist/services/email.js +0 -60
  125. package/dist/services/email.js.map +0 -1
  126. package/dist/services/s3.d.ts +0 -61
  127. package/dist/services/s3.d.ts.map +0 -1
  128. package/dist/services/s3.js +0 -79
  129. package/dist/services/s3.js.map +0 -1
  130. /package/dist/{components → containers}/c.d.ts +0 -0
  131. /package/dist/{components → containers}/c.js +0 -0
  132. /package/dist/{components → containers}/g.d.ts +0 -0
  133. /package/dist/{components → containers}/g.js +0 -0
@@ -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"}
@@ -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
@@ -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"}
@@ -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"}
@@ -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"}
@@ -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"}
@@ -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
@@ -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