@rindo/core 2.16.0 → 2.16.1-0

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/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Rindo CLI (CommonJS) v2.16.0 | MIT Licensed | https://rindojs.web.app
2
+ Rindo CLI (CommonJS) v2.16.1-0 | MIT Licensed | https://rindojs.web.app
3
3
  */
4
4
  'use strict';
5
5
 
@@ -118,6 +118,8 @@ const TASK_CANCELED_MSG = `task canceled`;
118
118
  * Forward-slash paths can be used in Windows as long as they're not
119
119
  * extended-length paths and don't contain any non-ascii characters.
120
120
  * This was created since the path methods in Node.js outputs \\ paths on Windows.
121
+ * @param path the Windows-based path to convert
122
+ * @returns the converted path
121
123
  */
122
124
  const normalizePath = (path) => {
123
125
  if (typeof path !== 'string') {
@@ -530,7 +532,7 @@ const getNpmConfigEnvArgs = (sys) => {
530
532
  const dependencies = [
531
533
  {
532
534
  name: "@rindo/core",
533
- version: "2.16.0",
535
+ version: "2.16.1-0",
534
536
  main: "compiler/rindo.js",
535
537
  resources: [
536
538
  "package.json",
@@ -1071,10 +1073,12 @@ const prepareData = async (coreCompiler, config, sys, duration_ms, component_cou
1071
1073
  };
1072
1074
  };
1073
1075
  /**
1074
- * Reads package-lock.json, yarn.lock, and package.json files in order to cross reference
1076
+ * Reads package-lock.json, yarn.lock, and package.json files in order to cross-reference
1075
1077
  * the dependencies and devDependencies properties. Pulls up the current installed version
1076
1078
  * of each package under the @rindo, @navify, and @jigra scopes.
1077
- * @returns string[]
1079
+ * @param sys the system instance where telemetry is invoked
1080
+ * @param config the Rindo configuration associated with the current task that triggered telemetry
1081
+ * @returns an object listing all dev and production dependencies under the aforementioned scopes
1078
1082
  */
1079
1083
  async function getInstalledPackages(sys, config) {
1080
1084
  let packages = [];
@@ -1153,7 +1157,12 @@ function sanitizeDeclaredVersion(version) {
1153
1157
  return version.replace(/[*^~]/g, '');
1154
1158
  }
1155
1159
  /**
1156
- * If telemetry is enabled, send a metric via IPC to a forked process for uploading.
1160
+ * If telemetry is enabled, send a metric to an external data store
1161
+ * @param sys the system instance where telemetry is invoked
1162
+ * @param config the Rindo configuration associated with the current task that triggered telemetry
1163
+ * @param name the name of a trackable metric. Note this name is not necessarily a scalar value to track, like
1164
+ * "Rindo Version". For example, "rindo_cli_command" is a name that is used to track all CLI command information.
1165
+ * @param value the data to send to the external data store under the provided name argument
1157
1166
  */
1158
1167
  async function sendMetric(sys, config, name, value) {
1159
1168
  const session_id = await getTelemetryToken(sys);
@@ -1466,7 +1475,10 @@ const getBoilerplateByExtension = (tagName, extension, withCss) => {
1466
1475
  }
1467
1476
  };
1468
1477
  /**
1469
- * Get the boilerplate for a component.
1478
+ * Get the boilerplate for a file containing the definition of a component
1479
+ * @param tagName the name of the tag to give the component
1480
+ * @param hasStyle designates if the component has an external stylesheet or not
1481
+ * @returns the contents of a file that defines a component
1470
1482
  */
1471
1483
  const getComponentBoilerplate = (tagName, hasStyle) => {
1472
1484
  const decorator = [`{`];
@@ -1500,7 +1512,9 @@ const getStyleUrlBoilerplate = () => `:host {
1500
1512
  }
1501
1513
  `;
1502
1514
  /**
1503
- * Get the boilerplate for a spec test.
1515
+ * Get the boilerplate for a file containing a spec (unit) test for a component
1516
+ * @param tagName the name of the tag associated with the component under test
1517
+ * @returns the contents of a file that unit tests a component
1504
1518
  */
1505
1519
  const getSpecTestBoilerplate = (tagName) => `import { newSpecPage } from '@rindo/core/testing';
1506
1520
  import { ${toPascalCase(tagName)} } from '../${tagName}';
@@ -1522,22 +1536,26 @@ describe('${tagName}', () => {
1522
1536
  });
1523
1537
  `;
1524
1538
  /**
1525
- * Get the boilerplate for an E2E test.
1539
+ * Get the boilerplate for a file containing an end-to-end (E2E) test for a component
1540
+ * @param tagName the name of the tag associated with the component under test
1541
+ * @returns the contents of a file that E2E tests a component
1526
1542
  */
1527
- const getE2eTestBoilerplate = (name) => `import { newE2EPage } from '@rindo/core/testing';
1543
+ const getE2eTestBoilerplate = (tagName) => `import { newE2EPage } from '@rindo/core/testing';
1528
1544
 
1529
- describe('${name}', () => {
1545
+ describe('${tagName}', () => {
1530
1546
  it('renders', async () => {
1531
1547
  const page = await newE2EPage();
1532
- await page.setContent('<${name}></${name}>');
1548
+ await page.setContent('<${tagName}></${tagName}>');
1533
1549
 
1534
- const element = await page.find('${name}');
1550
+ const element = await page.find('${tagName}');
1535
1551
  expect(element).toHaveClass('hydrated');
1536
1552
  });
1537
1553
  });
1538
1554
  `;
1539
1555
  /**
1540
1556
  * Convert a dash case string to pascal case.
1557
+ * @param str the string to convert
1558
+ * @returns the converted input as pascal case
1541
1559
  */
1542
1560
  const toPascalCase = (str) => str.split('-').reduce((res, part) => res + part[0].toUpperCase() + part.slice(1), '');
1543
1561
 
package/cli/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Rindo CLI v2.16.0 | MIT Licensed | https://rindojs.web.app
2
+ Rindo CLI v2.16.1-0 | MIT Licensed | https://rindojs.web.app
3
3
  */
4
4
  const toLowerCase = (str) => str.toLowerCase();
5
5
  const dashToPascalCase = (str) => toLowerCase(str)
@@ -94,6 +94,8 @@ const TASK_CANCELED_MSG = `task canceled`;
94
94
  * Forward-slash paths can be used in Windows as long as they're not
95
95
  * extended-length paths and don't contain any non-ascii characters.
96
96
  * This was created since the path methods in Node.js outputs \\ paths on Windows.
97
+ * @param path the Windows-based path to convert
98
+ * @returns the converted path
97
99
  */
98
100
  const normalizePath = (path) => {
99
101
  if (typeof path !== 'string') {
@@ -506,7 +508,7 @@ const getNpmConfigEnvArgs = (sys) => {
506
508
  const dependencies = [
507
509
  {
508
510
  name: "@rindo/core",
509
- version: "2.16.0",
511
+ version: "2.16.1-0",
510
512
  main: "compiler/rindo.js",
511
513
  resources: [
512
514
  "package.json",
@@ -1047,10 +1049,12 @@ const prepareData = async (coreCompiler, config, sys, duration_ms, component_cou
1047
1049
  };
1048
1050
  };
1049
1051
  /**
1050
- * Reads package-lock.json, yarn.lock, and package.json files in order to cross reference
1052
+ * Reads package-lock.json, yarn.lock, and package.json files in order to cross-reference
1051
1053
  * the dependencies and devDependencies properties. Pulls up the current installed version
1052
1054
  * of each package under the @rindo, @navify, and @jigra scopes.
1053
- * @returns string[]
1055
+ * @param sys the system instance where telemetry is invoked
1056
+ * @param config the Rindo configuration associated with the current task that triggered telemetry
1057
+ * @returns an object listing all dev and production dependencies under the aforementioned scopes
1054
1058
  */
1055
1059
  async function getInstalledPackages(sys, config) {
1056
1060
  let packages = [];
@@ -1129,7 +1133,12 @@ function sanitizeDeclaredVersion(version) {
1129
1133
  return version.replace(/[*^~]/g, '');
1130
1134
  }
1131
1135
  /**
1132
- * If telemetry is enabled, send a metric via IPC to a forked process for uploading.
1136
+ * If telemetry is enabled, send a metric to an external data store
1137
+ * @param sys the system instance where telemetry is invoked
1138
+ * @param config the Rindo configuration associated with the current task that triggered telemetry
1139
+ * @param name the name of a trackable metric. Note this name is not necessarily a scalar value to track, like
1140
+ * "Rindo Version". For example, "rindo_cli_command" is a name that is used to track all CLI command information.
1141
+ * @param value the data to send to the external data store under the provided name argument
1133
1142
  */
1134
1143
  async function sendMetric(sys, config, name, value) {
1135
1144
  const session_id = await getTelemetryToken(sys);
@@ -1442,7 +1451,10 @@ const getBoilerplateByExtension = (tagName, extension, withCss) => {
1442
1451
  }
1443
1452
  };
1444
1453
  /**
1445
- * Get the boilerplate for a component.
1454
+ * Get the boilerplate for a file containing the definition of a component
1455
+ * @param tagName the name of the tag to give the component
1456
+ * @param hasStyle designates if the component has an external stylesheet or not
1457
+ * @returns the contents of a file that defines a component
1446
1458
  */
1447
1459
  const getComponentBoilerplate = (tagName, hasStyle) => {
1448
1460
  const decorator = [`{`];
@@ -1476,7 +1488,9 @@ const getStyleUrlBoilerplate = () => `:host {
1476
1488
  }
1477
1489
  `;
1478
1490
  /**
1479
- * Get the boilerplate for a spec test.
1491
+ * Get the boilerplate for a file containing a spec (unit) test for a component
1492
+ * @param tagName the name of the tag associated with the component under test
1493
+ * @returns the contents of a file that unit tests a component
1480
1494
  */
1481
1495
  const getSpecTestBoilerplate = (tagName) => `import { newSpecPage } from '@rindo/core/testing';
1482
1496
  import { ${toPascalCase(tagName)} } from '../${tagName}';
@@ -1498,22 +1512,26 @@ describe('${tagName}', () => {
1498
1512
  });
1499
1513
  `;
1500
1514
  /**
1501
- * Get the boilerplate for an E2E test.
1515
+ * Get the boilerplate for a file containing an end-to-end (E2E) test for a component
1516
+ * @param tagName the name of the tag associated with the component under test
1517
+ * @returns the contents of a file that E2E tests a component
1502
1518
  */
1503
- const getE2eTestBoilerplate = (name) => `import { newE2EPage } from '@rindo/core/testing';
1519
+ const getE2eTestBoilerplate = (tagName) => `import { newE2EPage } from '@rindo/core/testing';
1504
1520
 
1505
- describe('${name}', () => {
1521
+ describe('${tagName}', () => {
1506
1522
  it('renders', async () => {
1507
1523
  const page = await newE2EPage();
1508
- await page.setContent('<${name}></${name}>');
1524
+ await page.setContent('<${tagName}></${tagName}>');
1509
1525
 
1510
- const element = await page.find('${name}');
1526
+ const element = await page.find('${tagName}');
1511
1527
  expect(element).toHaveClass('hydrated');
1512
1528
  });
1513
1529
  });
1514
1530
  `;
1515
1531
  /**
1516
1532
  * Convert a dash case string to pascal case.
1533
+ * @param str the string to convert
1534
+ * @returns the converted input as pascal case
1517
1535
  */
1518
1536
  const toPascalCase = (str) => str.split('-').reduce((res, part) => res + part[0].toUpperCase() + part.slice(1), '');
1519
1537
 
package/cli/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core/cli",
3
- "version": "2.16.0",
3
+ "version": "2.16.1-0",
4
4
  "description": "Rindo CLI.",
5
5
  "main": "./index.cjs",
6
6
  "module": "./index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core/compiler",
3
- "version": "2.16.0",
3
+ "version": "2.16.1-0",
4
4
  "description": "Rindo Compiler.",
5
5
  "main": "./rindo.js",
6
6
  "types": "./rindo.d.ts",