ag-common 0.0.709 → 0.0.711
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/dist/common/helpers/csv.d.ts +3 -1
- package/dist/common/helpers/csv.js +2 -7
- package/dist/common/helpers/index.d.ts +0 -2
- package/dist/common/helpers/index.js +0 -2
- package/dist/common/helpers/xml.d.ts +3 -1
- package/dist/common/helpers/xml.js +3 -28
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/node/helpers/index.d.ts +2 -0
- package/dist/node/helpers/index.js +18 -0
- package/dist/node/index.d.ts +1 -0
- package/dist/node/index.js +17 -0
- package/package.json +2 -2
- /package/dist/{common → node}/helpers/fetch.d.ts +0 -0
- /package/dist/{common → node}/helpers/fetch.js +0 -0
- /package/dist/{common → node}/helpers/fs.d.ts +0 -0
- /package/dist/{common → node}/helpers/fs.js +0 -0
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.loadCsvAsJson = void 0;
|
|
7
|
-
const fs_1 = __importDefault(require("fs"));
|
|
8
4
|
const math_1 = require("./math");
|
|
9
5
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10
|
-
function loadCsvAsJson(
|
|
11
|
-
const
|
|
12
|
-
const lines = fileData.split(/[\r]?\n/);
|
|
6
|
+
function loadCsvAsJson(p) {
|
|
7
|
+
const lines = p.fileData.split(/[\r]?\n/);
|
|
13
8
|
let sep = ',';
|
|
14
9
|
if (lines[0].split(',').length === 1 && lines[0].split(';').length > 1) {
|
|
15
10
|
sep = ';';
|
|
@@ -20,8 +20,6 @@ __exportStar(require("./binary"), exports);
|
|
|
20
20
|
__exportStar(require("./csv"), exports);
|
|
21
21
|
__exportStar(require("./date"), exports);
|
|
22
22
|
__exportStar(require("./email"), exports);
|
|
23
|
-
__exportStar(require("./fetch"), exports);
|
|
24
|
-
__exportStar(require("./fs"), exports);
|
|
25
23
|
__exportStar(require("./func"), exports);
|
|
26
24
|
__exportStar(require("./generator"), exports);
|
|
27
25
|
__exportStar(require("./groupBy"), exports);
|
|
@@ -1,27 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
25
3
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
4
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
5
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -33,12 +11,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
33
11
|
};
|
|
34
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
13
|
exports.XMLParser = exports.convertXmlToJson = void 0;
|
|
36
|
-
|
|
37
|
-
const fs = __importStar(require("fs"));
|
|
38
|
-
const convertXmlToJson = (xmlFilePath) => __awaiter(void 0, void 0, void 0, function* () {
|
|
39
|
-
const xmlData = yield fs.readFileSync(xmlFilePath, 'utf8');
|
|
14
|
+
const convertXmlToJson = (p) => __awaiter(void 0, void 0, void 0, function* () {
|
|
40
15
|
const parser = new XMLParser();
|
|
41
|
-
const ret = parser.parse(xmlData);
|
|
16
|
+
const ret = parser.parse(p.xmlData);
|
|
42
17
|
return ret;
|
|
43
18
|
});
|
|
44
19
|
exports.convertXmlToJson = convertXmlToJson;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./api"), exports);
|
|
18
18
|
__exportStar(require("./common"), exports);
|
|
19
|
+
__exportStar(require("./node"), exports);
|
|
19
20
|
__exportStar(require("./ui"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./fetch"), exports);
|
|
18
|
+
__exportStar(require("./fs"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './helpers';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./helpers"), exports);
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.0.
|
|
2
|
+
"version": "0.0.711",
|
|
3
3
|
"name": "ag-common",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@types/react": "18.3.2",
|
|
61
61
|
"@types/react-dom": "18.3.0",
|
|
62
62
|
"cross-env": "7.0.3",
|
|
63
|
-
"eslint-config-e7npm": "0.0.
|
|
63
|
+
"eslint-config-e7npm": "0.0.102",
|
|
64
64
|
"globstar": "1.0.0",
|
|
65
65
|
"rimraf": "5.0.6",
|
|
66
66
|
"storybook": "8.0.10",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|