@alanszp/errors 12.0.1 → 12.0.3
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/package.json +3 -6
- package/.gitignore +0 -3
- package/.npmignore +0 -3
- package/node_modules/@alanszp/core/.gitignore +0 -3
- package/node_modules/@alanszp/core/.npmignore +0 -3
- package/node_modules/@alanszp/core/LICENSE +0 -21
- package/node_modules/@alanszp/core/dist/app/appIdentifier.d.ts +0 -1
- package/node_modules/@alanszp/core/dist/app/appIdentifier.js +0 -10
- package/node_modules/@alanszp/core/dist/app/appIdentifier.js.map +0 -1
- package/node_modules/@alanszp/core/dist/app/index.d.ts +0 -1
- package/node_modules/@alanszp/core/dist/app/index.js +0 -18
- package/node_modules/@alanszp/core/dist/app/index.js.map +0 -1
- package/node_modules/@alanszp/core/dist/assignKey.d.ts +0 -2
- package/node_modules/@alanszp/core/dist/assignKey.js +0 -20
- package/node_modules/@alanszp/core/dist/assignKey.js.map +0 -1
- package/node_modules/@alanszp/core/dist/editable/index.d.ts +0 -2
- package/node_modules/@alanszp/core/dist/editable/index.js +0 -19
- package/node_modules/@alanszp/core/dist/editable/index.js.map +0 -1
- package/node_modules/@alanszp/core/dist/editable/keepOrUpdate.d.ts +0 -3
- package/node_modules/@alanszp/core/dist/editable/keepOrUpdate.js +0 -26
- package/node_modules/@alanszp/core/dist/editable/keepOrUpdate.js.map +0 -1
- package/node_modules/@alanszp/core/dist/editable/types.d.ts +0 -6
- package/node_modules/@alanszp/core/dist/editable/types.js +0 -3
- package/node_modules/@alanszp/core/dist/editable/types.js.map +0 -1
- package/node_modules/@alanszp/core/dist/index.d.ts +0 -4
- package/node_modules/@alanszp/core/dist/index.js +0 -21
- package/node_modules/@alanszp/core/dist/index.js.map +0 -1
- package/node_modules/@alanszp/core/dist/lists/ListResult.d.ts +0 -7
- package/node_modules/@alanszp/core/dist/lists/ListResult.js +0 -8
- package/node_modules/@alanszp/core/dist/lists/ListResult.js.map +0 -1
- package/node_modules/@alanszp/core/dist/lists/Orderable.d.ts +0 -11
- package/node_modules/@alanszp/core/dist/lists/Orderable.js +0 -13
- package/node_modules/@alanszp/core/dist/lists/Orderable.js.map +0 -1
- package/node_modules/@alanszp/core/dist/lists/Paginable.d.ts +0 -14
- package/node_modules/@alanszp/core/dist/lists/Paginable.js +0 -22
- package/node_modules/@alanszp/core/dist/lists/Paginable.js.map +0 -1
- package/node_modules/@alanszp/core/dist/lists/index.d.ts +0 -3
- package/node_modules/@alanszp/core/dist/lists/index.js +0 -20
- package/node_modules/@alanszp/core/dist/lists/index.js.map +0 -1
- package/node_modules/@alanszp/core/package.json +0 -25
- package/node_modules/@alanszp/core/tsconfig.json +0 -15
- package/node_modules/@types/node/LICENSE +0 -21
- package/node_modules/@types/node/README.md +0 -15
- package/node_modules/@types/node/assert/strict.d.ts +0 -8
- package/node_modules/@types/node/assert.d.ts +0 -996
- package/node_modules/@types/node/async_hooks.d.ts +0 -539
- package/node_modules/@types/node/buffer.d.ts +0 -2362
- package/node_modules/@types/node/child_process.d.ts +0 -1540
- package/node_modules/@types/node/cluster.d.ts +0 -432
- package/node_modules/@types/node/console.d.ts +0 -415
- package/node_modules/@types/node/constants.d.ts +0 -19
- package/node_modules/@types/node/crypto.d.ts +0 -4487
- package/node_modules/@types/node/dgram.d.ts +0 -596
- package/node_modules/@types/node/diagnostics_channel.d.ts +0 -545
- package/node_modules/@types/node/dns/promises.d.ts +0 -425
- package/node_modules/@types/node/dns.d.ts +0 -809
- package/node_modules/@types/node/dom-events.d.ts +0 -122
- package/node_modules/@types/node/domain.d.ts +0 -170
- package/node_modules/@types/node/events.d.ts +0 -879
- package/node_modules/@types/node/fs/promises.d.ts +0 -1239
- package/node_modules/@types/node/fs.d.ts +0 -4311
- package/node_modules/@types/node/globals.d.ts +0 -411
- package/node_modules/@types/node/globals.global.d.ts +0 -1
- package/node_modules/@types/node/http.d.ts +0 -1887
- package/node_modules/@types/node/http2.d.ts +0 -2382
- package/node_modules/@types/node/https.d.ts +0 -550
- package/node_modules/@types/node/index.d.ts +0 -88
- package/node_modules/@types/node/inspector.d.ts +0 -2747
- package/node_modules/@types/node/module.d.ts +0 -315
- package/node_modules/@types/node/net.d.ts +0 -949
- package/node_modules/@types/node/os.d.ts +0 -478
- package/node_modules/@types/node/package.json +0 -229
- package/node_modules/@types/node/path.d.ts +0 -191
- package/node_modules/@types/node/perf_hooks.d.ts +0 -645
- package/node_modules/@types/node/process.d.ts +0 -1561
- package/node_modules/@types/node/punycode.d.ts +0 -117
- package/node_modules/@types/node/querystring.d.ts +0 -141
- package/node_modules/@types/node/readline/promises.d.ts +0 -150
- package/node_modules/@types/node/readline.d.ts +0 -539
- package/node_modules/@types/node/repl.d.ts +0 -430
- package/node_modules/@types/node/stream/consumers.d.ts +0 -12
- package/node_modules/@types/node/stream/promises.d.ts +0 -83
- package/node_modules/@types/node/stream/web.d.ts +0 -366
- package/node_modules/@types/node/stream.d.ts +0 -1701
- package/node_modules/@types/node/string_decoder.d.ts +0 -67
- package/node_modules/@types/node/test.d.ts +0 -1465
- package/node_modules/@types/node/timers/promises.d.ts +0 -93
- package/node_modules/@types/node/timers.d.ts +0 -240
- package/node_modules/@types/node/tls.d.ts +0 -1210
- package/node_modules/@types/node/trace_events.d.ts +0 -182
- package/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
- package/node_modules/@types/node/ts4.8/assert.d.ts +0 -996
- package/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -539
- package/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2362
- package/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1540
- package/node_modules/@types/node/ts4.8/cluster.d.ts +0 -432
- package/node_modules/@types/node/ts4.8/console.d.ts +0 -415
- package/node_modules/@types/node/ts4.8/constants.d.ts +0 -19
- package/node_modules/@types/node/ts4.8/crypto.d.ts +0 -4487
- package/node_modules/@types/node/ts4.8/dgram.d.ts +0 -596
- package/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -545
- package/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -425
- package/node_modules/@types/node/ts4.8/dns.d.ts +0 -809
- package/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -122
- package/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
- package/node_modules/@types/node/ts4.8/events.d.ts +0 -879
- package/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1239
- package/node_modules/@types/node/ts4.8/fs.d.ts +0 -4311
- package/node_modules/@types/node/ts4.8/globals.d.ts +0 -411
- package/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
- package/node_modules/@types/node/ts4.8/http.d.ts +0 -1887
- package/node_modules/@types/node/ts4.8/http2.d.ts +0 -2382
- package/node_modules/@types/node/ts4.8/https.d.ts +0 -550
- package/node_modules/@types/node/ts4.8/index.d.ts +0 -88
- package/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2747
- package/node_modules/@types/node/ts4.8/module.d.ts +0 -315
- package/node_modules/@types/node/ts4.8/net.d.ts +0 -949
- package/node_modules/@types/node/ts4.8/os.d.ts +0 -478
- package/node_modules/@types/node/ts4.8/path.d.ts +0 -191
- package/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -645
- package/node_modules/@types/node/ts4.8/process.d.ts +0 -1561
- package/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
- package/node_modules/@types/node/ts4.8/querystring.d.ts +0 -141
- package/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -150
- package/node_modules/@types/node/ts4.8/readline.d.ts +0 -539
- package/node_modules/@types/node/ts4.8/repl.d.ts +0 -430
- package/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
- package/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -83
- package/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -366
- package/node_modules/@types/node/ts4.8/stream.d.ts +0 -1701
- package/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
- package/node_modules/@types/node/ts4.8/test.d.ts +0 -1465
- package/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
- package/node_modules/@types/node/ts4.8/timers.d.ts +0 -240
- package/node_modules/@types/node/ts4.8/tls.d.ts +0 -1210
- package/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -182
- package/node_modules/@types/node/ts4.8/tty.d.ts +0 -208
- package/node_modules/@types/node/ts4.8/url.d.ts +0 -927
- package/node_modules/@types/node/ts4.8/util.d.ts +0 -2183
- package/node_modules/@types/node/ts4.8/v8.d.ts +0 -764
- package/node_modules/@types/node/ts4.8/vm.d.ts +0 -903
- package/node_modules/@types/node/ts4.8/wasi.d.ts +0 -179
- package/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -691
- package/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
- package/node_modules/@types/node/tty.d.ts +0 -208
- package/node_modules/@types/node/url.d.ts +0 -927
- package/node_modules/@types/node/util.d.ts +0 -2183
- package/node_modules/@types/node/v8.d.ts +0 -764
- package/node_modules/@types/node/vm.d.ts +0 -903
- package/node_modules/@types/node/wasi.d.ts +0 -179
- package/node_modules/@types/node/worker_threads.d.ts +0 -691
- package/node_modules/@types/node/zlib.d.ts +0 -517
- package/src/BaseError.ts +0 -14
- package/src/HttpRenderableError.ts +0 -5
- package/src/InternalServerError.ts +0 -32
- package/src/RenderableError.ts +0 -37
- package/src/index.ts +0 -4
package/package.json
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alanszp/errors",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.3",
|
|
4
4
|
"description": "Alan's basic errors classes.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
7
7
|
"license": "MIT",
|
|
8
|
-
"files": [
|
|
9
|
-
"**/*"
|
|
10
|
-
],
|
|
11
8
|
"publishConfig": {
|
|
12
9
|
"access": "public"
|
|
13
10
|
},
|
|
@@ -22,7 +19,7 @@
|
|
|
22
19
|
"@alanszp/errors": ">=12.0.0"
|
|
23
20
|
},
|
|
24
21
|
"devDependencies": {
|
|
25
|
-
"@alanszp/core": "^12.0.
|
|
22
|
+
"@alanszp/core": "^12.0.3",
|
|
26
23
|
"@types/node": "^20.11.17",
|
|
27
24
|
"ts-node": "^10.0.0",
|
|
28
25
|
"typescript": "^4.3.4"
|
|
@@ -30,5 +27,5 @@
|
|
|
30
27
|
"dependencies": {
|
|
31
28
|
"lodash": "^4.17.21"
|
|
32
29
|
},
|
|
33
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "3917709ea888ae321c2ea6ab36dfc90597ccd35e"
|
|
34
31
|
}
|
package/.gitignore
DELETED
package/.npmignore
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2021 Alan Szpigiel
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function appIdentifier(): string;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.appIdentifier = void 0;
|
|
4
|
-
function appIdentifier() {
|
|
5
|
-
const appName = process.env.API_ORIGIN_NAME || "undefined";
|
|
6
|
-
const env = process.env.NODE_ENV || "development";
|
|
7
|
-
return `${appName}:${env}`;
|
|
8
|
-
}
|
|
9
|
-
exports.appIdentifier = appIdentifier;
|
|
10
|
-
//# sourceMappingURL=appIdentifier.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"appIdentifier.js","sourceRoot":"","sources":["../../src/app/appIdentifier.ts"],"names":[],"mappings":";;;AAAA,SAAgB,aAAa;IAC3B,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,WAAW,CAAC;IAC3D,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAC;IAClD,OAAO,GAAG,OAAO,IAAI,GAAG,EAAE,CAAC;AAC7B,CAAC;AAJD,sCAIC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./appIdentifier";
|
|
@@ -1,18 +0,0 @@
|
|
|
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("./appIdentifier"), exports);
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/app/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare function assignKey<CommonInterface, Key extends keyof CommonInterface>(target: CommonInterface, source: CommonInterface, key: Key, defaultValue?: CommonInterface[Key]): void;
|
|
2
|
-
export declare function assignKeys<CommonInterface>(target: CommonInterface, source: CommonInterface, keys: (keyof CommonInterface)[]): void;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assignKeys = exports.assignKey = void 0;
|
|
4
|
-
function assignKey(target, source, key, defaultValue) {
|
|
5
|
-
if (source[key] !== undefined) {
|
|
6
|
-
target[key] = source[key];
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
if (defaultValue !== undefined) {
|
|
10
|
-
target[key] = defaultValue;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
exports.assignKey = assignKey;
|
|
14
|
-
function assignKeys(target, source, keys) {
|
|
15
|
-
keys.forEach((key) => {
|
|
16
|
-
assignKey(target, source, key);
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
exports.assignKeys = assignKeys;
|
|
20
|
-
//# sourceMappingURL=assignKey.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"assignKey.js","sourceRoot":"","sources":["../src/assignKey.ts"],"names":[],"mappings":";;;AAAA,SAAgB,SAAS,CACvB,MAAuB,EACvB,MAAuB,EACvB,GAAQ,EACR,YAAmC;IAEnC,IAAI,MAAM,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE;QAC7B,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QAC1B,OAAO;KACR;IAED,IAAI,YAAY,KAAK,SAAS,EAAE;QAC9B,MAAM,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC;KAC5B;AACH,CAAC;AAdD,8BAcC;AAED,SAAgB,UAAU,CACxB,MAAuB,EACvB,MAAuB,EACvB,IAA+B;IAE/B,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QACnB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC;AARD,gCAQC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
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("./keepOrUpdate"), exports);
|
|
18
|
-
__exportStar(require("./types"), exports);
|
|
19
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/editable/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,0CAAwB"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { EditableAndNullableField } from "./types";
|
|
2
|
-
export declare function keepOrUpdate<FieldType extends unknown, EditionType extends unknown>(defined: FieldType, value: EditableAndNullableField<EditionType>, formatter?: (value: EditionType) => FieldType): FieldType | null;
|
|
3
|
-
export declare function keepOrUpdateAsync<FieldType extends unknown, EditionType extends unknown>(defined: FieldType, value: EditableAndNullableField<EditionType>, formatter?: (value: EditionType) => Promise<FieldType>): Promise<FieldType | null>;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.keepOrUpdateAsync = exports.keepOrUpdate = void 0;
|
|
4
|
-
function id(param) {
|
|
5
|
-
return param;
|
|
6
|
-
}
|
|
7
|
-
function idAsync(param) {
|
|
8
|
-
return param;
|
|
9
|
-
}
|
|
10
|
-
function keepOrUpdate(defined, value, formatter = id) {
|
|
11
|
-
if (value === undefined)
|
|
12
|
-
return defined;
|
|
13
|
-
if (value === null)
|
|
14
|
-
return null;
|
|
15
|
-
return formatter(value);
|
|
16
|
-
}
|
|
17
|
-
exports.keepOrUpdate = keepOrUpdate;
|
|
18
|
-
function keepOrUpdateAsync(defined, value, formatter = idAsync) {
|
|
19
|
-
if (value === undefined)
|
|
20
|
-
return Promise.resolve(defined);
|
|
21
|
-
if (value === null)
|
|
22
|
-
return Promise.resolve(null);
|
|
23
|
-
return formatter(value);
|
|
24
|
-
}
|
|
25
|
-
exports.keepOrUpdateAsync = keepOrUpdateAsync;
|
|
26
|
-
//# sourceMappingURL=keepOrUpdate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"keepOrUpdate.js","sourceRoot":"","sources":["../../src/editable/keepOrUpdate.ts"],"names":[],"mappings":";;;AAEA,SAAS,EAAE,CACT,KAAkB;IAElB,OAAO,KAA6B,CAAC;AACvC,CAAC;AACD,SAAS,OAAO,CACd,KAAkB;IAElB,OAAO,KAA2B,CAAC;AACrC,CAAC;AAED,SAAgB,YAAY,CAI1B,OAAkB,EAClB,KAA4C,EAC5C,YAA+C,EAAE;IAEjD,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,OAAO,CAAC;IAExC,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAEhC,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC;AAC1B,CAAC;AAbD,oCAaC;AAED,SAAgB,iBAAiB,CAI/B,OAAkB,EAClB,KAA4C,EAC5C,YAAwD,OAAO;IAE/D,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAEzD,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjD,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC;AAC1B,CAAC;AAbD,8CAaC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare type JustEditableField<T> = T | undefined;
|
|
2
|
-
export declare type EditableAndNullableField<T> = T | undefined | null;
|
|
3
|
-
export declare type EditableField<T> = T extends undefined | null ? EditableAndNullableField<T> : JustEditableField<T>;
|
|
4
|
-
export declare type EditableObject<T> = {
|
|
5
|
-
[key in keyof T]: EditableField<T[key]>;
|
|
6
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/editable/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,21 +0,0 @@
|
|
|
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("./assignKey"), exports);
|
|
18
|
-
__exportStar(require("./lists"), exports);
|
|
19
|
-
__exportStar(require("./editable"), exports);
|
|
20
|
-
__exportStar(require("./app"), exports);
|
|
21
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,0CAAwB;AACxB,6CAA2B;AAC3B,wCAAsB"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mapListResult = void 0;
|
|
4
|
-
function mapListResult(list, mapper) {
|
|
5
|
-
return Object.assign(Object.assign({}, list), { elements: list.elements.map((c) => mapper(c)) });
|
|
6
|
-
}
|
|
7
|
-
exports.mapListResult = mapListResult;
|
|
8
|
-
//# sourceMappingURL=ListResult.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ListResult.js","sourceRoot":"","sources":["../../src/lists/ListResult.ts"],"names":[],"mappings":";;;AAOA,SAAgB,aAAa,CAC3B,IAAmB,EACnB,MAAsB;IAEtB,uCACK,IAAI,KACP,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAC7C;AACJ,CAAC;AARD,sCAQC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare type OrderDirection = "ASC" | "DESC";
|
|
2
|
-
export declare const ORDER_DIRECTIONS: string[];
|
|
3
|
-
export interface Orderable<T extends string | number | symbol = "id"> {
|
|
4
|
-
orderBy: T;
|
|
5
|
-
orderDirection: OrderDirection;
|
|
6
|
-
}
|
|
7
|
-
export declare function getOrderObject<K extends string | number | symbol, T extends Orderable<K>>(object: T): {
|
|
8
|
-
order: {
|
|
9
|
-
[x: string]: OrderDirection;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getOrderObject = exports.ORDER_DIRECTIONS = void 0;
|
|
4
|
-
exports.ORDER_DIRECTIONS = ["ASC", "DESC"];
|
|
5
|
-
function getOrderObject(object) {
|
|
6
|
-
return {
|
|
7
|
-
order: {
|
|
8
|
-
[object.orderBy]: object.orderDirection,
|
|
9
|
-
},
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
exports.getOrderObject = getOrderObject;
|
|
13
|
-
//# sourceMappingURL=Orderable.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Orderable.js","sourceRoot":"","sources":["../../src/lists/Orderable.ts"],"names":[],"mappings":";;;AAEa,QAAA,gBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AAOhD,SAAgB,cAAc,CAG5B,MAAS;IACT,OAAO;QACL,KAAK,EAAE;YACL,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,cAAc;SACxC;KACF,CAAC;AACJ,CAAC;AATD,wCASC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export interface Paginable<Validated extends boolean = false> {
|
|
2
|
-
pageSize: Validated extends true ? number : number | string;
|
|
3
|
-
page: Validated extends true ? number : number | string;
|
|
4
|
-
}
|
|
5
|
-
export declare function getPageObject<T extends Paginable<true>>(object: T): {
|
|
6
|
-
skip: number;
|
|
7
|
-
take: number;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Assigns the page and pageSize keys to the target object
|
|
11
|
-
* @param target Paginable Input
|
|
12
|
-
* @param source Paginable Source
|
|
13
|
-
*/
|
|
14
|
-
export declare function assignPaginableKeys<T extends Paginable<false>, K extends Partial<Paginable<false>>>(target: T, source: K): void;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assignPaginableKeys = exports.getPageObject = void 0;
|
|
4
|
-
function getPageObject(object) {
|
|
5
|
-
return {
|
|
6
|
-
skip: (object.page - 1) * object.pageSize,
|
|
7
|
-
take: object.pageSize,
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
exports.getPageObject = getPageObject;
|
|
11
|
-
/**
|
|
12
|
-
* Assigns the page and pageSize keys to the target object
|
|
13
|
-
* @param target Paginable Input
|
|
14
|
-
* @param source Paginable Source
|
|
15
|
-
*/
|
|
16
|
-
function assignPaginableKeys(target, source) {
|
|
17
|
-
// Mind the || operator, it's on purpose to avoid the 0 value (cause falsy value)
|
|
18
|
-
target.page = Number.parseInt(source.page, 10) || 1;
|
|
19
|
-
target.pageSize = Number.parseInt(source.pageSize, 10) || 100;
|
|
20
|
-
}
|
|
21
|
-
exports.assignPaginableKeys = assignPaginableKeys;
|
|
22
|
-
//# sourceMappingURL=Paginable.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Paginable.js","sourceRoot":"","sources":["../../src/lists/Paginable.ts"],"names":[],"mappings":";;;AAKA,SAAgB,aAAa,CAA4B,MAAS;IAChE,OAAO;QACL,IAAI,EAAE,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,QAAQ;QACzC,IAAI,EAAE,MAAM,CAAC,QAAQ;KACtB,CAAC;AACJ,CAAC;AALD,sCAKC;AAED;;;;GAIG;AACH,SAAgB,mBAAmB,CAGjC,MAAS,EAAE,MAAS;IACpB,iFAAiF;IACjF,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAc,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;IAC9D,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAkB,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC;AAC1E,CAAC;AAPD,kDAOC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
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("./ListResult"), exports);
|
|
18
|
-
__exportStar(require("./Orderable"), exports);
|
|
19
|
-
__exportStar(require("./Paginable"), exports);
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lists/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,8CAA4B;AAC5B,8CAA4B"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@alanszp/core",
|
|
3
|
-
"version": "11.0.0",
|
|
4
|
-
"description": "Alan's core TS/JS lib.",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"typings": "dist/index.d.ts",
|
|
7
|
-
"license": "MIT",
|
|
8
|
-
"files": [
|
|
9
|
-
"**/*"
|
|
10
|
-
],
|
|
11
|
-
"publishConfig": {
|
|
12
|
-
"access": "public"
|
|
13
|
-
},
|
|
14
|
-
"scripts": {
|
|
15
|
-
"compile": "rm -rf ./dist && tsc --declaration",
|
|
16
|
-
"compile-watch": "tsc -w",
|
|
17
|
-
"build": "yarn run compile",
|
|
18
|
-
"prepack": "yarn run build",
|
|
19
|
-
"yalc-publish": "yarn run yalc publish"
|
|
20
|
-
},
|
|
21
|
-
"devDependencies": {
|
|
22
|
-
"@types/node": "^20.11.17"
|
|
23
|
-
},
|
|
24
|
-
"gitHead": "60b62fa2fff34ef094ea9af69c2bed2373c70f64"
|
|
25
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"rootDir": "src",
|
|
4
|
-
"outDir": "dist",
|
|
5
|
-
"module": "commonjs",
|
|
6
|
-
"target": "es6",
|
|
7
|
-
"types": ["node"],
|
|
8
|
-
"esModuleInterop": true,
|
|
9
|
-
"sourceMap": true,
|
|
10
|
-
|
|
11
|
-
"alwaysStrict": true,
|
|
12
|
-
"strictNullChecks": true
|
|
13
|
-
},
|
|
14
|
-
"exclude": ["node_modules"]
|
|
15
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) Microsoft Corporation.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# Installation
|
|
2
|
-
> `npm install --save @types/node`
|
|
3
|
-
|
|
4
|
-
# Summary
|
|
5
|
-
This package contains type definitions for node (https://nodejs.org/).
|
|
6
|
-
|
|
7
|
-
# Details
|
|
8
|
-
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
|
|
9
|
-
|
|
10
|
-
### Additional Details
|
|
11
|
-
* Last updated: Thu, 08 Feb 2024 20:35:44 GMT
|
|
12
|
-
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
|
-
|
|
14
|
-
# Credits
|
|
15
|
-
These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), and [Dmitry Semigradsky](https://github.com/Semigradsky).
|