@onesi/genesis-cli 0.2.9 → 0.2.11

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/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  `genesis`, the OneOS command line. It works against the Genesis API at `https://os.one.ml/api`.
4
4
 
5
5
  ```sh
6
- npx -y @onesi/genesis-cli@0.2.9 --help
6
+ npx -y @onesi/genesis-cli@0.2.11 --help
7
7
  ```
8
8
 
9
9
  ## First run
@@ -19,6 +19,8 @@ export function registerHivesMarketplace(hives, deps) {
19
19
  m.command(`${action} <project_id>`).action(async (project) => output(await (await api())[action](project)));
20
20
  m.command('publish <project_id>').requiredOption('--request-file <path>', 'JSON publication with an owned uploaded module_hash and immutable version')
21
21
  .action(async (project, o) => output(await (await api()).publish(project, await read(o.requestFile, 512 * 1024))));
22
+ m.command('unpublish <project_id> <slug>').description('Archive an owned package: existing installs keep running; no new install, update or version')
23
+ .action(async (project, slug) => output(await (await api()).unpublish(project, slug)));
22
24
  for (const action of ['install', 'update'])
23
25
  m.command(`${action} <project_id> <slug>`).requiredOption('--request-file <path>', 'JSON version and env_overrides; use {} for defaults')
24
26
  .action(async (project, slug, o) => output(await (await api())[action](project, slug, await read(o.requestFile, 512 * 1024))));
package/dist/index.js CHANGED
@@ -47,7 +47,7 @@ export function buildProgram(deps = {}) {
47
47
  const auth = { ...authConfig(env, f), sleep: deps.sleep };
48
48
  const program = new Command('genesis')
49
49
  .description('One CLI for every Genesis service.')
50
- .version('0.2.9')
50
+ .version('0.2.11')
51
51
  .option('--json', 'machine-readable JSON output')
52
52
  .option('--api-key <key>', 'use this API key (default: GENESIS_API_KEY, then your `genesis login`)')
53
53
  .option('--base-url <url>', 'gateway URL (default: GENESIS_BASE_URL or https://os.one.ml/api)')
@@ -63,7 +63,7 @@ export function buildProgram(deps = {}) {
63
63
  const opts = {
64
64
  apiKey: o.apiKey ?? env.GENESIS_API_KEY, token: env.GENESIS_TOKEN,
65
65
  baseUrl: o.baseUrl ?? env.GENESIS_BASE_URL, routing: o.direct || env.GENESIS_ROUTING === 'direct' ? 'direct' : 'gateway',
66
- fetch: f, userAgent: 'genesis-cli/0.2.9',
66
+ fetch: f, userAgent: 'genesis-cli/0.2.11',
67
67
  credentials: store ? savedLoginProvider(auth, store) : undefined,
68
68
  };
69
69
  return new Genesis(hivesTransport ? { ...opts, fetch: createHivesNodeTransport(opts, deps.signal) } : opts);
@@ -284,7 +284,7 @@ export function buildProgram(deps = {}) {
284
284
  if (!key)
285
285
  throw new Error('Give the enrollment key with --key-file, --key-stdin or GENESIS_ENROLLMENT_KEY; it is never accepted as an argument.');
286
286
  const body = await readFunctionJson(o.bodyFile, 16 * 1024);
287
- const result = await new Genesis({ baseUrl: g().baseUrl ?? env.GENESIS_BASE_URL, fetch: f, userAgent: 'genesis-cli/0.2.9' }).iam.agents.enroll(key, body);
287
+ const result = await new Genesis({ baseUrl: g().baseUrl ?? env.GENESIS_BASE_URL, fetch: f, userAgent: 'genesis-cli/0.2.11' }).iam.agents.enroll(key, body);
288
288
  emit(result, () => JSON.stringify(result, null, 2));
289
289
  });
290
290
  // ---- auth ------------------------------------------------------------
@@ -836,7 +836,7 @@ export function buildProgram(deps = {}) {
836
836
  const url = `${base.href.replace(/\/+$/, '')}/v1/status`;
837
837
  let response;
838
838
  try {
839
- response = await f(url, { method: 'GET', headers: { accept: 'application/json', 'user-agent': 'genesis-cli/0.2.9' }, signal: AbortSignal.timeout(15_000) });
839
+ response = await f(url, { method: 'GET', headers: { accept: 'application/json', 'user-agent': 'genesis-cli/0.2.11' }, signal: AbortSignal.timeout(15_000) });
840
840
  }
841
841
  catch (e) {
842
842
  throw new Error(`Gateway unreachable at ${safe(url)}: ${safe(e.message)}`);
@@ -37,5 +37,6 @@ export const monitoringCommands = {
37
37
  'status-pages incidents list': 'relays_listStatusPageIncidents',
38
38
  'status-pages incidents create': 'relays_createStatusPageIncident',
39
39
  'status-pages subscribers list': 'relays_listStatusPageSubscribers',
40
+ 'status-pages subscribers create': 'relays_createStatusPageSubscriber',
40
41
  'status-pages subscribers delete': 'relays_deleteStatusPageSubscriber',
41
42
  };
@@ -1,6 +1,7 @@
1
1
  /** `genesis relays ...` words for the telemetry family (openapi/specs/relays/telemetry.openapi.yaml). */
2
2
  export const telemetryCommands = {
3
3
  'logs list': 'relays_listLogs',
4
+ 'logs live list': 'relays_listLiveLogs',
4
5
  'logs patterns list': 'relays_listLogPatterns',
5
6
  'logs patterns alert': 'relays_dispatchLogPatternAlerts',
6
7
  'logs policies list': 'relays_listLogPatternPolicies',
@@ -12,6 +13,7 @@ export const telemetryCommands = {
12
13
  'audit-logs export': 'relays_exportAuditLogs',
13
14
  'traces list': 'relays_listTraces',
14
15
  'analytics get': 'relays_getAnalytics',
16
+ 'events list': 'relays_listEvents',
15
17
  'errors projects list': 'relays_listErrorProjects',
16
18
  'errors projects create': 'relays_createErrorProject',
17
19
  'errors events send': 'relays_ingestErrorEvent',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onesi/genesis-cli",
3
- "version": "0.2.9",
3
+ "version": "0.2.11",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/l1felabs/genesis-api.git",
@@ -33,7 +33,7 @@
33
33
  "dependencies": {
34
34
  "commander": "^14.0.0",
35
35
  "undici": "6.29.0",
36
- "@onesi/genesis": "0.2.9"
36
+ "@onesi/genesis": "0.2.11"
37
37
  },
38
38
  "optionalDependencies": {
39
39
  "@napi-rs/keyring": "^1.2.0"