@karmaniverous/jeeves-meta 0.13.2 → 0.13.4

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.
@@ -12,8 +12,8 @@ import require$$2 from 'events';
12
12
  import vm from 'vm';
13
13
  import { z } from 'zod';
14
14
  import * as commander from 'commander';
15
- import { homedir, tmpdir } from 'node:os';
16
15
  import { execSync } from 'node:child_process';
16
+ import { homedir, tmpdir } from 'node:os';
17
17
  import { fileURLToPath } from 'node:url';
18
18
  import { readFile, unlink, mkdir, writeFile, copyFile } from 'node:fs/promises';
19
19
  import pino from 'pino';
@@ -7651,35 +7651,6 @@ const jeevesComponentDescriptorSchema = z.object({
7651
7651
  function getEffectiveServiceName(descriptor) {
7652
7652
  return descriptor.serviceName ?? `jeeves-${descriptor.name}`;
7653
7653
  }
7654
- /**
7655
- * Fetch JSON from a URL, throwing on non-OK responses.
7656
- *
7657
- * @param url - URL to fetch.
7658
- * @param init - Optional `fetch` init options.
7659
- * @returns Parsed JSON response body.
7660
- * @throws Error with `HTTP {status}: {body}` message on non-OK responses.
7661
- */
7662
- async function fetchJson(url, init) {
7663
- const res = await fetch(url, init);
7664
- if (!res.ok) {
7665
- throw new Error('HTTP ' + String(res.status) + ': ' + (await res.text()));
7666
- }
7667
- return res.json();
7668
- }
7669
- /**
7670
- * POST JSON to a URL and return parsed response.
7671
- *
7672
- * @param url - URL to POST to.
7673
- * @param body - Request body (will be JSON-stringified).
7674
- * @returns Parsed JSON response body.
7675
- */
7676
- async function postJson(url, body) {
7677
- return fetchJson(url, {
7678
- method: 'POST',
7679
- headers: { 'Content-Type': 'application/json' },
7680
- body: JSON.stringify(body),
7681
- });
7682
- }
7683
7654
 
7684
7655
  /**
7685
7656
  * Platform-aware service state detection.
@@ -8055,6 +8026,35 @@ function createServiceManager(descriptor) {
8055
8026
  return createLinuxManager(descriptor);
8056
8027
  }
8057
8028
  }
8029
+ /**
8030
+ * Fetch JSON from a URL, throwing on non-OK responses.
8031
+ *
8032
+ * @param url - URL to fetch.
8033
+ * @param init - Optional `fetch` init options.
8034
+ * @returns Parsed JSON response body.
8035
+ * @throws Error with `HTTP {status}: {body}` message on non-OK responses.
8036
+ */
8037
+ async function fetchJson(url, init) {
8038
+ const res = await fetch(url, init);
8039
+ if (!res.ok) {
8040
+ throw new Error('HTTP ' + String(res.status) + ': ' + (await res.text()));
8041
+ }
8042
+ return res.json();
8043
+ }
8044
+ /**
8045
+ * POST JSON to a URL and return parsed response.
8046
+ *
8047
+ * @param url - URL to POST to.
8048
+ * @param body - Request body (will be JSON-stringified).
8049
+ * @returns Parsed JSON response body.
8050
+ */
8051
+ async function postJson(url, body) {
8052
+ return fetchJson(url, {
8053
+ method: 'POST',
8054
+ headers: { 'Content-Type': 'application/json' },
8055
+ body: JSON.stringify(body),
8056
+ });
8057
+ }
8058
8058
 
8059
8059
  /**
8060
8060
  * Factory for the standard Jeeves service CLI.
package/dist/index.js CHANGED
@@ -14,8 +14,8 @@ import require$$2 from 'events';
14
14
  import vm from 'vm';
15
15
  import { z } from 'zod';
16
16
  import * as commander from 'commander';
17
- import { tmpdir } from 'node:os';
18
17
  import 'node:child_process';
18
+ import { tmpdir } from 'node:os';
19
19
  import pino from 'pino';
20
20
  import Handlebars from 'handlebars';
21
21
  import { Cron } from 'croner';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@karmaniverous/jeeves-meta",
3
- "version": "0.13.2",
3
+ "version": "0.13.4",
4
4
  "author": "Jason Williscroft",
5
5
  "description": "Fastify HTTP service for the Jeeves Meta synthesis engine",
6
6
  "license": "BSD-3-Clause",
@@ -41,7 +41,6 @@
41
41
  "node": ">=22"
42
42
  },
43
43
  "dependencies": {
44
- "@karmaniverous/jeeves": "^0.5.3",
45
44
  "commander": "^14",
46
45
  "croner": "^10",
47
46
  "fastify": "^5.8",