buckyos 0.7.146 → 0.7.148

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.
@@ -14874,6 +14874,16 @@ function precheckError(precheck) {
14874
14874
  { state: precheck.state, problems: precheck.problems }
14875
14875
  );
14876
14876
  }
14877
+ function productRunsContainers(rootDir) {
14878
+ var _a3;
14879
+ const fs = requireNode$1("node:fs");
14880
+ const path = requireNode$1("node:path");
14881
+ const file = path.join(rootDir, "etc", "product.json");
14882
+ if (!fs.existsSync(file))
14883
+ return true;
14884
+ const profile = JSON.parse(fs.readFileSync(file, "utf8"));
14885
+ return ((_a3 = profile.capabilities) == null ? void 0 : _a3.container) !== false;
14886
+ }
14877
14887
  async function generateMaterial(params, adminPassword, ownerKeyPair, deviceKeyPair) {
14878
14888
  const now = buckyosGetUnixTimestamp();
14879
14889
  const exp = now + ACTIVATION_DOCUMENT_VALIDITY_SECONDS;
@@ -14904,7 +14914,11 @@ async function generateMaterial(params, adminPassword, ownerKeyPair, deviceKeyPa
14904
14914
  params.deviceDid,
14905
14915
  now
14906
14916
  );
14907
- delete deviceDoc.support_container;
14917
+ if (productRunsContainers(params.rootDir)) {
14918
+ delete deviceDoc.support_container;
14919
+ } else {
14920
+ deviceDoc.support_container = false;
14921
+ }
14908
14922
  deviceDoc.owner = ownerDidStr;
14909
14923
  deviceDoc.zone_did = zoneDidStr;
14910
14924
  deviceDoc.net_id = ACTIVATION_NET_ID;