@yamato-daiwa/es-extensions-nodejs 1.5.1 → 1.6.0-alpha.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/Distributable/Errors/DesiredFileActuallyIsDirectoryError/DesiredFileActuallyIsDirectoryError.d.ts +21 -0
- package/Distributable/Errors/DesiredFileActuallyIsDirectoryError/DesiredFileActuallyIsDirectoryError.js +21 -0
- package/Distributable/Errors/DesiredFileActuallyIsDirectoryError/DesiredFileActuallyIsDirectoryErrorLocalization.english.d.ts +3 -0
- package/Distributable/Errors/DesiredFileActuallyIsDirectoryError/DesiredFileActuallyIsDirectoryErrorLocalization.english.js +11 -0
- package/Distributable/Errors/FileNotFoundError/FileNotFoundError.d.ts +21 -0
- package/Distributable/Errors/FileNotFoundError/FileNotFoundError.js +21 -0
- package/Distributable/Errors/FileNotFoundError/FileNotFoundErrorLocalization.english.d.ts +3 -0
- package/Distributable/Errors/FileNotFoundError/FileNotFoundErrorLocalization.english.js +11 -0
- package/Distributable/Errors/InterProcessInteractionFailed/InterProcessInteractionFailedError.d.ts +3 -3
- package/Distributable/Errors/InvalidConsoleCommand/InvalidConsoleCommandError.d.ts +8 -8
- package/Distributable/ObjectDataFilesProcessor/ObjectDataFilesProcessor.d.ts +17 -0
- package/Distributable/ObjectDataFilesProcessor/ObjectDataFilesProcessor.js +167 -0
- package/Distributable/index.d.ts +5 -0
- package/Distributable/index.js +11 -1
- package/package.json +7 -4
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare class DesiredFileActuallyIsDirectoryError extends Error {
|
|
2
|
+
static readonly NAME: string;
|
|
3
|
+
static localization: DesiredFileActuallyIsDirectoryError.Localization;
|
|
4
|
+
constructor(namedParameters: DesiredFileActuallyIsDirectoryError.ConstructorNamedParameters);
|
|
5
|
+
}
|
|
6
|
+
declare namespace DesiredFileActuallyIsDirectoryError {
|
|
7
|
+
type ConstructorNamedParameters = Localization.DescriptionTemplateNamedParameters | Readonly<{
|
|
8
|
+
customMessage: string;
|
|
9
|
+
}>;
|
|
10
|
+
type Localization = Readonly<{
|
|
11
|
+
defaultTitle: string;
|
|
12
|
+
genericDescription: (namedParameters: Localization.DescriptionTemplateNamedParameters) => string;
|
|
13
|
+
}>;
|
|
14
|
+
namespace Localization {
|
|
15
|
+
type DescriptionTemplateNamedParameters = Readonly<{
|
|
16
|
+
targetPath: string;
|
|
17
|
+
messageSpecificPart?: string;
|
|
18
|
+
}>;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export default DesiredFileActuallyIsDirectoryError;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const DesiredFileActuallyIsDirectoryErrorLocalization_english_1 = __importDefault(require("./DesiredFileActuallyIsDirectoryErrorLocalization.english"));
|
|
7
|
+
class DesiredFileActuallyIsDirectoryError extends Error {
|
|
8
|
+
constructor(namedParameters) {
|
|
9
|
+
super();
|
|
10
|
+
this.name = DesiredFileActuallyIsDirectoryError.NAME;
|
|
11
|
+
if ("customMessage" in namedParameters) {
|
|
12
|
+
this.message = namedParameters.customMessage;
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
this.message = DesiredFileActuallyIsDirectoryError.localization.genericDescription(namedParameters);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
DesiredFileActuallyIsDirectoryError.NAME = "DesiredFileActuallyIsDirectoryError";
|
|
20
|
+
DesiredFileActuallyIsDirectoryError.localization = DesiredFileActuallyIsDirectoryErrorLocalization_english_1.default;
|
|
21
|
+
exports.default = DesiredFileActuallyIsDirectoryError;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type DesiredFileActuallyIsDirectoryError from "./DesiredFileActuallyIsDirectoryError";
|
|
2
|
+
declare const DesiredFileActuallyIsDirectoryErrorLocalization__English: DesiredFileActuallyIsDirectoryError.Localization;
|
|
3
|
+
export default DesiredFileActuallyIsDirectoryErrorLocalization__English;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const es_extensions_1 = require("@yamato-daiwa/es-extensions");
|
|
4
|
+
const DesiredFileActuallyIsDirectoryErrorLocalization__English = {
|
|
5
|
+
defaultTitle: "Desired file actually is the directory",
|
|
6
|
+
genericDescription: (namedParameters) => `Contrary to expectations, path '${namedParameters.targetPath}' refers to directory, not file.` +
|
|
7
|
+
`${(0, es_extensions_1.insertSubstring)(namedParameters.messageSpecificPart, {
|
|
8
|
+
modifier: (messageSpecificPart) => `\n${messageSpecificPart}`
|
|
9
|
+
})}`
|
|
10
|
+
};
|
|
11
|
+
exports.default = DesiredFileActuallyIsDirectoryErrorLocalization__English;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare class FileNotFoundError extends Error {
|
|
2
|
+
static readonly NAME: string;
|
|
3
|
+
static localization: FileNotFoundError.Localization;
|
|
4
|
+
constructor(namedParameters: FileNotFoundError.ConstructorNamedParameters);
|
|
5
|
+
}
|
|
6
|
+
declare namespace FileNotFoundError {
|
|
7
|
+
type ConstructorNamedParameters = Localization.DescriptionTemplateNamedParameters | Readonly<{
|
|
8
|
+
customMessage: string;
|
|
9
|
+
}>;
|
|
10
|
+
type Localization = Readonly<{
|
|
11
|
+
readonly defaultTitle: string;
|
|
12
|
+
readonly genericDescription: (namedParameters: Localization.DescriptionTemplateNamedParameters) => string;
|
|
13
|
+
}>;
|
|
14
|
+
namespace Localization {
|
|
15
|
+
type DescriptionTemplateNamedParameters = Readonly<{
|
|
16
|
+
filePath: string;
|
|
17
|
+
messageSpecificPart?: string;
|
|
18
|
+
}>;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export default FileNotFoundError;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const FileNotFoundErrorLocalization_english_1 = __importDefault(require("./FileNotFoundErrorLocalization.english"));
|
|
7
|
+
class FileNotFoundError extends Error {
|
|
8
|
+
constructor(namedParameters) {
|
|
9
|
+
super();
|
|
10
|
+
this.name = FileNotFoundError.NAME;
|
|
11
|
+
if ("customMessage" in namedParameters) {
|
|
12
|
+
this.message = namedParameters.customMessage;
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
this.message = FileNotFoundError.localization.genericDescription(namedParameters);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
FileNotFoundError.NAME = "FileNotFoundError";
|
|
20
|
+
FileNotFoundError.localization = FileNotFoundErrorLocalization_english_1.default;
|
|
21
|
+
exports.default = FileNotFoundError;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const es_extensions_1 = require("@yamato-daiwa/es-extensions");
|
|
4
|
+
const FileNotFoundErrorLocalization__English = {
|
|
5
|
+
defaultTitle: "File not found error",
|
|
6
|
+
genericDescription: (parametersObject) => `File with path '${parametersObject.filePath}' not found.` +
|
|
7
|
+
`${(0, es_extensions_1.insertSubstring)(parametersObject.messageSpecificPart, {
|
|
8
|
+
modifier: (messageSpecificPart) => `\n${messageSpecificPart}`
|
|
9
|
+
})}`
|
|
10
|
+
};
|
|
11
|
+
exports.default = FileNotFoundErrorLocalization__English;
|
package/Distributable/Errors/InterProcessInteractionFailed/InterProcessInteractionFailedError.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ declare class InterProcessInteractionFailedError extends Error {
|
|
|
4
4
|
constructor(message: string);
|
|
5
5
|
}
|
|
6
6
|
declare namespace InterProcessInteractionFailedError {
|
|
7
|
-
type Localization = {
|
|
8
|
-
|
|
9
|
-
}
|
|
7
|
+
type Localization = Readonly<{
|
|
8
|
+
defaultTitle: string;
|
|
9
|
+
}>;
|
|
10
10
|
}
|
|
11
11
|
export default InterProcessInteractionFailedError;
|
|
@@ -7,15 +7,15 @@ declare namespace InvalidConsoleCommandError {
|
|
|
7
7
|
type ConstructorParametersObject = Localization.DescriptionTemplateNamedParameters | {
|
|
8
8
|
readonly customMessage: string;
|
|
9
9
|
};
|
|
10
|
-
type Localization = {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
10
|
+
type Localization = Readonly<{
|
|
11
|
+
defaultTitle: string;
|
|
12
|
+
generateDescription: (namedParameters: Localization.DescriptionTemplateNamedParameters) => string;
|
|
13
|
+
}>;
|
|
14
14
|
namespace Localization {
|
|
15
|
-
type DescriptionTemplateNamedParameters = {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
15
|
+
type DescriptionTemplateNamedParameters = Readonly<{
|
|
16
|
+
applicationName: string;
|
|
17
|
+
messageSpecificPart?: string;
|
|
18
|
+
}>;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
export default InvalidConsoleCommandError;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { RawObjectDataProcessor } from "@yamato-daiwa/es-extensions";
|
|
2
|
+
import type { ArbitraryObject } from "@yamato-daiwa/es-extensions";
|
|
3
|
+
declare class ObjectDataFilesProcessor {
|
|
4
|
+
static processFile<ValidData extends ArbitraryObject>(namedParameters: {
|
|
5
|
+
filePath: string;
|
|
6
|
+
validDataSpecification: RawObjectDataProcessor.ObjectDataSpecification;
|
|
7
|
+
schema?: ObjectDataFilesProcessor.SupportedSchemas;
|
|
8
|
+
}): ValidData;
|
|
9
|
+
}
|
|
10
|
+
declare namespace ObjectDataFilesProcessor {
|
|
11
|
+
enum SupportedSchemas {
|
|
12
|
+
JSON = "JSON",
|
|
13
|
+
YAML = "YAML",
|
|
14
|
+
DOTENV = "DOTENV"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export default ObjectDataFilesProcessor;
|
|
@@ -0,0 +1,167 @@
|
|
|
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 __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
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
const fs_1 = __importDefault(require("fs"));
|
|
30
|
+
const yamljs_1 = __importDefault(require("yamljs"));
|
|
31
|
+
const dotenv_1 = __importDefault(require("dotenv"));
|
|
32
|
+
const es_extensions_1 = require("@yamato-daiwa/es-extensions");
|
|
33
|
+
const isErrnoException_1 = __importDefault(require("../isErrnoException"));
|
|
34
|
+
const FileNotFoundError_1 = __importDefault(require("../Errors/FileNotFoundError/FileNotFoundError"));
|
|
35
|
+
const DesiredFileActuallyIsDirectoryError_1 = __importDefault(require("../Errors/DesiredFileActuallyIsDirectoryError/DesiredFileActuallyIsDirectoryError"));
|
|
36
|
+
const Path = __importStar(require("path"));
|
|
37
|
+
class ObjectDataFilesProcessor {
|
|
38
|
+
static processFile(namedParameters) {
|
|
39
|
+
const filePath = namedParameters.filePath;
|
|
40
|
+
let dataSchema;
|
|
41
|
+
if ((0, es_extensions_1.isNotUndefined)(namedParameters.schema)) {
|
|
42
|
+
dataSchema = namedParameters.schema;
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
const fileNameLastExtensionWithLeadingPeriod = Path.extname(filePath);
|
|
46
|
+
if (fileNameLastExtensionWithLeadingPeriod.length === 0) {
|
|
47
|
+
es_extensions_1.Logger.throwErrorAndLog({
|
|
48
|
+
errorInstance: new es_extensions_1.InvalidParameterValueError({
|
|
49
|
+
parameterName: "namedParameters.filePath",
|
|
50
|
+
messageSpecificPart: "Unable to decide the data parsing algorithm because target file " +
|
|
51
|
+
`'${namedParameters.filePath}' has no explicit filename extension. If it is intentional, ` +
|
|
52
|
+
"specify 'namedParameters.dataSchema' with desired element of 'ObjectDataFilesProcessor.SupportedSchemas'" +
|
|
53
|
+
"enumeration."
|
|
54
|
+
}),
|
|
55
|
+
title: es_extensions_1.InvalidParameterValueError.localization.defaultTitle,
|
|
56
|
+
occurrenceLocation: "ObjectDataFilesProcessor.processFile(namedParameters)"
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
switch (fileNameLastExtensionWithLeadingPeriod) {
|
|
60
|
+
case ".json": {
|
|
61
|
+
dataSchema = ObjectDataFilesProcessor.SupportedSchemas.JSON;
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
case ".yaml":
|
|
65
|
+
case ".yml": {
|
|
66
|
+
dataSchema = ObjectDataFilesProcessor.SupportedSchemas.YAML;
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
case ".env": {
|
|
70
|
+
dataSchema = ObjectDataFilesProcessor.SupportedSchemas.DOTENV;
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
default: {
|
|
74
|
+
es_extensions_1.Logger.throwErrorAndLog({
|
|
75
|
+
errorInstance: new es_extensions_1.InvalidParameterValueError({
|
|
76
|
+
parameterName: "namedParameters.filePath",
|
|
77
|
+
messageSpecificPart: `Target file '${namedParameters.filePath}' has unsupported filename extension ` +
|
|
78
|
+
`'${fileNameLastExtensionWithLeadingPeriod}'. If this file including the data of known for ` +
|
|
79
|
+
"'ObjectDataFilesProcessor' schema, specify 'namedParameters.dataSchema' with desired element of " +
|
|
80
|
+
"'ObjectDataFilesProcessor.SupportedSchemas' enumeration"
|
|
81
|
+
}),
|
|
82
|
+
title: es_extensions_1.InvalidParameterValueError.localization.defaultTitle,
|
|
83
|
+
occurrenceLocation: "ObjectDataFilesProcessor.processFile(namedParameters)"
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
let targetFileStatistics;
|
|
89
|
+
try {
|
|
90
|
+
targetFileStatistics = fs_1.default.statSync(filePath);
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
if ((0, isErrnoException_1.default)(error) && error.code === "ENOENT") {
|
|
94
|
+
es_extensions_1.Logger.throwErrorAndLog({
|
|
95
|
+
errorInstance: new FileNotFoundError_1.default({ filePath }),
|
|
96
|
+
title: FileNotFoundError_1.default.localization.defaultTitle,
|
|
97
|
+
occurrenceLocation: "ObjectDataFilesProcessor.processFile(namedParameters)",
|
|
98
|
+
wrappableError: error
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
throw error;
|
|
102
|
+
}
|
|
103
|
+
if (!targetFileStatistics.isFile()) {
|
|
104
|
+
es_extensions_1.Logger.throwErrorAndLog({
|
|
105
|
+
errorInstance: new DesiredFileActuallyIsDirectoryError_1.default({ targetPath: filePath }),
|
|
106
|
+
title: DesiredFileActuallyIsDirectoryError_1.default.localization.defaultTitle,
|
|
107
|
+
occurrenceLocation: "ObjectDataFilesProcessor.processFile(namedParameters)"
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
let rawData;
|
|
111
|
+
try {
|
|
112
|
+
rawData = fs_1.default.readFileSync(filePath, "utf-8");
|
|
113
|
+
}
|
|
114
|
+
catch (error) {
|
|
115
|
+
es_extensions_1.Logger.throwErrorAndLog({
|
|
116
|
+
errorInstance: new es_extensions_1.FileReadingFailedError({ filePath }),
|
|
117
|
+
title: es_extensions_1.FileReadingFailedError.localization.defaultTitle,
|
|
118
|
+
occurrenceLocation: "ObjectDataFilesProcessor.processFile(namedParameters)"
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
let parsedData;
|
|
122
|
+
try {
|
|
123
|
+
switch (dataSchema) {
|
|
124
|
+
case ObjectDataFilesProcessor.SupportedSchemas.JSON: {
|
|
125
|
+
parsedData = JSON.parse(rawData);
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
case ObjectDataFilesProcessor.SupportedSchemas.YAML: {
|
|
129
|
+
parsedData = yamljs_1.default.parse(rawData);
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
case ObjectDataFilesProcessor.SupportedSchemas.DOTENV: {
|
|
133
|
+
parsedData = dotenv_1.default.parse(rawData);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
catch (error) {
|
|
138
|
+
es_extensions_1.Logger.throwErrorAndLog({
|
|
139
|
+
errorInstance: new es_extensions_1.InvalidExternalDataError({ mentionToExpectedData: filePath }),
|
|
140
|
+
title: es_extensions_1.InvalidExternalDataError.localization.defaultTitle,
|
|
141
|
+
occurrenceLocation: "ObjectDataFilesProcessor.processFile(namedParameters)",
|
|
142
|
+
wrappableError: error
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
const processingResult = es_extensions_1.RawObjectDataProcessor.process(parsedData, namedParameters.validDataSpecification);
|
|
146
|
+
if (processingResult.rawDataIsInvalid) {
|
|
147
|
+
es_extensions_1.Logger.throwErrorAndLog({
|
|
148
|
+
errorInstance: new es_extensions_1.InvalidExternalDataError({
|
|
149
|
+
customMessage: `The contents of file '${filePath}' does not matching with valid data specification:\n` +
|
|
150
|
+
`${es_extensions_1.RawObjectDataProcessor.formatValidationErrorsList(processingResult.validationErrorsMessages)}`
|
|
151
|
+
}),
|
|
152
|
+
title: es_extensions_1.InvalidExternalDataError.localization.defaultTitle,
|
|
153
|
+
occurrenceLocation: "ObjectDataFilesProcessor.processFile(namedParameters)"
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
return processingResult.processedData;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
(function (ObjectDataFilesProcessor) {
|
|
160
|
+
let SupportedSchemas;
|
|
161
|
+
(function (SupportedSchemas) {
|
|
162
|
+
SupportedSchemas["JSON"] = "JSON";
|
|
163
|
+
SupportedSchemas["YAML"] = "YAML";
|
|
164
|
+
SupportedSchemas["DOTENV"] = "DOTENV";
|
|
165
|
+
})(SupportedSchemas = ObjectDataFilesProcessor.SupportedSchemas || (ObjectDataFilesProcessor.SupportedSchemas = {}));
|
|
166
|
+
})(ObjectDataFilesProcessor || (ObjectDataFilesProcessor = {}));
|
|
167
|
+
exports.default = ObjectDataFilesProcessor;
|
package/Distributable/index.d.ts
CHANGED
|
@@ -6,6 +6,11 @@
|
|
|
6
6
|
export { default as NodeJS_Timer } from "./DateTime/NodeJS_Timer";
|
|
7
7
|
export { default as ConsoleApplicationLogger } from "./ConsoleApplicationLogger";
|
|
8
8
|
export { default as ConsoleCommandsParser } from "./ConsoleCommandsParser/ConsoleCommandsParser";
|
|
9
|
+
export { default as DesiredFileActuallyIsDirectoryError } from "./Errors/DesiredFileActuallyIsDirectoryError/DesiredFileActuallyIsDirectoryError";
|
|
10
|
+
export { default as DesiredFileActuallyIsDirectoryErrorLocalization__English } from "./Errors/DesiredFileActuallyIsDirectoryError/DesiredFileActuallyIsDirectoryErrorLocalization.english";
|
|
11
|
+
export { default as FileNotFoundError } from "./Errors/FileNotFoundError/FileNotFoundError";
|
|
12
|
+
export { default as FileNotFoundErrorLocalization__English } from "./Errors/FileNotFoundError/FileNotFoundErrorLocalization.english";
|
|
9
13
|
export { default as InvalidConsoleCommandError } from "./Errors/InvalidConsoleCommand/InvalidConsoleCommandError";
|
|
10
14
|
export { default as InterProcessInteractionFailedError } from "./Errors/InterProcessInteractionFailed/InterProcessInteractionFailedError";
|
|
15
|
+
export { default as ObjectDataFilesProcessor } from "./ObjectDataFilesProcessor/ObjectDataFilesProcessor";
|
|
11
16
|
export { default as isErrnoException } from "./isErrnoException";
|
package/Distributable/index.js
CHANGED
|
@@ -8,16 +8,26 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
8
8
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
9
|
};
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.isErrnoException = exports.InterProcessInteractionFailedError = exports.InvalidConsoleCommandError = exports.ConsoleCommandsParser = exports.ConsoleApplicationLogger = exports.NodeJS_Timer = void 0;
|
|
11
|
+
exports.isErrnoException = exports.ObjectDataFilesProcessor = exports.InterProcessInteractionFailedError = exports.InvalidConsoleCommandError = exports.FileNotFoundErrorLocalization__English = exports.FileNotFoundError = exports.DesiredFileActuallyIsDirectoryErrorLocalization__English = exports.DesiredFileActuallyIsDirectoryError = exports.ConsoleCommandsParser = exports.ConsoleApplicationLogger = exports.NodeJS_Timer = void 0;
|
|
12
12
|
var NodeJS_Timer_1 = require("./DateTime/NodeJS_Timer");
|
|
13
13
|
Object.defineProperty(exports, "NodeJS_Timer", { enumerable: true, get: function () { return __importDefault(NodeJS_Timer_1).default; } });
|
|
14
14
|
var ConsoleApplicationLogger_1 = require("./ConsoleApplicationLogger");
|
|
15
15
|
Object.defineProperty(exports, "ConsoleApplicationLogger", { enumerable: true, get: function () { return __importDefault(ConsoleApplicationLogger_1).default; } });
|
|
16
16
|
var ConsoleCommandsParser_1 = require("./ConsoleCommandsParser/ConsoleCommandsParser");
|
|
17
17
|
Object.defineProperty(exports, "ConsoleCommandsParser", { enumerable: true, get: function () { return __importDefault(ConsoleCommandsParser_1).default; } });
|
|
18
|
+
var DesiredFileActuallyIsDirectoryError_1 = require("./Errors/DesiredFileActuallyIsDirectoryError/DesiredFileActuallyIsDirectoryError");
|
|
19
|
+
Object.defineProperty(exports, "DesiredFileActuallyIsDirectoryError", { enumerable: true, get: function () { return __importDefault(DesiredFileActuallyIsDirectoryError_1).default; } });
|
|
20
|
+
var DesiredFileActuallyIsDirectoryErrorLocalization_english_1 = require("./Errors/DesiredFileActuallyIsDirectoryError/DesiredFileActuallyIsDirectoryErrorLocalization.english");
|
|
21
|
+
Object.defineProperty(exports, "DesiredFileActuallyIsDirectoryErrorLocalization__English", { enumerable: true, get: function () { return __importDefault(DesiredFileActuallyIsDirectoryErrorLocalization_english_1).default; } });
|
|
22
|
+
var FileNotFoundError_1 = require("./Errors/FileNotFoundError/FileNotFoundError");
|
|
23
|
+
Object.defineProperty(exports, "FileNotFoundError", { enumerable: true, get: function () { return __importDefault(FileNotFoundError_1).default; } });
|
|
24
|
+
var FileNotFoundErrorLocalization_english_1 = require("./Errors/FileNotFoundError/FileNotFoundErrorLocalization.english");
|
|
25
|
+
Object.defineProperty(exports, "FileNotFoundErrorLocalization__English", { enumerable: true, get: function () { return __importDefault(FileNotFoundErrorLocalization_english_1).default; } });
|
|
18
26
|
var InvalidConsoleCommandError_1 = require("./Errors/InvalidConsoleCommand/InvalidConsoleCommandError");
|
|
19
27
|
Object.defineProperty(exports, "InvalidConsoleCommandError", { enumerable: true, get: function () { return __importDefault(InvalidConsoleCommandError_1).default; } });
|
|
20
28
|
var InterProcessInteractionFailedError_1 = require("./Errors/InterProcessInteractionFailed/InterProcessInteractionFailedError");
|
|
21
29
|
Object.defineProperty(exports, "InterProcessInteractionFailedError", { enumerable: true, get: function () { return __importDefault(InterProcessInteractionFailedError_1).default; } });
|
|
30
|
+
var ObjectDataFilesProcessor_1 = require("./ObjectDataFilesProcessor/ObjectDataFilesProcessor");
|
|
31
|
+
Object.defineProperty(exports, "ObjectDataFilesProcessor", { enumerable: true, get: function () { return __importDefault(ObjectDataFilesProcessor_1).default; } });
|
|
22
32
|
var isErrnoException_1 = require("./isErrnoException");
|
|
23
33
|
Object.defineProperty(exports, "isErrnoException", { enumerable: true, get: function () { return __importDefault(isErrnoException_1).default; } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yamato-daiwa/es-extensions-nodejs",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0-alpha.0",
|
|
4
4
|
"description": "Additional to @yamato-daiwa/es-extensions functionality for Node.js environment. Helper functions and classes aimed to reduce the routine code. Build-in TypeScript type safety.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nodejs",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"@types/json5": "0.0.30",
|
|
31
31
|
"@types/mocha": "9.1.1",
|
|
32
32
|
"@types/node": "16.10.2",
|
|
33
|
+
"@types/yamljs": "0.2.31",
|
|
33
34
|
"@yamato-daiwa/style_guides": "0.0.16",
|
|
34
35
|
"mocha": "10.0.0",
|
|
35
36
|
"rimraf": "3.0.2",
|
|
@@ -37,8 +38,10 @@
|
|
|
37
38
|
"typescript": "4.7.4"
|
|
38
39
|
},
|
|
39
40
|
"dependencies": {
|
|
40
|
-
"@yamato-daiwa/es-extensions": "1.5.1",
|
|
41
|
-
"
|
|
41
|
+
"@yamato-daiwa/es-extensions": ">=1.5.0 <1.6.0",
|
|
42
|
+
"dotenv": "16.0.1",
|
|
43
|
+
"json5": "2.2.1",
|
|
44
|
+
"yamljs": "0.3.0"
|
|
42
45
|
},
|
|
43
46
|
"peerDependencies": {
|
|
44
47
|
"@yamato-daiwa/es-extensions": ">=1.5.0 <1.6.0"
|
|
@@ -49,6 +52,6 @@
|
|
|
49
52
|
"scripts": {
|
|
50
53
|
"Rebuild distributable": "rimraf Distributable & tsc",
|
|
51
54
|
"Lint": "eslint Source Tests",
|
|
52
|
-
"Rebuild distributable and realize alpha":
|
|
55
|
+
"Rebuild distributable and realize alpha": "npm run \"Rebuild distributable\" && npm publish --tag alpha"
|
|
53
56
|
}
|
|
54
57
|
}
|