@grasp-labs/ds-microfrontends-integration 0.9.0 → 0.10.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/README.md CHANGED
@@ -233,6 +233,8 @@ app.use(devAuthMiddleware());
233
233
 
234
234
  Skip the form entirely by setting `DEV_AUTH_TOKEN` (env var or `.env` file) before starting the server. Need a token? Call the dev auth endpoint with your usual credentials and copy the `access_token`.
235
235
 
236
+ After a successful login, the middleware redirects to `process.env.VITE_BASE_PATH` when set, otherwise `/` (override via `redirectAfterLoginPathTo` if needed).
237
+
236
238
  ### Scripts
237
239
 
238
240
  - `npm run build` - Build the library
@@ -251,13 +253,16 @@ Skip the form entirely by setting `DEV_AUTH_TOKEN` (env var or `.env` file) befo
251
253
 
252
254
  ```
253
255
  src/
254
- ├── components/ # React components (vault, translation, schema fields, etc.)
255
- ├── hooks/ # Custom React hooks
256
- ├── lib/ # JSON schema utilities and shared logic
257
- ├── types/ # TypeScript type definitions
258
- ├── utils/ # Shared helper functions
259
- ├── mf-common.ts # Microfrontend configuration utilities
260
- └── index.ts # Main entry point
256
+ ├── components/ # React components
257
+ ├── translation/ # Translation system
258
+ ├── vault/ # Vault secret management
259
+ │ └── SchemaFields/ # JSON Schema form fields
260
+ ├── hooks/ # Custom React hooks
261
+ ├── types/ # TypeScript type definitions
262
+ ├── utils/ # Utility functions
263
+ ├── lib/ # Library utilities (schema, etc.)
264
+ └── mf-common.ts # Microfrontend configuration utilities
265
+ └── index.ts # Main entry point
261
266
  ```
262
267
 
263
268
  ## Contributing
@@ -6,4 +6,3 @@ export { JsonField } from './JsonField';
6
6
  export { NumberField } from './NumberField';
7
7
  export { SchemaFields } from './SchemaFields';
8
8
  export { TextField } from './TextField';
9
- export { VaultField } from './VaultField';
@@ -4,7 +4,6 @@ export type SecretOption = BaseOption & {
4
4
  };
5
5
  export type VaultInputProps = {
6
6
  id?: string;
7
- name?: string;
8
7
  value?: string;
9
8
  onChange?: (secretId: string | null) => void;
10
9
  placeholder?: string;
@@ -17,4 +16,4 @@ export type VaultInputProps = {
17
16
  selectClassName?: string;
18
17
  toggleAriaLabel?: string;
19
18
  };
20
- export declare const VaultInput: ({ id, name, value, onChange, placeholder, label, error, disabled, disableSearch, hideAddButton, className, selectClassName, toggleAriaLabel, }: VaultInputProps) => import("react/jsx-runtime").JSX.Element;
19
+ export declare const VaultInput: ({ id, value, onChange, placeholder, label, error, disabled, disableSearch, hideAddButton, className, selectClassName, toggleAriaLabel, }: VaultInputProps) => import("react/jsx-runtime").JSX.Element;
@@ -8,7 +8,6 @@ declare const meta: {
8
8
  tags: string[];
9
9
  decorators: ((Story: import('storybook/internal/csf').PartialStoryFn<import('@storybook/react').ReactRenderer, {
10
10
  id?: string | undefined;
11
- name?: string | undefined;
12
11
  value?: string | undefined;
13
12
  onChange?: ((secretId: string | null) => void) | undefined;
14
13
  placeholder?: string | undefined;
@@ -27,7 +26,6 @@ declare const meta: {
27
26
  errorMessage?: string | undefined;
28
27
  }>, context: import('storybook/internal/csf').StoryContext<import('@storybook/react').ReactRenderer, {
29
28
  id?: string | undefined;
30
- name?: string | undefined;
31
29
  value?: string | undefined;
32
30
  onChange?: ((secretId: string | null) => void) | undefined;
33
31
  placeholder?: string | undefined;
@@ -9,7 +9,7 @@ export type DevLoginOptions = {
9
9
  /**
10
10
  * Location to redirect to after successful authentication. The same
11
11
  * normalization rules apply as for {@link loginPath}.
12
- * @default "/"
12
+ * @default process.env.VITE_BASE_PATH || "/"
13
13
  */
14
14
  redirectAfterLoginPathTo?: string;
15
15
  /**
@@ -134,10 +134,10 @@ function y(e) {
134
134
  }
135
135
  });
136
136
  }
137
- function E(e = {}) {
137
+ function v(e = {}) {
138
138
  const {
139
139
  loginPath: t = "/__login",
140
- redirectAfterLoginPathTo: r = "/",
140
+ redirectAfterLoginPathTo: r = process.env.VITE_BASE_PATH || "/",
141
141
  authEndpoint: n = "https://auth-dev.grasp-daas.com/rest-auth/login/"
142
142
  } = e, o = g(t, "loginPath"), c = g(
143
143
  r,
@@ -238,5 +238,5 @@ const l = {
238
238
  };
239
239
  export {
240
240
  l as DEV_AUTH_TOKEN,
241
- E as devAuthMiddleware
241
+ v as devAuthMiddleware
242
242
  };