@ndn/cli-common
Advanced tools
Comparing version 0.0.20220501 to 0.0.20230121
@@ -5,4 +5,4 @@ import { KeyChain } from "@ndn/keychain"; | ||
export declare function openKeyChain(): KeyChain; | ||
export declare function getSignerImpl(prefix?: Name): Promise<[name: Signer, klName?: Name]>; | ||
export declare function getSignerImpl(prefix?: Name): Promise<[signer: Signer, klName?: Name]>; | ||
/** Get the KeyChain signer specified by NDNTS_KEY environ. */ | ||
export declare function getSigner(): Promise<Signer>; |
@@ -1,3 +0,3 @@ | ||
export * from "./exit"; | ||
export { openKeyChain, getSigner } from "./keychain"; | ||
export { openUplinks, closeUplinks } from "./uplinks"; | ||
export * from "./exit.js"; | ||
export { openKeyChain, getSigner } from "./keychain.js"; | ||
export { openUplinks, closeUplinks } from "./uplinks.js"; |
{ | ||
"name": "@ndn/cli-common", | ||
"version": "0.0.20220501", | ||
"version": "0.0.20230121", | ||
"description": "NDNts: common routines for CLI programs", | ||
@@ -23,17 +23,16 @@ "keywords": [ | ||
"dependencies": { | ||
"@ndn/autoconfig": "0.0.20220501", | ||
"@ndn/dpdkmgmt": "0.0.20220501", | ||
"@ndn/fw": "0.0.20220501", | ||
"@ndn/keychain": "0.0.20220501", | ||
"@ndn/nfdmgmt": "0.0.20220501", | ||
"@ndn/node-transport": "0.0.20220501", | ||
"@ndn/packet": "0.0.20220501", | ||
"@ndn/util": "0.0.20220501", | ||
"@ndn/autoconfig": "0.0.20230121", | ||
"@ndn/dpdkmgmt": "0.0.20230121", | ||
"@ndn/fw": "0.0.20230121", | ||
"@ndn/keychain": "0.0.20230121", | ||
"@ndn/nfdmgmt": "0.0.20230121", | ||
"@ndn/node-transport": "0.0.20230121", | ||
"@ndn/packet": "0.0.20230121", | ||
"@ndn/util": "0.0.20230121", | ||
"@strattadb/environment": "^8.0.2", | ||
"dotenv": "^16.0.0", | ||
"tslib": "^2.4.0", | ||
"dotenv": "^16.0.3", | ||
"tslib": "^2.4.1", | ||
"wtfnode": "^0.9.1" | ||
}, | ||
"types": "lib/mod.d.ts", | ||
"readme": "# @ndn/cli-common\n\nThis package is part of [NDNts](https://yoursunny.com/p/NDNts/), Named Data Networking libraries for the modern web.\n\nThis package implements common routines for NDNts based CLI programs.\nIn particular, it initializes KeyChain and uplink faces.\nThese can be configured via environment variables.\nMoreover, environment variables in **.env** file will be loaded automatically.\n\n## KeyChain Configuration\n\n`NDNTS_KEYCHAIN` environment variable specifies the KeyChain locator, which is a filesystem path where KeyChain files are stored.\nIf empty, a temporary in-memory KeyChain will be used.\n\n`NDNTS_KEY` environment variable specifies the default signing key.\nIt's recommended to use a certificate name, but this can also be a key name or prefix of a subject name.\nIf empty, any key in the KeyChain may be used.\nIf the specified prefix does not match any existing key, digest signing will be used.\n\n## Logical Forwarder and Uplink Configuration\n\n`NDNTS_PKTTRACE=1` environment variable enables logical forwarder tracing.\n\n`NDNTS_UPLINK` environment variable creates an uplink to another forwarder/node.\nIt supports:\n\n* connect to NFD (or similar) via Unix socket, e.g. `unix:///run/nfd.sock`\n* connect to NFD via TCP, e.g. `tcp://192.0.2.1:6363`\n* connect to NFD via UDP unicast, e.g. `udp://192.0.2.1:6363`\n* connect to NDN-DPDK via UDP: `ndndpdk:` or `ndndpdk-udp:`\n* connect to NDN-DPDK via memif: `ndndpdk-memif:`\n* perform NDN-FCH query and connect to global NDN network: `autoconfig:` (prefer UDP) or `autoconfig-tcp:` (prefer TCP)\n\nThe default is:\n\n* Linux: `unix:///run/nfd.sock`\n* Windows: `tcp://127.0.0.1:6363`\n* other platforms: `unix:///var/run/nfd.sock`\n\n`NDNTS_MTU` environment variable sets the MTU for fragmentation of outgoing packets, applicable to UDP and memif.\nIt must be a positive integer, and the default value is 1450.\nIt's recommended to increase this value when using memif.\n\n`NDNTS_NFDREG=0` environment variable disables prefix registration on the uplink using NFD management protocol.\nThe default is enabling NFD prefix registration if the uplink is possibly connected to NFD.\n\n`NDNTS_NFDREGKEY` environment variable specifies the signing key for prefix registration commands.\nThis accepts the same syntax as `NDNTS_KEY`.\nThe default is using the same key as `NDNTS_KEY`.\n\n`NDNTS_NDNDPDK_GQLSERVER` environment variable specifies the NDN-DPDK GraphQL server endpoint.\nThe default is `http://127.0.0.1:3030`.\nThis is only used when `NDNTS_UPLINK` is set to `ndndpdk:` or `ndndpdk-memif:`.\n\n`NDNTS_NDNDPDK_LOCAL` environment variable specifies a local IP address that is reachable from NDN-DPDK.\nThe default is auto-detected from GraphQL HTTP client.\n\n`NDNTS_NDNDPDK_MEMIF_SOCKETPATH` environment variable specifies a directory for memif control socket.\nThe default is `/run/ndn`.\n\n## API\n\n`exitClosers` array allows schedule objects to be closed at exit.\n`exitHandler` function is registered as SIGINT handle that is triggered upon pressing CTRL+C, which closes the objects in `exitClosers`.\nYou may disable this handler with `process.off(\"SIGINT\", exitHandler)`.\n\n`openKeyChain` function returns the specified KeyChain.\n`getSigner` function returns a signer using the default signing key.\n\n`openUplinks` function creates the uplink.\nIt also enables prefix registration unless explicitly disabled.\n\n`closeUplinks` function closes the uplink.\nUplinks are also automatically closed at exit via `exitClosers`.\n" | ||
"types": "lib/mod.d.ts" | ||
} |
@@ -63,3 +63,3 @@ # @ndn/cli-common | ||
`exitClosers` array allows schedule objects to be closed at exit. | ||
`exitClosers` array allows scheduling objects to be closed at exit. | ||
`exitHandler` function is registered as SIGINT handle that is triggered upon pressing CTRL+C, which closes the objects in `exitClosers`. | ||
@@ -66,0 +66,0 @@ You may disable this handler with `process.off("SIGINT", exitHandler)`. |
Sorry, the diff of this file is not supported yet
21305
+ Added@graphql-typed-document-node/core@3.2.0(transitive)
+ Added@ndn/autoconfig@0.0.20230121(transitive)
+ Added@ndn/dpdkmgmt@0.0.20230121(transitive)
+ Added@ndn/endpoint@0.0.20230121(transitive)
+ Added@ndn/fw@0.0.20230121(transitive)
+ Added@ndn/keychain@0.0.20230121(transitive)
+ Added@ndn/l3face@0.0.20230121(transitive)
+ Added@ndn/lp@0.0.20230121(transitive)
+ Added@ndn/naming-convention2@0.0.20230121(transitive)
+ Added@ndn/nfdmgmt@0.0.20230121(transitive)
+ Added@ndn/node-transport@0.0.20230121(transitive)
+ Added@ndn/packet@0.0.20230121(transitive)
+ Added@ndn/quic-transport@0.0.20230121(transitive)
+ Added@ndn/tlv@0.0.20230121(transitive)
+ Added@ndn/util@0.0.20230121(transitive)
+ Added@ndn/ws-transport@0.0.20230121(transitive)
+ Added@noble/ed25519@1.7.3(transitive)
+ Added@yoursunny/webcrypto-ed25519@0.0.20221020(transitive)
+ Addedb64-lite@1.4.0(transitive)
+ Addedb64u-lite@1.1.0(transitive)
+ Addedbase-64@0.1.0(transitive)
+ Addedcompare-versions@5.0.3(transitive)
+ Addedevent-iterator@2.0.0(transitive)
+ Addedgraphql-request@5.2.0(transitive)
+ Addedhirestime@7.0.4(transitive)
+ Addedit-pushable@3.2.3(transitive)
+ Addedp-defer@4.0.1(transitive)
- Removed@ndn/autoconfig@0.0.20220501(transitive)
- Removed@ndn/dpdkmgmt@0.0.20220501(transitive)
- Removed@ndn/endpoint@0.0.20220501(transitive)
- Removed@ndn/fw@0.0.20220501(transitive)
- Removed@ndn/keychain@0.0.20220501(transitive)
- Removed@ndn/l3face@0.0.20220501(transitive)
- Removed@ndn/lp@0.0.20220501(transitive)
- Removed@ndn/naming-convention2@0.0.20220501(transitive)
- Removed@ndn/nfdmgmt@0.0.20220501(transitive)
- Removed@ndn/node-transport@0.0.20220501(transitive)
- Removed@ndn/packet@0.0.20220501(transitive)
- Removed@ndn/quic-transport@0.0.20220501(transitive)
- Removed@ndn/tlv@0.0.20220501(transitive)
- Removed@ndn/util@0.0.20220501(transitive)
- Removed@ndn/ws-transport@0.0.20220501(transitive)
- Removedgraphql-request@4.3.0(transitive)
- Removedhirestime@6.1.0(transitive)
- Removedit-pushable@2.0.2(transitive)
Updated@ndn/autoconfig@0.0.20230121
Updated@ndn/dpdkmgmt@0.0.20230121
Updated@ndn/fw@0.0.20230121
Updated@ndn/keychain@0.0.20230121
Updated@ndn/nfdmgmt@0.0.20230121
Updated@ndn/packet@0.0.20230121
Updated@ndn/util@0.0.20230121
Updateddotenv@^16.0.3
Updatedtslib@^2.4.1