@carbonorm/carbonreact 3.3.10 → 3.3.11

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.
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env node
2
- "use strict";
3
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
4
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
5
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -36,8 +35,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
36
35
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
37
36
  }
38
37
  };
39
- Object.defineProperty(exports, "__esModule", { value: true });
40
- var fs_1 = require("fs");
38
+ var _this = this;
41
39
  var c = require('ansi-colors');
42
40
  // Create an object to store the parsed arguments
43
41
  var args = {
@@ -82,7 +80,7 @@ if (args.verbose) {
82
80
  var util = require('util');
83
81
  var exec = util.promisify(require('child_process').exec);
84
82
  var fs = require('fs');
85
- (function () { return __awaiter(void 0, void 0, void 0, function () {
83
+ (function () { return __awaiter(_this, void 0, void 0, function () {
86
84
  var jsonValidSqlFiles, validExternalRequests, ManifestFile, stdout, revision;
87
85
  return __generator(this, function (_a) {
88
86
  switch (_a.label) {
@@ -93,7 +91,8 @@ var fs = require('fs');
93
91
  if (file === ManifestFile) {
94
92
  return;
95
93
  }
96
- var resource = (0, fs_1.readFileSync)("".concat(args.inputDir).concat(file), 'utf8');
94
+ var readFileSync = require("fs").readFileSync;
95
+ var resource = readFileSync("".concat(args.inputDir).concat(file), 'utf8');
97
96
  var json = JSON.parse(resource);
98
97
  if (json === undefined) {
99
98
  console.error("Failed to parse ".concat(file, " as JSON"));
@@ -1,7 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import {readFile, readFileSync} from "fs";
4
-
5
3
  const c = require('ansi-colors');
6
4
 
7
5
  // Create an object to store the parsed arguments
@@ -91,6 +89,8 @@ const fs = require('fs');
91
89
 
92
90
  }
93
91
 
92
+ const {readFileSync} = require("fs");
93
+
94
94
  const resource = readFileSync(`${args.inputDir}${file}`, 'utf8');
95
95
 
96
96
  const json = JSON.parse(resource)
package/dist/index.cjs.js CHANGED
@@ -9,8 +9,6 @@ var classNames = require('classnames');
9
9
  var freeSolidSvgIcons = require('@fortawesome/free-solid-svg-icons');
10
10
  var reactFontawesome = require('@fortawesome/react-fontawesome');
11
11
  var Skeleton = require('react-loading-skeleton');
12
- var fs = require('fs');
13
- var util = require('util');
14
12
  var react$1 = require('@testing-library/react');
15
13
 
16
14
  function createCommonjsModule(fn, module) {
@@ -4254,6 +4252,8 @@ function ValidSQL (sql) {
4254
4252
  }
4255
4253
 
4256
4254
  function setupTests ({ sqlDirectory = './logs/rest/', logsDirectory = './logs/tests/' } = {}) {
4255
+ const fs = require("fs");
4256
+ const { inspect } = require("util");
4257
4257
  const originalWindowLocation = window.location;
4258
4258
  const consoleOriginal = console;
4259
4259
  const testName = () => expect.getState().currentTestName?.replaceAll(" ", "_").toLowerCase();
@@ -4267,7 +4267,7 @@ function setupTests ({ sqlDirectory = './logs/rest/', logsDirectory = './logs/te
4267
4267
  return response;
4268
4268
  });
4269
4269
  // @link https://stackoverflow.com/questions/13542667/create-directory-when-writing-to-file-in-node-js
4270
- const asyncFileLogging = async (...args) => fs.writeFileSync(logsFile(), '\n' + util.inspect(args.length === 1 ? args.pop() : args, false, 10, true), { flag: "a+" });
4270
+ const asyncFileLogging = async (...args) => fs.writeFileSync(logsFile(), '\n' + inspect(args.length === 1 ? args.pop() : args, false, 10, true), { flag: "a+" });
4271
4271
  global.console = {
4272
4272
  ...console,
4273
4273
  // use jest.fn() to silence, comment out to leave as it is