@rine-network/cli 0.11.6 → 0.11.7
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/main.js +4 -10
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
|
-
import { Command } from "commander";
|
|
2
|
+
import { Command, Option } from "commander";
|
|
3
3
|
import { FUNNEL_TIERS, HttpClient, IdempotencyStore, RineApiError, UUID_RE, addMlsGroupMember, agentKeysExist, agentLabel, buildIssueCertDeps, cacheToken, connectTunnel, decryptGroupMessage, decryptMessage, deleteHookSecret, encryptGroupMessage, encryptMessage, encryptMlsGroupMessage, ensureCert, externalJoinMlsGroup, fetchAgents, fetchAndIngestPendingSKDistributions, fetchOAuthToken, fetchRecipientKeys, formatError, fromBase64Url, generateAgentKeys, generateHookSecret, generatePqKeyPair, getAgentPublicKeys, getCredentialEntry, getOrCreateSenderKey, getOrRefreshToken, handleWebhookRequest, ingestSenderKeyDistribution, initMlsGroup, isBareAgentName, isValidHookName, listMyInvites, loadAgentKeys, loadCredentials, loadHookSecret, loadMeta, loadMlsState, loadTokenCache, normalizeHandle, performAgentCreation, performRegistration, processMlsWelcomes, renewalDueWithJitter, resolveAgent, resolveApiUrl, resolveConfigDir, resolveHandleViaWebFinger, resolveToUuid, saveAgentKeys, saveCredentials, saveHookSecret, savePqEncryptionKey, saveTokenCache, sendGroupInviteNotification, startTlsListener, syncMlsGroup, toBase64Url, validateEncryptionKey, validateSigningKey, validateSlug } from "@rine-network/core";
|
|
4
4
|
import readline from "node:readline";
|
|
5
5
|
import * as fs from "node:fs";
|
|
@@ -924,7 +924,7 @@ function resolveTier(raw) {
|
|
|
924
924
|
}
|
|
925
925
|
function registerHook(program) {
|
|
926
926
|
const hook = program.command("hook").description("Manage inbound webhook funnel hooks");
|
|
927
|
-
hook.command("create").description("Allocate a funnel hook and print its GitHub setup (secret shown once)").option("--agent <id>", "Agent ID (defaults to your agent)").option("--name <name>", "Hook name (default: default)", "default").
|
|
927
|
+
hook.command("create").description("Allocate a funnel hook and print its GitHub setup (secret shown once)").option("--agent <id>", "Agent ID (defaults to your agent)").option("--name <name>", "Hook name (default: default)", "default").addOption(new Option("--tier <tier>", "TLS-termination override").hideHelp()).action(withClient(program, async ({ client, gOpts, apiUrl, configDir }, opts) => {
|
|
928
928
|
if (!isValidHookName(opts.name)) {
|
|
929
929
|
printError(`Invalid hook name '${opts.name}': use lowercase letters, digits and hyphens (max 32).`);
|
|
930
930
|
process.exitCode = 2;
|
|
@@ -960,7 +960,6 @@ function registerHook(program) {
|
|
|
960
960
|
else printTable(data.items.map((h) => ({
|
|
961
961
|
Name: h.hook_name,
|
|
962
962
|
Hostname: h.hostname,
|
|
963
|
-
Tier: h.termination,
|
|
964
963
|
Active: h.active,
|
|
965
964
|
Created: h.created_at
|
|
966
965
|
})));
|
|
@@ -992,8 +991,7 @@ function printCreated(created, secret, json) {
|
|
|
992
991
|
hook: {
|
|
993
992
|
name: created.hook_name,
|
|
994
993
|
hostname: created.hostname,
|
|
995
|
-
agent_id: created.agent_id
|
|
996
|
-
termination: created.termination
|
|
994
|
+
agent_id: created.agent_id
|
|
997
995
|
},
|
|
998
996
|
public_url: publicUrl,
|
|
999
997
|
secret,
|
|
@@ -1011,10 +1009,6 @@ function printCreated(created, secret, json) {
|
|
|
1011
1009
|
Field: "Hostname",
|
|
1012
1010
|
Value: created.hostname
|
|
1013
1011
|
},
|
|
1014
|
-
{
|
|
1015
|
-
Field: "Tier",
|
|
1016
|
-
Value: created.termination
|
|
1017
|
-
},
|
|
1018
1012
|
{
|
|
1019
1013
|
Field: "Payload URL",
|
|
1020
1014
|
Value: publicUrl
|
|
@@ -1933,7 +1927,7 @@ async function resolveHook(client, agentId, hookName) {
|
|
|
1933
1927
|
*/
|
|
1934
1928
|
var SharedEdgeNotSupportedError = class extends Error {
|
|
1935
1929
|
constructor() {
|
|
1936
|
-
super("This hook
|
|
1930
|
+
super("This hook was created with a TLS-termination mode this relay build does not support. Delete the hook and create a new one, or upgrade the CLI to a newer build.");
|
|
1937
1931
|
this.name = "SharedEdgeNotSupportedError";
|
|
1938
1932
|
}
|
|
1939
1933
|
};
|
package/package.json
CHANGED