@carbonorm/carbonreact 3.3.10 → 3.3.12
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/compileValidSQL.cjs +4 -5
- package/compileValidSQL.tsx +2 -2
- package/dist/index.cjs.js +4 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +3 -4
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Errors/BackendThrowable.tsx +2 -3
- package/src/hoc/setupTests.tsx +3 -2
package/compileValidSQL.cjs
CHANGED
|
@@ -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
|
-
|
|
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(
|
|
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
|
|
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"));
|
package/compileValidSQL.tsx
CHANGED
|
@@ -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) {
|
|
@@ -1395,8 +1393,7 @@ function hexToRgb (hex) {
|
|
|
1395
1393
|
var styles = {"maintenance-hero":"C5KSPNF","maintenanceHero":"C5KSPNF","httpStatusCode":"NhyRQts","centeredContainer":"nA4Uno6","errorTextGeneral":"yJAgaUs","errorKeys":"SRIoY4m","error-values":"xQIsoNw","errorValues":"xQIsoNw","error-pre":"C6eWpJ3","errorPre":"C6eWpJ3","line-number":"NFRyo7M","lineNumber":"NFRyo7M","cl":"vR2jbfr","slide":"OO2C-Wp"};
|
|
1396
1394
|
|
|
1397
1395
|
function BackendThrowable() {
|
|
1398
|
-
const
|
|
1399
|
-
const bootstrap = CarbonORM.instance;
|
|
1396
|
+
const bootstrap = CarbonReact.instance;
|
|
1400
1397
|
const currentThrowable = bootstrap.state.backendThrowable[0];
|
|
1401
1398
|
console.log([bootstrap.state.backendThrowable, currentThrowable]);
|
|
1402
1399
|
return jsxRuntime_2("div", { className: styles.maintenanceHero, children: [jsxRuntime_1("h1", { className: styles.httpStatusCode, children: currentThrowable?.status || 500 }), jsxRuntime_1(OutsideClickHandler, { onOutsideClick: () => bootstrap.setState(currentState => ({ backendThrowable: currentState.backendThrowable.slice(1) })), children: jsxRuntime_1("div", { className: styles.centeredContainer, children: Object.keys(currentThrowable).map((key, index) => {
|
|
@@ -4254,6 +4251,8 @@ function ValidSQL (sql) {
|
|
|
4254
4251
|
}
|
|
4255
4252
|
|
|
4256
4253
|
function setupTests ({ sqlDirectory = './logs/rest/', logsDirectory = './logs/tests/' } = {}) {
|
|
4254
|
+
const fs = require("fs");
|
|
4255
|
+
const { inspect } = require("util");
|
|
4257
4256
|
const originalWindowLocation = window.location;
|
|
4258
4257
|
const consoleOriginal = console;
|
|
4259
4258
|
const testName = () => expect.getState().currentTestName?.replaceAll(" ", "_").toLowerCase();
|
|
@@ -4267,7 +4266,7 @@ function setupTests ({ sqlDirectory = './logs/rest/', logsDirectory = './logs/te
|
|
|
4267
4266
|
return response;
|
|
4268
4267
|
});
|
|
4269
4268
|
// @link https://stackoverflow.com/questions/13542667/create-directory-when-writing-to-file-in-node-js
|
|
4270
|
-
const asyncFileLogging = async (...args) => fs.writeFileSync(logsFile(), '\n' +
|
|
4269
|
+
const asyncFileLogging = async (...args) => fs.writeFileSync(logsFile(), '\n' + inspect(args.length === 1 ? args.pop() : args, false, 10, true), { flag: "a+" });
|
|
4271
4270
|
global.console = {
|
|
4272
4271
|
...console,
|
|
4273
4272
|
// use jest.fn() to silence, comment out to leave as it is
|