buckyos 0.7.136 → 0.7.138
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/cli/dist/cli.mjs +29 -3
- package/cli/dist/cli.mjs.map +1 -1
- package/cli/modules/ai.ts +30 -1
- package/cli/version.ts +1 -1
- package/dist/aicc_client.d.ts +428 -44
- package/dist/aicc_client.d.ts.map +1 -1
- package/dist/browser.cjs +1 -1
- package/dist/browser.mjs +42 -34
- package/dist/device_identity.d.ts +1 -1
- package/dist/device_identity.d.ts.map +1 -1
- package/dist/hybrid_sso.d.ts +1 -1
- package/dist/hybrid_sso.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +42 -34
- package/dist/ndm_proxy-67651066.js +13 -0
- package/dist/ndm_proxy-67651066.js.map +1 -0
- package/dist/{ndm_proxy-b5c95488.mjs → ndm_proxy-6b03b9ec.mjs} +319 -55
- package/dist/ndm_proxy-6b03b9ec.mjs.map +1 -0
- package/dist/node.cjs +1 -1
- package/dist/node.mjs +42 -34
- package/dist/provision.cjs +2 -2
- package/dist/provision.cjs.map +1 -1
- package/dist/provision.mjs +8 -4
- package/dist/provision.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/ndm_proxy-7cf15839.js +0 -13
- package/dist/ndm_proxy-7cf15839.js.map +0 -1
- package/dist/ndm_proxy-b5c95488.mjs.map +0 -1
package/dist/provision.mjs
CHANGED
|
@@ -111,11 +111,15 @@ async function loadLocalDeviceDocumentForRoots(roots, nodeIdentity, verify) {
|
|
|
111
111
|
}
|
|
112
112
|
return [deviceDocJwt, deviceDoc];
|
|
113
113
|
}
|
|
114
|
-
function saveNodeGatewayParams(etcDir, deviceDid) {
|
|
114
|
+
function saveNodeGatewayParams(etcDir, deviceDid, rtcpPort = 2980) {
|
|
115
|
+
if (!Number.isInteger(rtcpPort) || rtcpPort < 1 || rtcpPort > 65535) {
|
|
116
|
+
throw new Error(`invalid device RTCP port: ${rtcpPort}`);
|
|
117
|
+
}
|
|
115
118
|
const path = requireNode$3("node:path");
|
|
116
119
|
writeJsonPretty(path.join(etcDir, NODE_GATEWAY_PARAMS_FILE_NAME), {
|
|
117
120
|
params: {
|
|
118
|
-
device_did: asDid(deviceDid).toString()
|
|
121
|
+
device_did: asDid(deviceDid).toString(),
|
|
122
|
+
rtcp_port: String(rtcpPort)
|
|
119
123
|
}
|
|
120
124
|
});
|
|
121
125
|
}
|
|
@@ -126,7 +130,7 @@ function saveLocalDeviceIdentityForRoots(etcDir, roots, nodeIdentity, deviceDoc,
|
|
|
126
130
|
fs.mkdirSync(paths.publicDir, { recursive: true });
|
|
127
131
|
fs.mkdirSync(paths.securityDir, { recursive: true });
|
|
128
132
|
writeJsonPretty(path.join(etcDir, "node_identity.json"), nodeIdentity);
|
|
129
|
-
saveNodeGatewayParams(etcDir, nodeIdentity.device_did);
|
|
133
|
+
saveNodeGatewayParams(etcDir, nodeIdentity.device_did, deviceDoc.rtcp_port);
|
|
130
134
|
writeJsonPretty(paths.didJson, deviceDocumentToOrderedJson(deviceDoc));
|
|
131
135
|
fs.writeFileSync(paths.deviceDocJwt, deviceDocJwt);
|
|
132
136
|
fs.writeFileSync(paths.deviceMiniDocJwt, deviceMiniDocJwt);
|
|
@@ -14967,7 +14971,7 @@ async function generateMaterial(params, adminPassword, ownerKeyPair, deviceKeyPa
|
|
|
14967
14971
|
zoneDocumentJwt,
|
|
14968
14972
|
nodeIdentity,
|
|
14969
14973
|
startConfig,
|
|
14970
|
-
gatewayParams: { params: { device_did: deviceDidStr } },
|
|
14974
|
+
gatewayParams: { params: { device_did: deviceDidStr, rtcp_port: String(params.rtcpPort) } },
|
|
14971
14975
|
dnsRecords: buildActivationDnsRecords(params.domain, params.publicIp)
|
|
14972
14976
|
};
|
|
14973
14977
|
}
|