@underpostnet/underpost 2.97.0 → 2.97.1

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.
@@ -111,6 +111,29 @@ const DocumentService = {
111
111
  return reject(error);
112
112
  }),
113
113
  ),
114
+ high: (options = { params: {} }) =>
115
+ new Promise((resolve, reject) => {
116
+ const url = new URL(getApiBaseUrl({ id: 'public/high', endpoint }));
117
+ if (options.params) {
118
+ Object.keys(options.params).forEach((key) => url.searchParams.append(key, options.params[key]));
119
+ }
120
+ fetch(url, {
121
+ method: 'GET',
122
+ headers: headersFactory(),
123
+ credentials: 'include',
124
+ })
125
+ .then(async (res) => {
126
+ return await res.json();
127
+ })
128
+ .then((res) => {
129
+ logger.info(res);
130
+ return resolve(res);
131
+ })
132
+ .catch((error) => {
133
+ logger.error(error);
134
+ return reject(error);
135
+ });
136
+ }),
114
137
  };
115
138
 
116
139
  export { DocumentService };
package/src/index.js CHANGED
@@ -36,7 +36,7 @@ class Underpost {
36
36
  * @type {String}
37
37
  * @memberof Underpost
38
38
  */
39
- static version = 'v2.97.0';
39
+ static version = 'v2.97.1';
40
40
  /**
41
41
  * Repository cli API
42
42
  * @static
package/src/server/dns.js CHANGED
@@ -108,17 +108,17 @@ class Dns {
108
108
  * @memberof DnsManager
109
109
  */
110
110
  static setupNftables() {
111
- shellExec(`sudo nft add table inet filter 2>/dev/null || true`, { silent: true });
111
+ shellExec(`sudo nft add table inet filter 2>/dev/null`, { silent: true });
112
112
  shellExec(
113
- `sudo nft add chain inet filter input '{ type filter hook input priority 0; policy accept; }' 2>/dev/null || true`,
113
+ `sudo nft add chain inet filter input '{ type filter hook input priority 0; policy accept; }' 2>/dev/null`,
114
114
  { silent: true },
115
115
  );
116
116
  shellExec(
117
- `sudo nft add chain inet filter output '{ type filter hook output priority 0; policy accept; }' 2>/dev/null || true`,
117
+ `sudo nft add chain inet filter output '{ type filter hook output priority 0; policy accept; }' 2>/dev/null`,
118
118
  { silent: true },
119
119
  );
120
120
  shellExec(
121
- `sudo nft add chain inet filter forward '{ type filter hook forward priority 0; policy accept; }' 2>/dev/null || true`,
121
+ `sudo nft add chain inet filter forward '{ type filter hook forward priority 0; policy accept; }' 2>/dev/null`,
122
122
  { silent: true },
123
123
  );
124
124
  }