@pure-ds/core 0.5.13 → 0.5.15

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pure-ds/core",
3
3
  "shortname": "pds",
4
- "version": "0.5.13",
4
+ "version": "0.5.15",
5
5
  "description": "Pure Design System - Why develop a Design System when you can generate one?",
6
6
  "repository": {
7
7
  "type": "git",
@@ -32,6 +32,17 @@ function getNpmCommand() {
32
32
  return process.platform === 'win32' ? 'npm.cmd' : 'npm';
33
33
  }
34
34
 
35
+ async function getPdsCoreVersion() {
36
+ try {
37
+ const pkgPath = path.join(projectRoot, 'node_modules', '@pure-ds', 'core', 'package.json');
38
+ const raw = await readFile(pkgPath, 'utf8');
39
+ const pkg = JSON.parse(raw);
40
+ return pkg?.version || 'unknown';
41
+ } catch {
42
+ return 'unknown';
43
+ }
44
+ }
45
+
35
46
  async function readPackageJson() {
36
47
  const pkgPath = path.join(projectRoot, 'package.json');
37
48
  const raw = await readFile(pkgPath, 'utf8');
@@ -387,7 +398,7 @@ function startReloadServer() {
387
398
  'Access-Control-Allow-Origin': '*'
388
399
  });
389
400
 
390
- res.write('retry: 1000\n\n');
401
+ res.write('retry: 1000\\n\\n');
391
402
  reloadClients.add(res);
392
403
 
393
404
  req.on('close', () => {
@@ -402,7 +413,7 @@ function startReloadServer() {
402
413
 
403
414
  function notifyReload() {
404
415
  for (const client of reloadClients) {
405
- client.write('data: reload\n\n');
416
+ client.write('data: reload\\n\\n');
406
417
  }
407
418
  }
408
419
 
@@ -467,7 +478,7 @@ function startReloadServer() {
467
478
  'Access-Control-Allow-Origin': '*'
468
479
  });
469
480
 
470
- res.write('retry: 1000\n\n');
481
+ res.write('retry: 1000\\n\\n');
471
482
  reloadClients.add(res);
472
483
 
473
484
  req.on('close', () => {
@@ -482,7 +493,7 @@ function startReloadServer() {
482
493
 
483
494
  function notifyReload() {
484
495
  for (const client of reloadClients) {
485
- client.write('data: reload\n\n');
496
+ client.write('data: reload\\n\\n');
486
497
  }
487
498
  }
488
499