@stanterprise/protobuf 0.0.13 → 0.0.14

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/index.mjs CHANGED
@@ -14,14 +14,34 @@ import {
14
14
  } from "./chunk-VBR2HXFF.mjs";
15
15
 
16
16
  // lib/index.ts
17
- var testsystem6 = Object.assign(
18
- {},
19
- testsystem,
20
- testsystem2,
21
- testsystem3,
22
- testsystem4,
23
- testsystem5
24
- );
17
+ function isPlainObject(value) {
18
+ if (value === null || typeof value !== "object") {
19
+ return false;
20
+ }
21
+ const proto = Object.getPrototypeOf(value);
22
+ return proto === Object.prototype || proto === null;
23
+ }
24
+ function deepMerge(target, ...sources) {
25
+ for (const source of sources) {
26
+ for (const key of Object.keys(source)) {
27
+ const sourceValue = source[key];
28
+ if (isPlainObject(sourceValue)) {
29
+ const targetValue = target[key];
30
+ if (!isPlainObject(targetValue)) {
31
+ target[key] = {};
32
+ }
33
+ deepMerge(
34
+ target[key],
35
+ sourceValue
36
+ );
37
+ } else {
38
+ target[key] = sourceValue;
39
+ }
40
+ }
41
+ }
42
+ return target;
43
+ }
44
+ var testsystem6 = deepMerge({}, testsystem, testsystem2, testsystem3, testsystem4, testsystem5);
25
45
  export {
26
46
  testsystem as common,
27
47
  testsystem4 as events,
@@ -1 +1 @@
1
- {"version":3,"sources":["../lib/index.ts"],"sourcesContent":["// AUTO-COPIED FROM scripts/static-lib-index.ts\n// DO NOT EDIT GENERATED lib/index.ts DIRECTLY\n// scripts/static-lib-index.ts\n// Source of truth for protobuf barrel exports (copied to lib/index.ts after generation)\n// Update when adding new testsystem packages.\n//\n// NOTE: Import paths in this file are relative to lib/ and won't resolve from scripts/\n// This is intentional - the file is copied to lib/index.ts during generation where paths work correctly.\n//\n// This file provides a clean, organized export structure for the generated protobuf code:\n// - Individual module exports (common, testCase, testSuite, events, observer, google)\n// - Unified testsystem namespace combining all modules\n// - Proper TypeScript types without complex runtime merging\n//\n// See NAMESPACE_ORGANIZATION.md for detailed usage documentation.\n\n// Re-export all generated modules with clean namespace structure\nexport * as google from './google/protobuf/timestamp';\nexport { testsystem as common } from './testsystem/v1/common/common';\nexport { testsystem as testCase } from './testsystem/v1/entities/test_case';\nexport { testsystem as testSuite } from './testsystem/v1/entities/test_suite';\nexport { testsystem as events } from './testsystem/v1/events/events';\nexport { testsystem as observer } from './testsystem/v1/observer/observer';\n\n// Merged testsystem namespace type combining all modules\nexport type testsystem = typeof commonNS &\n typeof testCaseNS &\n typeof testSuiteNS &\n typeof eventsNS &\n typeof observerNS;\n\n// Runtime merged namespace for backwards compatibility\n// Uses Object.assign instead of complex recursive merging\nimport { testsystem as commonNS } from './testsystem/v1/common/common';\nimport { testsystem as testCaseNS } from './testsystem/v1/entities/test_case';\nimport { testsystem as testSuiteNS } from './testsystem/v1/entities/test_suite';\nimport { testsystem as eventsNS } from './testsystem/v1/events/events';\nimport { testsystem as observerNS } from './testsystem/v1/observer/observer';\n\nexport const testsystem = Object.assign(\n {},\n commonNS,\n testCaseNS,\n testSuiteNS,\n eventsNS,\n observerNS\n) as testsystem;\n"],"mappings":";;;;;;;;;;;;;;;;AAuCO,IAAMA,cAAa,OAAO;AAAA,EAC/B,CAAC;AAAA,EACD;AAAA,EACAA;AAAA,EACAA;AAAA,EACAA;AAAA,EACAA;AACF;","names":["testsystem"]}
1
+ {"version":3,"sources":["../lib/index.ts"],"sourcesContent":["// AUTO-COPIED FROM scripts/static-lib-index.ts\n// DO NOT EDIT GENERATED lib/index.ts DIRECTLY\n// scripts/static-lib-index.ts\n// Source of truth for protobuf barrel exports (copied to lib/index.ts after generation)\n// Update when adding new testsystem packages.\n//\n// NOTE: Import paths in this file are relative to lib/ and won't resolve from scripts/\n// This is intentional - the file is copied to lib/index.ts during generation where paths work correctly.\n//\n// This file provides a clean, organized export structure for the generated protobuf code:\n// - Individual module exports (common, testCase, testSuite, events, observer, google)\n// - Unified testsystem namespace combining all modules\n// - Proper TypeScript types without complex runtime merging\n//\n// See NAMESPACE_ORGANIZATION.md for detailed usage documentation.\n\n// Re-export all generated modules with clean namespace structure\nexport * as google from './google/protobuf/timestamp';\nexport { testsystem as common } from './testsystem/v1/common/common';\nexport { testsystem as testCase } from './testsystem/v1/entities/test_case';\nexport { testsystem as testSuite } from './testsystem/v1/entities/test_suite';\nexport { testsystem as events } from './testsystem/v1/events/events';\nexport { testsystem as observer } from './testsystem/v1/observer/observer';\n\n// Import all namespace modules\nimport { testsystem as commonNS } from './testsystem/v1/common/common';\nimport { testsystem as testCaseNS } from './testsystem/v1/entities/test_case';\nimport { testsystem as testSuiteNS } from './testsystem/v1/entities/test_suite';\nimport { testsystem as eventsNS } from './testsystem/v1/events/events';\nimport { testsystem as observerNS } from './testsystem/v1/observer/observer';\n\n// Deep merge helper for nested namespaces\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n if (value === null || typeof value !== 'object') {\n return false;\n }\n const proto = Object.getPrototypeOf(value);\n return proto === Object.prototype || proto === null;\n}\n\nfunction deepMerge(\n target: Record<string, unknown>,\n ...sources: Record<string, unknown>[]\n): Record<string, unknown> {\n for (const source of sources) {\n for (const key of Object.keys(source)) {\n const sourceValue = source[key];\n\n if (isPlainObject(sourceValue)) {\n const targetValue = target[key];\n\n if (!isPlainObject(targetValue)) {\n target[key] = {};\n }\n\n deepMerge(\n target[key] as Record<string, unknown>,\n sourceValue as Record<string, unknown>\n );\n } else {\n // For non-plain objects (including functions, class instances, arrays, etc.),\n // copy the value by reference instead of deep merging.\n target[key] = sourceValue;\n }\n }\n }\n return target;\n}\n\n// Runtime merged namespace with proper deep merging for nested v1.entities, v1.events, etc.\nexport const testsystem = deepMerge({}, commonNS, testCaseNS, testSuiteNS, eventsNS, observerNS);\n\n// Export type for the merged namespace\nexport type testsystem = typeof testsystem;\n"],"mappings":";;;;;;;;;;;;;;;;AAgCA,SAAS,cAAc,OAAkD;AACvE,MAAI,UAAU,QAAQ,OAAO,UAAU,UAAU;AAC/C,WAAO;AAAA,EACT;AACA,QAAM,QAAQ,OAAO,eAAe,KAAK;AACzC,SAAO,UAAU,OAAO,aAAa,UAAU;AACjD;AAEA,SAAS,UACP,WACG,SACsB;AACzB,aAAW,UAAU,SAAS;AAC5B,eAAW,OAAO,OAAO,KAAK,MAAM,GAAG;AACrC,YAAM,cAAc,OAAO,GAAG;AAE9B,UAAI,cAAc,WAAW,GAAG;AAC9B,cAAM,cAAc,OAAO,GAAG;AAE9B,YAAI,CAAC,cAAc,WAAW,GAAG;AAC/B,iBAAO,GAAG,IAAI,CAAC;AAAA,QACjB;AAEA;AAAA,UACE,OAAO,GAAG;AAAA,UACV;AAAA,QACF;AAAA,MACF,OAAO;AAGL,eAAO,GAAG,IAAI;AAAA,MAChB;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;AAGO,IAAMA,cAAa,UAAU,CAAC,GAAG,YAAUA,aAAYA,aAAaA,aAAUA,WAAU;","names":["testsystem"]}
@@ -4,11 +4,6 @@ export { testsystem as testCase } from './testsystem/v1/entities/test_case';
4
4
  export { testsystem as testSuite } from './testsystem/v1/entities/test_suite';
5
5
  export { testsystem as events } from './testsystem/v1/events/events';
6
6
  export { testsystem as observer } from './testsystem/v1/observer/observer';
7
- export type testsystem = typeof commonNS & typeof testCaseNS & typeof testSuiteNS & typeof eventsNS & typeof observerNS;
8
- import { testsystem as commonNS } from './testsystem/v1/common/common';
9
- import { testsystem as testCaseNS } from './testsystem/v1/entities/test_case';
10
- import { testsystem as testSuiteNS } from './testsystem/v1/entities/test_suite';
11
- import { testsystem as eventsNS } from './testsystem/v1/events/events';
12
- import { testsystem as observerNS } from './testsystem/v1/observer/observer';
13
- export declare const testsystem: testsystem;
7
+ export declare const testsystem: Record<string, unknown>;
8
+ export type testsystem = typeof testsystem;
14
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,MAAM,MA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,MAAM,mCAAmC,CAAC;AAgD3E,eAAO,MAAM,UAAU,yBAAyE,CAAC;AAGjG,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC"}
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
- // Merged testsystem namespace type combining all modules
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
- export const testsystem = Object.assign(
41
- {},
42
- commonNS,
43
- testCaseNS,
44
- testSuiteNS,
45
- eventsNS,
46
- observerNS
47
- ) as testsystem;
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.13",
3
+ "version": "0.0.14",
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",