@common-stack/core 8.0.1-alpha.0 → 8.1.1-alpha.0

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/LICENSE CHANGED
@@ -1,21 +1,34 @@
1
- The MIT License
2
-
3
- Copyright (c) 2017 CDMBase LLC.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
1
+ PROPRIETARY LICENSE
2
+
3
+ Copyright (c) 2017-2025 CDMBase LLC. All Rights Reserved.
4
+
5
+ This software and associated documentation files (the "Software") are the
6
+ proprietary and confidential information of CDMBase LLC ("Confidential Information").
7
+
8
+ NOTICE: All information contained herein is, and remains the property of
9
+ CDMBase LLC. The intellectual and technical concepts contained herein are
10
+ proprietary to CDMBase LLC and may be covered by U.S. and Foreign Patents,
11
+ patents in process, and are protected by trade secret or copyright law.
12
+
13
+ Dissemination of this information or reproduction of this material is strictly
14
+ forbidden unless prior written permission is obtained from CDMBase LLC.
15
+
16
+ NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL
17
+ PROPERTY RIGHTS ARE GRANTED BY THIS DOCUMENT.
18
+
19
+ RESTRICTIONS:
20
+ 1. You may NOT use, copy, modify, merge, publish, distribute, sublicense,
21
+ and/or sell copies of the Software without explicit written permission
22
+ from CDMBase LLC.
23
+ 2. You may NOT reverse engineer, decompile, or disassemble the Software.
24
+ 3. You may NOT remove or alter any proprietary notices or labels on the Software.
25
+ 4. The Software is licensed, not sold.
26
+
27
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
30
+ CDMBASE LLC BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
31
+ AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
32
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33
+
34
+ For licensing inquiries, please contact: legal@cdmbase.com
@@ -4,3 +4,4 @@ export * from './rollupRouteGenerated';
4
4
  export * from './routeJson';
5
5
  export * from './viteSettings';
6
6
  export * from './wrapperRouteOptions';
7
+ export * from './routeMobileAdditions';
@@ -1,3 +1,4 @@
1
+ import { IPermissionsFlattenedKeys } from 'common';
1
2
  export declare enum IMenuPosition {
2
3
  Logo = "LOGO",
3
4
  Upper = "UPPER",
@@ -70,7 +71,7 @@ export interface IMenuDataItem {
70
71
  /**
71
72
  * @name permissions to determine whether to render menu or not
72
73
  */
73
- authority?: string[];
74
+ authority?: IPermissionsFlattenedKeys[];
74
75
  /**
75
76
  * @name priority of the menu to display in the order. Lower values shows first.
76
77
  */
@@ -79,5 +80,20 @@ export interface IMenuDataItem {
79
80
  * The path displayed by the menuItem's tooltip
80
81
  */
81
82
  tooltip?: string;
83
+ /**
84
+ * @name System Type
85
+ * @description Determines visibility based on user role - 'system' for admin only, 'user' for common users and owners
86
+ */
87
+ systemType?: 'system' | 'user';
88
+ /**
89
+ * @name Category
90
+ * @description Main category for hierarchical organization (e.g., 'communication', 'administration', 'business', 'content')
91
+ */
92
+ category?: string;
93
+ /**
94
+ * @name Sub Category
95
+ * @description Sub-category for more granular organization (e.g., 'email', 'chat' under 'communication')
96
+ */
97
+ subCategory?: string;
82
98
  [key: string]: any;
83
99
  }
@@ -1 +1 @@
1
- {"version":3,"file":"menu.js","sources":["../../../src/component/interfaces/menu.ts"],"sourcesContent":[null],"names":[],"mappings":"IAAY,cAMX;AAND,CAAA,UAAY,aAAa,EAAA;AACrB,IAAA,aAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;AACb,IAAA,aAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CAAA;AACf,IAAA,aAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACjB,IAAA,aAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CAAA;AACf,IAAA,aAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACrB,CAAC,EANW,aAAa,KAAb,aAAa,GAMxB,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"menu.js","sources":["../../../src/component/interfaces/menu.ts"],"sourcesContent":[null],"names":[],"mappings":"IACY,cAMX;AAND,CAAA,UAAY,aAAa,EAAA;AACrB,IAAA,aAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;AACb,IAAA,aAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CAAA;AACf,IAAA,aAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACjB,IAAA,aAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CAAA;AACf,IAAA,aAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACrB,CAAC,EANW,aAAa,KAAb,aAAa,GAMxB,EAAA,CAAA,CAAA"}
@@ -4,6 +4,12 @@ export interface IRoutePageExportFlags {
4
4
  hasClientLoader?: boolean;
5
5
  hasClientAction?: boolean;
6
6
  hasComponent?: boolean;
7
+ /**
8
+ * @name Has SPA Component
9
+ * @description Indicates that a `.client.tsx` version of the component exists.
10
+ * When true and `runSPAOnly` is enabled, the `.client.tsx` file will be used.
11
+ */
12
+ hasSPAComponent?: boolean;
7
13
  hasErrorBoundary?: boolean;
8
14
  /**
9
15
  * @name Query Params Generator
@@ -19,13 +25,20 @@ export interface IRoutePageExportFlags {
19
25
  disableQueryGenerator?: boolean;
20
26
  }
21
27
  export interface ILoaderReturnInfo {
22
- returnType?: 'json' | 'defer' | '';
23
28
  hasOptions?: boolean;
24
29
  keys?: string[];
25
30
  }
26
31
  export interface IRollupBuildGenerated extends IRoutePageExportFlags {
27
32
  queries?: Record<string, string | object>;
28
33
  componentPath?: string;
34
+ /**
35
+ * @name Fallback Server Component Path
36
+ * @description Optional path to a server-side component to use as an SSR
37
+ * fallback when the primary component is client-only. This allows the
38
+ * generated wrappers to reference a server-safe component for server
39
+ * rendering while using the client component in the SPA bundle.
40
+ */
41
+ fallbackServerComponentPath?: string;
29
42
  loaderReturnInfo?: ILoaderReturnInfo;
30
43
  /**
31
44
  * @name Dialog Path
@@ -14,7 +14,7 @@ export interface IRouteModule extends IMenuDataItem, IGeneratedWrapperOptions {
14
14
  * @name Path
15
15
  * @description The path of the route.
16
16
  */
17
- path?: string;
17
+ path: string;
18
18
  /**
19
19
  * @name Index Route
20
20
  * @description Indicates if this is an index route.
@@ -37,6 +37,15 @@ export interface IRouteModule extends IMenuDataItem, IGeneratedWrapperOptions {
37
37
  component?: () => Promise<{
38
38
  default: ComponentType<any>;
39
39
  }>;
40
+ /**
41
+ * @name Fallback Server Component
42
+ * @description Dynamic import of the fallback server-safe component to use during SSR
43
+ * when the primary component is client-only. This allows the route to render a simpler
44
+ * component on the server while hydrating with the full client component in the browser.
45
+ */
46
+ fallbackServerComponent?: () => Promise<{
47
+ default: ComponentType<any>;
48
+ }>;
40
49
  /**
41
50
  * @name Modal Route
42
51
  * @description Indicates if the route should be displayed as a modal.
@@ -47,7 +56,7 @@ export interface IRouteModule extends IMenuDataItem, IGeneratedWrapperOptions {
47
56
  * @description Dynamic import of the Dialog component for modal routes.
48
57
  */
49
58
  dialog?: () => Promise<{
50
- default: LazyExoticComponent<ComponentType<any>>;
59
+ default: LazyExoticComponent<ComponentType<any>> | ComponentType<any>;
51
60
  }>;
52
61
  /**
53
62
  * @name Nested Routes
@@ -88,7 +97,7 @@ export interface IRouteModule extends IMenuDataItem, IGeneratedWrapperOptions {
88
97
  * @name Authentication Requirement
89
98
  * @description Indicates if authentication is required for the route.
90
99
  */
91
- auth?: boolean;
100
+ auth?: boolean | 'optional';
92
101
  /**
93
102
  * @name Props
94
103
  * @description Extra properties for the route, including initial parameters and UI options.
@@ -163,6 +172,21 @@ export interface IRouteModule extends IMenuDataItem, IGeneratedWrapperOptions {
163
172
  * @description Key for the previous step in a multi-step process, such as onboarding.
164
173
  */
165
174
  prev?: string;
175
+ /**
176
+ * @name System Type
177
+ * @description Determines visibility based on user role - 'system' for admin only, 'user' for common users and owners
178
+ */
179
+ systemType?: 'system' | 'user';
180
+ /**
181
+ * @name Category
182
+ * @description Main category for hierarchical organization (e.g., 'communication', 'administration', 'business', 'content')
183
+ */
184
+ category?: string;
185
+ /**
186
+ * @name Sub Category
187
+ * @description Sub-category for more granular organization (e.g., 'email', 'chat' under 'communication')
188
+ */
189
+ subCategory?: string;
166
190
  /**
167
191
  * @name Additional Properties
168
192
  * @description Allows additional properties to be added as needed.
@@ -1,9 +1,15 @@
1
1
  import { IRollupBuildGenerated } from './rollupRouteGenerated';
2
2
  import { IRouteModule } from './routeCompute';
3
+ /**
4
+ * @name IBaseRouteMap
5
+ * @description Base interface for route mapping that can be shared across platforms
6
+ */
7
+ export interface IBaseRouteMap<T = unknown, R = IRouteModule> {
8
+ [key: string]: R & T;
9
+ }
10
+ export type IRouteMap<T = unknown> = IBaseRouteMap<T, Omit<IRouteModule, 'path'> & Partial<Pick<IRouteModule, 'path'>>>;
3
11
  /**
4
12
  * @name IComputedRoutesArray
5
13
  * @description Represents an array of route objects, each containing dynamic keys mapped to route configurations. This is the `routes.json` file generated from rollup build
6
14
  */
7
- export type IComputedRoutesArray = Array<{
8
- [key: string]: IRouteModule & IRollupBuildGenerated;
9
- }>;
15
+ export type IComputedRoutesArray = Array<IRouteMap<IRollupBuildGenerated>>;
@@ -0,0 +1,50 @@
1
+ import { IRouteModule as IBaseRouteModule } from './routeCompute';
2
+ export interface IReactNavigationProps {
3
+ initialParams?: Record<string, any>;
4
+ initialRouteName?: string;
5
+ component?: React.ComponentType<any> | React.ReactNode;
6
+ unauthenticatedComponent?: React.ComponentType<any> | React.ReactNode;
7
+ options?: {
8
+ headerShown?: boolean;
9
+ headerTitle?: string;
10
+ tabBarLabel?: string;
11
+ tabBarIcon?: string | ((props: {
12
+ color: string;
13
+ }) => JSX.Element);
14
+ tabBarActiveTintColor?: string;
15
+ tabBarInactiveTintColor?: string;
16
+ drawerIcon?: string;
17
+ drawerStyle?: Record<string, any>;
18
+ gestureEnabled?: boolean;
19
+ swipeEnabled?: boolean;
20
+ title?: string;
21
+ };
22
+ screenOptions?: ((options: any) => Record<string, any>) | Record<string, any>;
23
+ drawerContent?: (props: any) => JSX.Element;
24
+ tabBar?: (props: any) => JSX.Element;
25
+ }
26
+ /**
27
+ * Interface extending IRouteModule with mobile-specific navigation properties
28
+ */
29
+ export interface IRouteMobileAdditions extends IBaseRouteModule {
30
+ /**
31
+ * @name Container
32
+ * @description Navigation container function (Stack, Drawer, or BottomTab navigator)
33
+ */
34
+ container?: any;
35
+ /**
36
+ * @name Route Name
37
+ * @description Name of the route for navigation
38
+ */
39
+ name?: string;
40
+ /**
41
+ * @name Navigation Props
42
+ * @description Extended props specific to mobile navigation
43
+ */
44
+ props?: IReactNavigationProps;
45
+ /**
46
+ * @name With Life Cycle Interaction
47
+ * @description Whether to enable life cycle interaction
48
+ */
49
+ withLifeCycleInteraction?: any;
50
+ }
@@ -16,24 +16,109 @@
16
16
  * };
17
17
  */
18
18
  export interface IViteSettings {
19
+ /**
20
+ * When true, instructs the generator to produce client-only artifacts and
21
+ * avoid emitting server-side loader/action wiring (used for SPA builds).
22
+ */
23
+ runSPAOnly?: boolean;
24
+ /**
25
+ * Path to write generated wrapper files (e.g. `WrappedX-<hash>.tsx`). If
26
+ * not provided the generator will fall back to the `app` folder in the
27
+ * project root.
28
+ */
29
+ outputDir?: string;
30
+ /**
31
+ * Disable generation of server loaders for routes. Useful to opt-out of
32
+ * loader wiring when the project prefers client-side data fetching.
33
+ */
19
34
  disableLoader?: boolean;
35
+ /**
36
+ * Disable automatic loader generation for routes with middleware requirements
37
+ * (auth, authority, configurations, permissions). When true, loaders will not
38
+ * be generated automatically even when middleware conditions are present.
39
+ */
40
+ disableLoaderMiddleware?: boolean;
41
+ /**
42
+ * Disable generation of server action handlers for routes.
43
+ */
20
44
  disableAction?: boolean;
45
+ /**
46
+ * Disable generation of client loader helpers. When true, client-side
47
+ * loader wrappers will not be emitted.
48
+ */
21
49
  disableClientLoader?: boolean;
50
+ /**
51
+ * Disable generation of error boundary wrappers for routes.
52
+ */
22
53
  disableErrorBoundary?: boolean;
54
+ /**
55
+ * Disable emitting link imports (e.g. stylesheets) for routes.
56
+ */
23
57
  disableLinks?: boolean;
58
+ /**
59
+ * Disable emitting meta export helpers for routes.
60
+ */
24
61
  disableMeta?: boolean;
62
+ /**
63
+ * Disable generation of hydrate fallback helpers used during SSR -> CSR
64
+ * transitions.
65
+ */
25
66
  disableHydrateFallback?: boolean;
67
+ /**
68
+ * Disable generation of `shouldRevalidate` helpers on routes.
69
+ */
26
70
  disableShouldRevalidate?: boolean;
71
+ /**
72
+ * Disable generating `handle` exports for routes.
73
+ */
27
74
  disableHandle?: boolean;
75
+ /**
76
+ * Disable generation of `headers` export functions for routes.
77
+ */
28
78
  disableHeaders?: boolean;
79
+ /**
80
+ * Disable generation of client-side action wrappers.
81
+ */
29
82
  disableClientAction?: boolean;
83
+ /**
84
+ * When true, the generator will omit any extra props merging into the
85
+ * generated wrapper component props.
86
+ */
30
87
  disableExtraProps?: boolean;
88
+ /**
89
+ * Disable mapping or emission of client-side middleware shims.
90
+ */
31
91
  disableClientMiddlewares?: boolean;
92
+ /**
93
+ * Disable server-side middleware execution for routes. When true, middleware
94
+ * such as auth, authority, configurations, and permissions will not be
95
+ * executed on the server.
96
+ */
97
+ disableMiddleware?: boolean;
98
+ /**
99
+ * Import statement for the layout component used in generated routes.tsx.
100
+ * Used when runSPAOnly is enabled to specify the layout wrapper component.
101
+ * @example "import { DashboardLayout } from '../src/layouts';"
102
+ */
103
+ layoutImport?: string;
104
+ /**
105
+ * Name of the layout component to use in generated routes.tsx.
106
+ * Used when runSPAOnly is enabled to wrap the routes.
107
+ * @default 'DashboardLayout'
108
+ */
109
+ layoutComponent?: string;
110
+ /**
111
+ * Component replacement configuration. When enabled, specific routes may
112
+ * be replaced with a different component path during wrapper generation.
113
+ */
32
114
  componentReplacement?: {
115
+ /** Enable component replacement feature. */
33
116
  enabled?: boolean;
117
+ /** Map of route key -> replacement component path. */
34
118
  replacements?: {
35
119
  [routeKey: string]: string;
36
120
  };
121
+ /** Routes to exclude from replacement even when a global rule exists. */
37
122
  excludeRoutes?: string[];
38
123
  };
39
124
  /**
@@ -42,4 +127,28 @@ export interface IViteSettings {
42
127
  * @default: false
43
128
  */
44
129
  _useFutureCommonPackage?: boolean;
130
+ /**
131
+ * @name overrideRoutes Configuration
132
+ * @description Override routes by replacing old routes with new routes.
133
+ * Can be specified as a single mapping object or an array of mappings.
134
+ * @example
135
+ * // Single mapping
136
+ * overrideRoutes: {
137
+ * oldRoute: '/0/:routeToReplace',
138
+ * newRoute: '/',
139
+ * }
140
+ *
141
+ * // Multiple mappings
142
+ * overrideRoutes: [
143
+ * { oldRoute: '/0/:routeToReplace', newRoute: '/' },
144
+ * { oldRoute: '/nested/path', newRoute: '/simple' }
145
+ * ]
146
+ */
147
+ overrideRoutes?: {
148
+ oldRoute: string;
149
+ newRoute: string;
150
+ } | Array<{
151
+ oldRoute: string;
152
+ newRoute: string;
153
+ }>;
45
154
  }
@@ -1,7 +1,9 @@
1
+ import { ContributionExtensionName, ContributionSchemaId, IPermissionsFlattenedKeys, IConfigurationsFlattenedKeys } from 'common';
1
2
  import { IAuthorityConfig } from './authority';
2
3
  import { IRollupBuildGenerated } from './rollupRouteGenerated';
3
4
  import { IViteSettings } from './viteSettings';
4
5
  export interface IWrapperConfigPaths {
6
+ app?: string;
5
7
  configPermissionWrapper?: string;
6
8
  authMiddlware?: string;
7
9
  configurationMiddlewareExec?: string;
@@ -38,6 +40,16 @@ export interface IResourceParams {
38
40
  * @description Path related to the resource.
39
41
  */
40
42
  path?: string;
43
+ /**
44
+ * @name Extension Name
45
+ * @description Name of the extension for resource identification in dataLoader.
46
+ */
47
+ extensionName?: ContributionExtensionName;
48
+ /**
49
+ * @name Schema ID
50
+ * @description Schema identifier for configuration and preferences input.
51
+ */
52
+ schemaId?: ContributionSchemaId;
41
53
  isExternal?: boolean;
42
54
  organization?: string;
43
55
  resourceGroup?: string;
@@ -49,6 +61,12 @@ export interface IResourceParams {
49
61
  * @description Fields missing from IWrapperOptions that exist in IOptions.
50
62
  */
51
63
  export interface IGeneratedWrapperOptions {
64
+ /**
65
+ * @name Component Name
66
+ * @description The standardized component name used in both the wrapper file export
67
+ * and the routes.tsx import to ensure consistency.
68
+ */
69
+ componentName?: string;
52
70
  /**
53
71
  * @name Wrapper Component Paths
54
72
  * @description Array of wrapper component paths for consistent layout.
@@ -68,7 +86,7 @@ export interface IGeneratedWrapperOptions {
68
86
  * @name Authority
69
87
  * @description List of permissions required to access the route.
70
88
  */
71
- authority?: string[];
89
+ authority?: IPermissionsFlattenedKeys[];
72
90
  /**
73
91
  * @name Additional Parameters
74
92
  * @description Additional parameters for resource configuration.
@@ -77,19 +95,20 @@ export interface IGeneratedWrapperOptions {
77
95
  /**
78
96
  * @name Resource Parameters
79
97
  * @description Parameters specific to resource handling.
98
+ * Can be a single IResourceParams object or an array of IResourceParams objects.
80
99
  */
81
- resourceParams?: IResourceParams;
100
+ resourceParams?: IResourceParams | IResourceParams[];
82
101
  };
83
102
  /**
84
103
  * @name Configurations
85
104
  * @description Configuration keys related to the route.
86
105
  */
87
- configurations?: string[];
106
+ configurations?: IConfigurationsFlattenedKeys[] | ['*'];
88
107
  /**
89
108
  * @name Extra Permissions
90
109
  * @description Additional permissions required for the UI.
91
110
  */
92
- extraPermissions?: string[];
111
+ extraPermissions?: IPermissionsFlattenedKeys[] | ['*'];
93
112
  /**
94
113
  * @name Resource Endpoint
95
114
  * @description Designates the route as a resource endpoint.
@@ -110,6 +129,47 @@ export interface IGeneratedWrapperOptions {
110
129
  * @description The file path to the route's component.
111
130
  */
112
131
  componentPath?: string;
132
+ /**
133
+ * @name Generate SPA Component
134
+ * @description When true, instructs the rollup build process to generate a
135
+ * `.client.tsx` version of the component from the source `componentPath`.
136
+ * This auto-generated SPA component will be optimized for client-only usage.
137
+ */
138
+ generateSPAComponent?: boolean;
139
+ /**
140
+ * @name Has SPA Component
141
+ * @description When true, indicates that a `.client.tsx` version of the component
142
+ * exists alongside the main component file. In SPA-only mode (`runSPAOnly`), the
143
+ * generator will use the `.client.tsx` file instead of the regular component.
144
+ * This allows you to provide optimized client-only versions of components for
145
+ * SPA builds while keeping SSR-compatible versions for regular builds.
146
+ * @example
147
+ * // If componentPath is '@pkg/lib/Dashboard.js' and hasSPAComponent is true,
148
+ * // SPA mode will use '@pkg/lib/Dashboard.client.tsx'
149
+ */
150
+ hasSPAComponent?: boolean;
151
+ /**
152
+ * @name Client Only
153
+ * @description When true, indicates this route's component should be rendered
154
+ * only on the client (no server-side rendering). Use this when the component
155
+ * depends on browser globals (e.g. `window`, `document`, or third-party
156
+ * libraries like maps) and cannot safely run during SSR. This mirrors the
157
+ * `ClientOnly` pattern from `remix-utils` (render nothing on the server and
158
+ * hydrate on the client).
159
+ *
160
+ * For SSR safety you can provide `fallbackServerComponentPath` to render a
161
+ * simpler server-safe component during SSR while the real client component
162
+ * is used in the browser.
163
+ */
164
+ clientOnly?: boolean;
165
+ /**
166
+ * @name Fallback Server Component Path
167
+ * @description Optional path to a server-side component to use as an SSR
168
+ * fallback when the primary component is client-only. This allows the
169
+ * generated wrappers to reference a server-safe component for server
170
+ * rendering while using the client component in the SPA bundle.
171
+ */
172
+ fallbackServerComponentPath?: string;
113
173
  /**
114
174
  * @name Resource URI
115
175
  * @description URI representing the resource associated with the route.
@@ -124,15 +184,25 @@ export interface IGeneratedWrapperOptions {
124
184
  * @name Extra Links
125
185
  * @description Additional links for the route.
126
186
  */
127
- extraLink?: any[];
187
+ extraLinks?: any[];
128
188
  /**
129
189
  * @name Authority Configuration
130
190
  * @description Configuration for authority and permission checks.
131
191
  */
132
192
  authorityConfig?: IAuthorityConfig;
193
+ /**
194
+ * @name Extension Name
195
+ * @description Name of the extension for resource identification in dataLoader.
196
+ */
197
+ extensionName?: string;
198
+ /**
199
+ * @name Schema ID
200
+ * @description Schema identifier for configuration and preferences input.
201
+ */
202
+ schemaId?: string;
133
203
  /**
134
204
  * @name _useFutureCommonPackage Configuration
135
- * @description Whether the package is using common package or not
205
+ * @description Whether the package is using `common` package or not
136
206
  * @default: false
137
207
  */
138
208
  _useFutureCommonPackage?: boolean;
@@ -4,6 +4,8 @@ export declare const CommonType: {
4
4
  HEMERA: string;
5
5
  MOLECULER_BROKER: string;
6
6
  PUBSUB: string;
7
+ REDIS_CLIENT: symbol;
8
+ INNGEST_CLIENT: string;
7
9
  };
8
10
  export declare const TaggedType: {
9
11
  MICROSERVICE: string;
@@ -4,6 +4,8 @@ const CommonType = {
4
4
  HEMERA: 'HEMERA',
5
5
  MOLECULER_BROKER: 'MOLECULER_BROKER',
6
6
  PUBSUB: 'PUBSUB',
7
+ REDIS_CLIENT: Symbol.for('REDIS_CLIENT'),
8
+ INNGEST_CLIENT: 'INNGEST_CLIENT',
7
9
  };
8
10
  const TaggedType = {
9
11
  MICROSERVICE: 'MICROSERVICE',
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sources":["../../src/constants/types.ts"],"sourcesContent":[null],"names":[],"mappings":"AACa,MAAA,UAAU,GAAG;AACtB,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,WAAW,EAAE,aAAa;AAC1B,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,gBAAgB,EAAE,kBAAkB;AACpC,IAAA,MAAM,EAAE,QAAQ;EACnB;AAEY,MAAA,UAAU,GAAG;AACtB,IAAA,YAAY,EAAE,cAAc;EAC/B;AAEY,MAAA,WAAW,GAAG;;AAEvB,IAAA,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;AAC5B,IAAA,YAAY,EAAE,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC;AACxC,IAAA,UAAU,EAAE,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC;AACpC,IAAA,mBAAmB,EAAE,MAAM,CAAC,GAAG,CAAC,qBAAqB,CAAC;AACtD,IAAA,aAAa,EAAE,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC;AAC1C,IAAA,YAAY,EAAE,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC;EAC1C;AAEW,MAAA,aAAa,GAAG;AACzB,IAAA,UAAU,EAAE,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC;AACpC,IAAA,WAAW,EAAE,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC;AACtC,IAAA,UAAU,EAAE,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC;"}
1
+ {"version":3,"file":"types.js","sources":["../../src/constants/types.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAa,MAAA,UAAU,GAAG;AACtB,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,WAAW,EAAE,aAAa;AAC1B,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,gBAAgB,EAAE,kBAAkB;AACpC,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,YAAY,EAAE,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC;AACxC,IAAA,cAAc,EAAE,gBAAgB;EAClC;AAEW,MAAA,UAAU,GAAG;AACtB,IAAA,YAAY,EAAE,cAAc;EAC9B;AAEW,MAAA,WAAW,GAAG;;AAEvB,IAAA,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;AAC5B,IAAA,YAAY,EAAE,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC;AACxC,IAAA,UAAU,EAAE,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC;AACpC,IAAA,mBAAmB,EAAE,MAAM,CAAC,GAAG,CAAC,qBAAqB,CAAC;AACtD,IAAA,aAAa,EAAE,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC;AAC1C,IAAA,YAAY,EAAE,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC;EAC1C;AAEW,MAAA,aAAa,GAAG;AACzB,IAAA,UAAU,EAAE,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC;AACpC,IAAA,WAAW,EAAE,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC;AACtC,IAAA,UAAU,EAAE,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC;"}
package/lib/index.d.ts CHANGED
@@ -2,3 +2,4 @@ export * from './field-error';
2
2
  export * from './interfaces';
3
3
  export * from './constants';
4
4
  export * from './utils';
5
+ export * from './component';
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- export{FieldError}from'./field-error.js';export{ClientTypes,CommonType,ElectronTypes,TaggedType}from'./constants/types.js';export{getEnvironment}from'./utils/getEnvironment.js';export{getGlobalVariable,setGlobalVariable}from'./utils/globalVariable.js';//# sourceMappingURL=index.js.map
1
+ export{FieldError}from'./field-error.js';export{ClientTypes,CommonType,ElectronTypes,TaggedType}from'./constants/types.js';export{getEnvironment}from'./utils/getEnvironment.js';export{getGlobalVariable,setGlobalVariable}from'./utils/globalVariable.js';export{IMenuPosition}from'./component/interfaces/menu.js';//# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@common-stack/core",
3
- "version": "8.0.1-alpha.0",
3
+ "version": "8.1.1-alpha.0",
4
4
  "description": "Common core for higher packages to depend on",
5
- "license": "ISC",
5
+ "license": "UNLICENSED",
6
6
  "author": "CDMBase LLC",
7
7
  "type": "module",
8
8
  "main": "lib/index.js",
@@ -20,11 +20,14 @@
20
20
  "test:watch": "npm test -- --watch",
21
21
  "watch": "yarn build:lib:watch"
22
22
  },
23
+ "devDependencies": {
24
+ "common": "8.1.1-alpha.0"
25
+ },
23
26
  "publishConfig": {
24
27
  "access": "public"
25
28
  },
26
29
  "typescript": {
27
30
  "definition": "lib/index.d.ts"
28
31
  },
29
- "gitHead": "73d9088ae254fbc43425eed5c9f5cd95bd66e921"
32
+ "gitHead": "7fc661e44322b602d561e42de8cb121048ef444f"
30
33
  }
@@ -1 +0,0 @@
1
- export{IMenuPosition}from'./component/interfaces/menu.js';//# sourceMappingURL=index.component.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.component.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}