vovk 1.1.3-beta.7 → 1.1.3

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/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  <!--
2
2
  TODO
3
- Common: patch version, renew deps
4
- vovk.dev: Review, OG image
3
+ Common: patch version, renew deps in all repos
5
4
 
6
5
  Minor
7
6
  vovk.dev: improve video, change theme on load (how?)
package/cli/server.cjs CHANGED
@@ -62,9 +62,6 @@ const showDiff = ({ addedKeys, removedKeys, constantName }) => {
62
62
 
63
63
  void writeEmptyMetadata();
64
64
 
65
- /** @type {NodeJS.Timeout} */
66
- let pingInterval;
67
-
68
65
  let is404Reported = false;
69
66
 
70
67
  /** @type {() => Promise<void>} */
@@ -91,14 +88,8 @@ const ping = async () => {
91
88
  });
92
89
  };
93
90
 
94
- // make initial ping
95
- setTimeout(() => void ping(), 1000 * 3);
96
-
97
- /** @type {() => void} */
98
- const constantlyPing = () => {
99
- clearInterval(pingInterval);
100
- pingInterval = setInterval(() => void ping(), 1000 * 3);
101
- };
91
+ // start pinging immediately
92
+ setInterval(() => void ping(), 1000 * 3);
102
93
 
103
94
  const server = http.createServer((req, res) => {
104
95
  if (req.method === 'POST' && req.url === '/__metadata') {
@@ -112,7 +103,7 @@ const server = http.createServer((req, res) => {
112
103
  req.on('end', async () => {
113
104
  try {
114
105
  /** @type {{ metadata: import('../src').VovkMetadata }} */
115
- const { metadata } = JSON.parse(body); // Parse the JSON data
106
+ const { metadata } = JSON.parse(body);
116
107
  const metadataWritten = metadata ? await writeMetadata(metadata) : { written: false, path: metadataPath };
117
108
  const vars = await getVars();
118
109
  const codeWritten = await generateClient(vars);
@@ -143,8 +134,6 @@ const server = http.createServer((req, res) => {
143
134
  console.info(` 🐺 Client generated in ${codeWritten.path}.`);
144
135
  }
145
136
  }
146
-
147
- constantlyPing();
148
137
  } catch (e) {
149
138
  const err = /** @type {Error} */ (e);
150
139
  res.writeHead(400, { 'Content-Type': 'text/plain' });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vovk",
3
- "version": "1.1.3-beta.7",
4
- "description": "REST for Next",
3
+ "version": "1.1.3",
4
+ "description": "REST for Next - Transforms Next.js into a powerful and extensible REST API platform",
5
5
  "bin": "./cli/index.cjs",
6
6
  "scripts": {
7
7
  "postinstall": "node ./cli/postinstall.cjs",