pareto-core-dev 0.11.1 → 0.11.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.
|
@@ -1,30 +1,7 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.implement_me = implement_me;
|
|
27
|
-
const
|
|
4
|
+
const get_location_info_1 = require("pareto-core-internals/dist/misc/get_location_info");
|
|
28
5
|
/**
|
|
29
6
|
* use this function as a placeholder when you want to compile but have not fully developed all functionality yet.
|
|
30
7
|
*
|
|
@@ -33,5 +10,6 @@ const _pint = __importStar(require("pareto-core-internals"));
|
|
|
33
10
|
* @param message the string to be printed to stderr
|
|
34
11
|
*/
|
|
35
12
|
function implement_me(marker) {
|
|
36
|
-
|
|
13
|
+
const location = (0, get_location_info_1.$$)(1);
|
|
14
|
+
throw new Error(`IMPLEMENT ME ${marker ? `: '${marker}'` : ''}@ ${location.file}:${location.line}:${location.column}`);
|
|
37
15
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* logs a debug message
|
|
3
|
+
* this function should only be called from code that is in the development phase,
|
|
4
|
+
* before publishing, the usages should be removed
|
|
5
|
+
* @param message the string to be printed to stdout
|
|
6
|
+
*/
|
|
7
|
+
export declare function log_wrapping_debug_messages<T>(message: string, handler: () => T, after: string): T;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.log_wrapping_debug_messages = log_wrapping_debug_messages;
|
|
4
|
+
/**
|
|
5
|
+
* logs a debug message
|
|
6
|
+
* this function should only be called from code that is in the development phase,
|
|
7
|
+
* before publishing, the usages should be removed
|
|
8
|
+
* @param message the string to be printed to stdout
|
|
9
|
+
*/
|
|
10
|
+
function log_wrapping_debug_messages(message, handler, after) {
|
|
11
|
+
console.log("DEBUG BEFORE", message);
|
|
12
|
+
const startTime = Date.now();
|
|
13
|
+
const x = handler();
|
|
14
|
+
const duration = Date.now() - startTime;
|
|
15
|
+
console.log("DEBUG AFTER", message, `(${duration}ms)`);
|
|
16
|
+
return x;
|
|
17
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pareto-core-dev",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.3",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"description": "a pareto package that contains functions that are useful during development",
|
|
6
6
|
"author": "Corno",
|
|
@@ -24,6 +24,6 @@
|
|
|
24
24
|
"url": "git+https://github.com/corno/pareto-core-dev.git"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"pareto-core-internals": "^0.24.
|
|
27
|
+
"pareto-core-internals": "^0.24.34"
|
|
28
28
|
}
|
|
29
29
|
}
|