@cobol-ts/path 0.0.0-stage → 0.0.2

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/README.md CHANGED
@@ -1,3 +1,15 @@
1
- # Temporary Holding Version
1
+ # @cobol-ts/debug
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ ## Purpose
4
+
5
+ This module supplies a named debug logger controlled by a shared map of enabled names. Its purpose is conditional diagnostics at call sites, not structured metrics or error propagation. The separate [metrics module](../metrics/README.md) counts predefined operations without formatting debug messages.
6
+
7
+ ## Public abstractions
8
+
9
+ `DebugState` is a `NameAnd<boolean>` map from `@cobol-ts/records`. `makeDebugLog(debugState, name)` constructs a `DebugLog` function for that name. `DebugLog` also exposes additional functions; consult [`src/debug.ts`](src/debug.ts) for their signatures and severity behaviour. `createMockDebugLog()` is a test-friendly implementation provided by [`src/debug.mock.ts`](src/debug.mock.ts).
10
+
11
+ Loggers capture their name, and check the debug state when the logger is created; changing the map later does not retroactively enable an already-created logger. Use a single state map when diagnostics across components need coordinated control. Do not rely on debug output for production correctness, counters or deterministic benchmark measurement.
12
+
13
+ ## Related modules
14
+
15
+ The shared record-map type is in [records](../records/README.md), while [test_utils](../test_utils/README.md) can capture console output in tests.
@@ -0,0 +1,3 @@
1
+ export * from './src/path.array';
2
+ export * from './src/path.convert';
3
+ export * from './src/path.string';
package/dist/index.js ADDED
@@ -0,0 +1,20 @@
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("./src/path.array"), exports);
18
+ __exportStar(require("./src/path.convert"), exports);
19
+ __exportStar(require("./src/path.string"), exports);
20
+ //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,60 @@
1
1
  {
2
2
  "name": "@cobol-ts/path",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "description": "Type safe path through objects",
4
+ "version": "0.0.2",
5
+ "main": "dist/index",
6
+ "types": "dist/index",
7
+ "browserslist": {
8
+ "development": [
9
+ "last 1 chrome version",
10
+ "last 1 firefox version",
11
+ "last 1 safari version"
12
+ ],
13
+ "production": [
14
+ ">0.2%",
15
+ "not dead",
16
+ "not op_mini all"
17
+ ]
18
+ },
19
+ "dependencies": {
20
+ "@cobol-ts/records": "0.0.2"
21
+ },
22
+ "devDependencies": {
23
+ "typescript": "^5.2.2",
24
+ "@testing-library/jest-dom": "^6.1.4",
25
+ "@types/jest": "^29.0.0",
26
+ "@types/node": "^14.0.0",
27
+ "jest": "^29.0.0",
28
+ "ts-jest": "^29.0.0"
29
+ },
30
+ "eslintConfig": {
31
+ "extends": [
32
+ "react-app",
33
+ "react-app/jest"
34
+ ],
35
+ "overrides": [
36
+ {
37
+ "files": [
38
+ "**/*.stories.*"
39
+ ],
40
+ "rules": {
41
+ "import/no-anonymous-default-export": "off"
42
+ }
43
+ }
44
+ ]
45
+ },
46
+ "files": [
47
+ "dist/index.js",
48
+ "dist/index.d.ts",
49
+ "dist/src/"
50
+ ],
51
+ "keywords": [
52
+ "indexing"
53
+ ],
54
+ "license": "MIT",
55
+ "repository": "git@github.com:intellimaintain/intellimaintain.git",
56
+ "scripts": {
57
+ "test": "jest --config jest.config.json --env node",
58
+ "test:watch": "npm run test -- --watch"
59
+ }
6
60
  }