@spring-systems/core 0.8.6 → 0.8.7

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.
Files changed (97) hide show
  1. package/dist/adapters/index.js +1 -56
  2. package/dist/auth/index.js +1 -19
  3. package/dist/chunk-3OMNT22N.js +1 -0
  4. package/dist/chunk-4KRUU6MS.js +1 -0
  5. package/dist/chunk-6J2VFOKL.js +1 -0
  6. package/dist/chunk-7P4BJDQR.js +1 -0
  7. package/dist/chunk-AMXSATFF.js +1 -0
  8. package/dist/chunk-BMIRKMVX.js +1 -0
  9. package/dist/chunk-EVDFSWPU.js +1 -0
  10. package/dist/chunk-F3VXVDPQ.js +1 -0
  11. package/dist/chunk-GSQE2NEY.js +1 -0
  12. package/dist/chunk-HUASNNWD.js +1 -0
  13. package/dist/chunk-ICKHSEIX.js +1 -0
  14. package/dist/chunk-JRHMAY5G.js +1 -0
  15. package/dist/chunk-MNLYYTGZ.js +7 -0
  16. package/dist/chunk-OOVZTF74.js +1 -0
  17. package/dist/chunk-PNDXLNCU.js +1 -0
  18. package/dist/chunk-R3XYEEGR.js +1 -0
  19. package/dist/chunk-RKLYBW3O.js +1 -0
  20. package/dist/chunk-RVQHSQYF.js +3 -0
  21. package/dist/chunk-UT6X6RQM.js +1 -0
  22. package/dist/chunk-Y6DB43IE.js +3 -0
  23. package/dist/chunk-YMSSF2ZU.js +1 -0
  24. package/dist/config/index.js +1 -109
  25. package/dist/devtools/index.js +1 -67
  26. package/dist/errors/index.js +1 -21
  27. package/dist/events/index.js +1 -12
  28. package/dist/i18n/index.js +1 -7
  29. package/dist/index.js +1 -42
  30. package/dist/instance/index.js +1 -37
  31. package/dist/logger/index.js +1 -27
  32. package/dist/middleware/index.js +1 -23
  33. package/dist/plugins/index.js +1 -16
  34. package/dist/testing/index.js +1 -171
  35. package/dist/types/index.js +1 -72
  36. package/dist/utils/index.d.ts +1 -0
  37. package/dist/utils/index.js +1 -772
  38. package/dist/validation/index.js +1 -147
  39. package/package.json +137 -136
  40. package/dist/adapters/index.js.map +0 -1
  41. package/dist/auth/index.js.map +0 -1
  42. package/dist/chunk-2PJWFA5S.js +0 -393
  43. package/dist/chunk-2PJWFA5S.js.map +0 -1
  44. package/dist/chunk-EFUBAQCV.js +0 -94
  45. package/dist/chunk-EFUBAQCV.js.map +0 -1
  46. package/dist/chunk-F2SIMWZ5.js +0 -173
  47. package/dist/chunk-F2SIMWZ5.js.map +0 -1
  48. package/dist/chunk-F7WUQJH7.js +0 -399
  49. package/dist/chunk-F7WUQJH7.js.map +0 -1
  50. package/dist/chunk-GON7Q32Q.js +0 -176
  51. package/dist/chunk-GON7Q32Q.js.map +0 -1
  52. package/dist/chunk-GXU75LQX.js +0 -182
  53. package/dist/chunk-GXU75LQX.js.map +0 -1
  54. package/dist/chunk-HFELOXDQ.js +0 -110
  55. package/dist/chunk-HFELOXDQ.js.map +0 -1
  56. package/dist/chunk-KX32MU3I.js +0 -190
  57. package/dist/chunk-KX32MU3I.js.map +0 -1
  58. package/dist/chunk-MEWPYTWC.js +0 -284
  59. package/dist/chunk-MEWPYTWC.js.map +0 -1
  60. package/dist/chunk-N2L4TUC4.js +0 -34
  61. package/dist/chunk-N2L4TUC4.js.map +0 -1
  62. package/dist/chunk-NQQIVCLX.js +0 -47
  63. package/dist/chunk-NQQIVCLX.js.map +0 -1
  64. package/dist/chunk-OSSX443T.js +0 -146
  65. package/dist/chunk-OSSX443T.js.map +0 -1
  66. package/dist/chunk-PT4DIYUK.js +0 -78
  67. package/dist/chunk-PT4DIYUK.js.map +0 -1
  68. package/dist/chunk-QAVWXARR.js +0 -51
  69. package/dist/chunk-QAVWXARR.js.map +0 -1
  70. package/dist/chunk-RRWKDFAB.js +0 -143
  71. package/dist/chunk-RRWKDFAB.js.map +0 -1
  72. package/dist/chunk-RUCXSQEY.js +0 -42
  73. package/dist/chunk-RUCXSQEY.js.map +0 -1
  74. package/dist/chunk-S6RPCN5H.js +0 -64
  75. package/dist/chunk-S6RPCN5H.js.map +0 -1
  76. package/dist/chunk-S7MKRNMI.js +0 -153
  77. package/dist/chunk-S7MKRNMI.js.map +0 -1
  78. package/dist/chunk-SQB4F3EF.js +0 -55
  79. package/dist/chunk-SQB4F3EF.js.map +0 -1
  80. package/dist/chunk-UDT2RPX2.js +0 -43
  81. package/dist/chunk-UDT2RPX2.js.map +0 -1
  82. package/dist/chunk-VRMVN2UM.js +0 -17
  83. package/dist/chunk-VRMVN2UM.js.map +0 -1
  84. package/dist/config/index.js.map +0 -1
  85. package/dist/devtools/index.js.map +0 -1
  86. package/dist/errors/index.js.map +0 -1
  87. package/dist/events/index.js.map +0 -1
  88. package/dist/i18n/index.js.map +0 -1
  89. package/dist/index.js.map +0 -1
  90. package/dist/instance/index.js.map +0 -1
  91. package/dist/logger/index.js.map +0 -1
  92. package/dist/middleware/index.js.map +0 -1
  93. package/dist/plugins/index.js.map +0 -1
  94. package/dist/testing/index.js.map +0 -1
  95. package/dist/types/index.js.map +0 -1
  96. package/dist/utils/index.js.map +0 -1
  97. package/dist/validation/index.js.map +0 -1
@@ -1,23 +1 @@
1
- import {
2
- createAuditMiddleware
3
- } from "../chunk-SQB4F3EF.js";
4
- import {
5
- clearAllMiddleware,
6
- composeMiddleware,
7
- getMiddlewareRunner,
8
- getRegisteredMiddlewareSlots,
9
- registerMiddleware
10
- } from "../chunk-MEWPYTWC.js";
11
- import "../chunk-RUCXSQEY.js";
12
- import "../chunk-KX32MU3I.js";
13
- import "../chunk-EFUBAQCV.js";
14
- import "../chunk-PT4DIYUK.js";
15
- export {
16
- clearAllMiddleware,
17
- composeMiddleware,
18
- createAuditMiddleware,
19
- getMiddlewareRunner,
20
- getRegisteredMiddlewareSlots,
21
- registerMiddleware
22
- };
23
- //# sourceMappingURL=index.js.map
1
+ import{a as f}from"../chunk-F3VXVDPQ.js";import{a,b,c,d,e}from"../chunk-3OMNT22N.js";import"../chunk-YMSSF2ZU.js";import"../chunk-EVDFSWPU.js";import"../chunk-JRHMAY5G.js";import"../chunk-OOVZTF74.js";export{e as clearAllMiddleware,a as composeMiddleware,f as createAuditMiddleware,c as getMiddlewareRunner,d as getRegisteredMiddlewareSlots,b as registerMiddleware};
@@ -1,16 +1 @@
1
- import {
2
- applyPlugins,
3
- disposePlugins,
4
- getLoadedPlugins
5
- } from "../chunk-GXU75LQX.js";
6
- import "../chunk-S7MKRNMI.js";
7
- import "../chunk-RUCXSQEY.js";
8
- import "../chunk-KX32MU3I.js";
9
- import "../chunk-EFUBAQCV.js";
10
- import "../chunk-PT4DIYUK.js";
11
- export {
12
- applyPlugins,
13
- disposePlugins,
14
- getLoadedPlugins
15
- };
16
- //# sourceMappingURL=index.js.map
1
+ import{a as n,b as e,c as i}from"../chunk-6J2VFOKL.js";import"../chunk-UT6X6RQM.js";import"../chunk-YMSSF2ZU.js";import"../chunk-EVDFSWPU.js";import"../chunk-JRHMAY5G.js";import"../chunk-OOVZTF74.js";export{n as applyPlugins,e as disposePlugins,i as getLoadedPlugins};
@@ -1,171 +1 @@
1
- import {
2
- createSpringInstance
3
- } from "../chunk-F2SIMWZ5.js";
4
- import {
5
- applyPlugins,
6
- disposePlugins
7
- } from "../chunk-GXU75LQX.js";
8
- import {
9
- eventBus
10
- } from "../chunk-OSSX443T.js";
11
- import {
12
- clearAllMiddleware
13
- } from "../chunk-MEWPYTWC.js";
14
- import {
15
- clearRuntimeEnvKeys
16
- } from "../chunk-UDT2RPX2.js";
17
- import {
18
- clearCapabilities
19
- } from "../chunk-S7MKRNMI.js";
20
- import {
21
- clearFrameworkConfig
22
- } from "../chunk-F7WUQJH7.js";
23
- import {
24
- clearValidators
25
- } from "../chunk-RRWKDFAB.js";
26
- import "../chunk-QAVWXARR.js";
27
- import {
28
- clearAuthState
29
- } from "../chunk-HFELOXDQ.js";
30
- import {
31
- clearHttpAdapter,
32
- clearLicenseAdapter,
33
- clearNotificationAdapter
34
- } from "../chunk-GON7Q32Q.js";
35
- import {
36
- clearTelemetryAdapter
37
- } from "../chunk-S6RPCN5H.js";
38
- import {
39
- clearContentAdapter
40
- } from "../chunk-NQQIVCLX.js";
41
- import "../chunk-N2L4TUC4.js";
42
- import "../chunk-RUCXSQEY.js";
43
- import {
44
- clearLogAdapter,
45
- resetLogLevel
46
- } from "../chunk-KX32MU3I.js";
47
- import {
48
- clearSpringInstance,
49
- setSpringInstance
50
- } from "../chunk-EFUBAQCV.js";
51
- import "../chunk-PT4DIYUK.js";
52
-
53
- // src/testing/test-utils.ts
54
- function createTestInstance(options = {}) {
55
- const instance = createSpringInstance(options.config);
56
- if (options.contentAdapter) {
57
- instance.core.contentAdapter = options.contentAdapter;
58
- }
59
- if (options.notificationAdapter) {
60
- instance.core.notificationAdapter = options.notificationAdapter;
61
- }
62
- if (options.logAdapter) {
63
- instance.core.logAdapter = options.logAdapter;
64
- }
65
- if (options.setGlobal !== false) {
66
- setSpringInstance(instance);
67
- }
68
- if (options.plugins && options.plugins.length > 0) {
69
- applyPlugins(instance, options.plugins);
70
- }
71
- const originalDispose = instance.dispose.bind(instance);
72
- instance.dispose = () => {
73
- disposePlugins(instance);
74
- originalDispose();
75
- if (options.setGlobal !== false) {
76
- clearSpringInstance();
77
- }
78
- };
79
- return instance;
80
- }
81
- var mockAdapters = {
82
- /** Content adapter that returns the key itself (identity) */
83
- content: () => ({
84
- getRes: (key) => key
85
- }),
86
- /** Content adapter that returns a custom mapping */
87
- contentWithMessages: (messages) => ({
88
- getRes: (key) => messages[key] ?? `[${key}]`
89
- }),
90
- /** Notification adapter that collects all notifications for assertions */
91
- notificationCollector: () => {
92
- const calls = [];
93
- return {
94
- adapter: {
95
- error: (msg) => calls.push({ type: "error", msg }),
96
- success: (msg) => calls.push({ type: "success", msg }),
97
- warning: (msg) => calls.push({ type: "warning", msg }),
98
- info: (msg) => calls.push({ type: "info", msg })
99
- },
100
- calls,
101
- clear: () => {
102
- calls.length = 0;
103
- }
104
- };
105
- },
106
- /** Log adapter that collects all log entries for assertions */
107
- logCollector: () => {
108
- const errors = [];
109
- const warnings = [];
110
- const securityEvents = [];
111
- return {
112
- adapter: {
113
- onError: (ctx, err) => errors.push({ context: ctx, error: err }),
114
- onWarn: (ctx, msg) => warnings.push({ context: ctx, message: msg }),
115
- onSecurityEvent: (evt, data) => securityEvents.push({ event: evt, data })
116
- },
117
- errors,
118
- warnings,
119
- securityEvents
120
- };
121
- },
122
- /** Silent no-op adapters (suppress all output) */
123
- silent: {
124
- content: { getRes: (key) => key },
125
- notification: {
126
- error: (_msg) => {
127
- },
128
- success: (_msg) => {
129
- },
130
- warning: (_msg) => {
131
- },
132
- info: (_msg) => {
133
- }
134
- },
135
- log: {}
136
- }
137
- };
138
- function castTo(value) {
139
- return value;
140
- }
141
- function assertDefined(val, msg) {
142
- if (val === void 0 || val === null) {
143
- throw new Error(msg ?? "Expected value to be defined, but got " + String(val));
144
- }
145
- return val;
146
- }
147
- function resetCoreRuntimeState() {
148
- eventBus.clearAll();
149
- clearAllMiddleware();
150
- clearValidators();
151
- clearCapabilities();
152
- clearFrameworkConfig();
153
- clearRuntimeEnvKeys();
154
- clearAuthState();
155
- clearContentAdapter();
156
- clearNotificationAdapter();
157
- clearHttpAdapter();
158
- clearLicenseAdapter();
159
- clearTelemetryAdapter();
160
- clearLogAdapter();
161
- resetLogLevel();
162
- clearSpringInstance();
163
- }
164
- export {
165
- assertDefined,
166
- castTo,
167
- createTestInstance,
168
- mockAdapters,
169
- resetCoreRuntimeState
170
- };
171
- //# sourceMappingURL=index.js.map
1
+ import{a as x}from"../chunk-Y6DB43IE.js";import{a as S,b as T}from"../chunk-6J2VFOKL.js";import{a as d}from"../chunk-RKLYBW3O.js";import{e as u}from"../chunk-3OMNT22N.js";import{d as f}from"../chunk-PNDXLNCU.js";import{f as p}from"../chunk-UT6X6RQM.js";import{f as g}from"../chunk-RVQHSQYF.js";import{d as A}from"../chunk-AMXSATFF.js";import"../chunk-ICKHSEIX.js";import{e as y}from"../chunk-4KRUU6MS.js";import{c as I,f as w,l as C}from"../chunk-BMIRKMVX.js";import{c as l}from"../chunk-R3XYEEGR.js";import{c as m}from"../chunk-7P4BJDQR.js";import"../chunk-HUASNNWD.js";import"../chunk-YMSSF2ZU.js";import{f as a,g as c}from"../chunk-EVDFSWPU.js";import{e as o,h as s}from"../chunk-JRHMAY5G.js";import"../chunk-OOVZTF74.js";function h(t={}){let e=x(t.config);t.contentAdapter&&(e.core.contentAdapter=t.contentAdapter),t.notificationAdapter&&(e.core.notificationAdapter=t.notificationAdapter),t.logAdapter&&(e.core.logAdapter=t.logAdapter),t.setGlobal!==!1&&o(e),t.plugins&&t.plugins.length>0&&S(e,t.plugins);let i=e.dispose.bind(e);return e.dispose=()=>{T(e),i(),t.setGlobal!==!1&&s()},e}var L={content:()=>({getRes:t=>t}),contentWithMessages:t=>({getRes:e=>t[e]??`[${e}]`}),notificationCollector:()=>{let t=[];return{adapter:{error:e=>t.push({type:"error",msg:e}),success:e=>t.push({type:"success",msg:e}),warning:e=>t.push({type:"warning",msg:e}),info:e=>t.push({type:"info",msg:e})},calls:t,clear:()=>{t.length=0}}},logCollector:()=>{let t=[],e=[],i=[];return{adapter:{onError:(n,r)=>t.push({context:n,error:r}),onWarn:(n,r)=>e.push({context:n,message:r}),onSecurityEvent:(n,r)=>i.push({event:n,data:r})},errors:t,warnings:e,securityEvents:i}},silent:{content:{getRes:t=>t},notification:{error:t=>{},success:t=>{},warning:t=>{},info:t=>{}},log:{}}};function k(t){return t}function b(t,e){if(t==null)throw new Error(e??"Expected value to be defined, but got "+String(t));return t}function v(){d.clearAll(),u(),A(),p(),g(),f(),y(),m(),C(),I(),w(),l(),a(),c(),s()}export{b as assertDefined,k as castTo,h as createTestInstance,L as mockAdapters,v as resetCoreRuntimeState};
@@ -1,72 +1 @@
1
- import {
2
- getField,
3
- getIdentifiableId,
4
- getStoreValue,
5
- getSubState,
6
- isFormFieldRuntime,
7
- storeBoundary,
8
- toFormDataValue
9
- } from "../chunk-QAVWXARR.js";
10
-
11
- // src/types/branded.ts
12
- function toGuid(value) {
13
- return value;
14
- }
15
- function toIdPublic(value) {
16
- return value;
17
- }
18
- function toResourceKey(value) {
19
- return value;
20
- }
21
- function toApiRoute(value) {
22
- return value;
23
- }
24
-
25
- // src/types/grid-types.ts
26
- function isFilterNode(val) {
27
- if (typeof val !== "object" || val === null || Array.isArray(val)) return false;
28
- return "logic" in val && "filters" in val || "field" in val && "operator" in val;
29
- }
30
- function isCombinedSettingData(val) {
31
- if (typeof val !== "object" || val === null || Array.isArray(val)) return false;
32
- return "user_filter" in val || "layout" in val;
33
- }
34
- function isPermission(val) {
35
- if (typeof val !== "object" || val === null || Array.isArray(val)) return false;
36
- const obj = val;
37
- return typeof obj.read === "boolean" && typeof obj.list === "boolean" && typeof obj.delete === "boolean" && typeof obj.insert === "boolean" && typeof obj.update === "boolean";
38
- }
39
- function isColumnLayout(val) {
40
- if (typeof val !== "object" || val === null || Array.isArray(val)) return false;
41
- const obj = val;
42
- return typeof obj.key === "string" && typeof obj.order === "number" && typeof obj.show === "boolean";
43
- }
44
-
45
- // src/types/list-types.ts
46
- var FormatType = {
47
- Badge: 1,
48
- Color: 2,
49
- Background: 3,
50
- RowBackground: 4,
51
- Icon: 5,
52
- Detail: 6
53
- };
54
- export {
55
- FormatType,
56
- getField,
57
- getIdentifiableId,
58
- getStoreValue,
59
- getSubState,
60
- isColumnLayout,
61
- isCombinedSettingData,
62
- isFilterNode,
63
- isFormFieldRuntime,
64
- isPermission,
65
- storeBoundary,
66
- toApiRoute,
67
- toFormDataValue,
68
- toGuid,
69
- toIdPublic,
70
- toResourceKey
71
- };
72
- //# sourceMappingURL=index.js.map
1
+ import{a as o,b as r,c as n,d as i,e as a,f as s,g as u}from"../chunk-ICKHSEIX.js";function p(e){return e}function l(e){return e}function d(e){return e}function y(e){return e}function c(e){return typeof e!="object"||e===null||Array.isArray(e)?!1:"logic"in e&&"filters"in e||"field"in e&&"operator"in e}function m(e){return typeof e!="object"||e===null||Array.isArray(e)?!1:"user_filter"in e||"layout"in e}function g(e){if(typeof e!="object"||e===null||Array.isArray(e))return!1;let t=e;return typeof t.read=="boolean"&&typeof t.list=="boolean"&&typeof t.delete=="boolean"&&typeof t.insert=="boolean"&&typeof t.update=="boolean"}function b(e){if(typeof e!="object"||e===null||Array.isArray(e))return!1;let t=e;return typeof t.key=="string"&&typeof t.order=="number"&&typeof t.show=="boolean"}var _={Badge:1,Color:2,Background:3,RowBackground:4,Icon:5,Detail:6};export{_ as FormatType,a as getField,o as getIdentifiableId,u as getStoreValue,s as getSubState,b as isColumnLayout,m as isCombinedSettingData,c as isFilterNode,i as isFormFieldRuntime,g as isPermission,r as storeBoundary,y as toApiRoute,n as toFormDataValue,p as toGuid,l as toIdPublic,d as toResourceKey};
@@ -72,6 +72,7 @@ declare const dateManager: {
72
72
  /**
73
73
  * Runtime deprecation warnings for the SPRING framework.
74
74
  * Warns once per session per deprecation to avoid console spam.
75
+ * Silent in production — warnings are only shown in development mode.
75
76
  * @module deprecation
76
77
  */
77
78
  declare function springDeprecate(name: string, alternative: string, removeVersion?: string): void;