@stanterprise/protobuf 0.0.13 → 0.0.15
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/{chunk-JOH5DJAY.mjs → chunk-O6ANB3BZ.mjs} +4 -1
- package/dist/{chunk-JOH5DJAY.mjs.map → chunk-O6ANB3BZ.mjs.map} +1 -1
- package/dist/{chunk-BS6UMTC7.mjs → chunk-VZMKFXBH.mjs} +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +28 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -8
- package/dist/index.mjs.map +1 -1
- package/dist/lib/index.d.ts +2 -7
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/testsystem/index.js +8 -6
- package/dist/testsystem/index.js.map +1 -1
- package/dist/testsystem/index.mjs +2 -2
- package/dist/testsystem/v1/entities/index.d.ts +2 -0
- package/dist/testsystem/v1/entities/index.d.ts.map +1 -1
- package/dist/testsystem/v1/entities/index.js +9 -6
- package/dist/testsystem/v1/entities/index.js.map +1 -1
- package/dist/testsystem/v1/entities/index.mjs +3 -1
- package/dist/testsystem/v1/index.js +8 -6
- package/dist/testsystem/v1/index.js.map +1 -1
- package/dist/testsystem/v1/index.mjs +2 -2
- package/lib/index.ts +44 -17
- package/package.json +4 -2
- /package/dist/{chunk-BS6UMTC7.mjs.map → chunk-VZMKFXBH.mjs.map} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "../../chunk-
|
|
1
|
+
import "../../chunk-VZMKFXBH.mjs";
|
|
2
2
|
import {
|
|
3
3
|
common_exports
|
|
4
4
|
} from "../../chunk-S5P2S67H.mjs";
|
|
5
5
|
import {
|
|
6
6
|
entities_exports
|
|
7
|
-
} from "../../chunk-
|
|
7
|
+
} from "../../chunk-O6ANB3BZ.mjs";
|
|
8
8
|
import {
|
|
9
9
|
events_exports
|
|
10
10
|
} from "../../chunk-OYBN67JW.mjs";
|
package/lib/index.ts
CHANGED
|
@@ -22,26 +22,53 @@ export { testsystem as testSuite } from './testsystem/v1/entities/test_suite';
|
|
|
22
22
|
export { testsystem as events } from './testsystem/v1/events/events';
|
|
23
23
|
export { testsystem as observer } from './testsystem/v1/observer/observer';
|
|
24
24
|
|
|
25
|
-
//
|
|
26
|
-
export type testsystem = typeof commonNS &
|
|
27
|
-
typeof testCaseNS &
|
|
28
|
-
typeof testSuiteNS &
|
|
29
|
-
typeof eventsNS &
|
|
30
|
-
typeof observerNS;
|
|
31
|
-
|
|
32
|
-
// Runtime merged namespace for backwards compatibility
|
|
33
|
-
// Uses Object.assign instead of complex recursive merging
|
|
25
|
+
// Import all namespace modules
|
|
34
26
|
import { testsystem as commonNS } from './testsystem/v1/common/common';
|
|
35
27
|
import { testsystem as testCaseNS } from './testsystem/v1/entities/test_case';
|
|
36
28
|
import { testsystem as testSuiteNS } from './testsystem/v1/entities/test_suite';
|
|
37
29
|
import { testsystem as eventsNS } from './testsystem/v1/events/events';
|
|
38
30
|
import { testsystem as observerNS } from './testsystem/v1/observer/observer';
|
|
39
31
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
32
|
+
// Deep merge helper for nested namespaces
|
|
33
|
+
function isPlainObject(value: unknown): value is Record<string, unknown> {
|
|
34
|
+
if (value === null || typeof value !== 'object') {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
const proto = Object.getPrototypeOf(value);
|
|
38
|
+
return proto === Object.prototype || proto === null;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function deepMerge(
|
|
42
|
+
target: Record<string, unknown>,
|
|
43
|
+
...sources: Record<string, unknown>[]
|
|
44
|
+
): Record<string, unknown> {
|
|
45
|
+
for (const source of sources) {
|
|
46
|
+
for (const key of Object.keys(source)) {
|
|
47
|
+
const sourceValue = source[key];
|
|
48
|
+
|
|
49
|
+
if (isPlainObject(sourceValue)) {
|
|
50
|
+
const targetValue = target[key];
|
|
51
|
+
|
|
52
|
+
if (!isPlainObject(targetValue)) {
|
|
53
|
+
target[key] = {};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
deepMerge(
|
|
57
|
+
target[key] as Record<string, unknown>,
|
|
58
|
+
sourceValue as Record<string, unknown>
|
|
59
|
+
);
|
|
60
|
+
} else {
|
|
61
|
+
// For non-plain objects (including functions, class instances, arrays, etc.),
|
|
62
|
+
// copy the value by reference instead of deep merging.
|
|
63
|
+
target[key] = sourceValue;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return target;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Runtime merged namespace with proper deep merging for nested v1.entities, v1.events, etc.
|
|
71
|
+
export const testsystem = deepMerge({}, commonNS, testCaseNS, testSuiteNS, eventsNS, observerNS);
|
|
72
|
+
|
|
73
|
+
// Export type for the merged namespace
|
|
74
|
+
export type testsystem = typeof testsystem;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stanterprise/protobuf",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"description": "Generated Protobuf code",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -53,7 +53,9 @@
|
|
|
53
53
|
"generate": "node scripts/generate.js",
|
|
54
54
|
"lint": "eslint . --ext .ts --max-warnings=0",
|
|
55
55
|
"format": "prettier --write .",
|
|
56
|
-
"lint:fix": "eslint . --ext .ts --fix"
|
|
56
|
+
"lint:fix": "eslint . --ext .ts --fix",
|
|
57
|
+
"verify": "node verify-exports.mjs",
|
|
58
|
+
"test": "npm run verify"
|
|
57
59
|
},
|
|
58
60
|
"repository": {
|
|
59
61
|
"type": "git",
|
|
File without changes
|