@shipfox/client-secrets 17.0.0 → 22.0.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/.turbo/turbo-build.log +1 -1
- package/.turbo/turbo-type.log +0 -1
- package/CHANGELOG.md +33 -0
- package/dist/components/store-section-shell.d.ts +0 -5
- package/dist/components/store-section-shell.d.ts.map +1 -1
- package/dist/components/store-section-shell.js +28 -31
- package/dist/components/store-section-shell.js.map +1 -1
- package/dist/components/workspace-secrets-section.d.ts.map +1 -1
- package/dist/components/workspace-secrets-section.js +8 -7
- package/dist/components/workspace-secrets-section.js.map +1 -1
- package/dist/components/workspace-variables-section.d.ts.map +1 -1
- package/dist/components/workspace-variables-section.js +8 -7
- package/dist/components/workspace-variables-section.js.map +1 -1
- package/dist/routes/secrets-settings.d.ts +3 -0
- package/dist/routes/secrets-settings.js +3 -0
- package/dist/routes/secrets-settings.js.map +1 -1
- package/dist/routes/variables-settings.d.ts +3 -0
- package/dist/routes/variables-settings.js +3 -0
- package/dist/routes/variables-settings.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/src/components/store-section-shell.tsx +20 -25
- package/src/components/workspace-secrets-section.tsx +10 -8
- package/src/components/workspace-variables-section.tsx +10 -8
- package/src/routes/secrets-settings.tsx +1 -0
- package/src/routes/variables-settings.tsx +1 -0
- package/tsconfig.build.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipfox/client-secrets",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "22.0.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/ShipfoxHQ/shipfox.git",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"@tanstack/react-form": "^1.32.0",
|
|
30
30
|
"@shipfox/api-secrets-dto": "12.0.0",
|
|
31
31
|
"@shipfox/client-api": "6.0.1",
|
|
32
|
-
"@shipfox/client-shell": "
|
|
33
|
-
"@shipfox/client-ui": "
|
|
34
|
-
"@shipfox/react-ui": "1.
|
|
32
|
+
"@shipfox/client-shell": "22.0.0",
|
|
33
|
+
"@shipfox/client-ui": "22.0.0",
|
|
34
|
+
"@shipfox/react-ui": "2.1.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@tanstack/react-query": "^5.101.0",
|
|
@@ -1,32 +1,27 @@
|
|
|
1
|
+
import {Panel, PanelBody, PanelRow} from '@shipfox/react-ui/panel';
|
|
1
2
|
import {Skeleton} from '@shipfox/react-ui/skeleton';
|
|
2
|
-
import {cn} from '@shipfox/react-ui/utils';
|
|
3
|
-
|
|
4
|
-
export const STORE_SURFACE_CLASS =
|
|
5
|
-
'overflow-hidden rounded-8 border border-border-neutral-base bg-background-neutral-base';
|
|
6
3
|
|
|
7
4
|
/** Placeholder rows shown while the store list loads. */
|
|
8
5
|
export function StoreRowsSkeleton({label}: {label: string}) {
|
|
9
6
|
return (
|
|
10
|
-
<
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
<Panel>
|
|
8
|
+
<PanelBody asChild>
|
|
9
|
+
<ul role="status" aria-label={label}>
|
|
10
|
+
{[0, 1, 2].map((row) => (
|
|
11
|
+
<PanelRow
|
|
12
|
+
asChild
|
|
13
|
+
className="justify-start gap-cluster hover:bg-background-neutral-base"
|
|
14
|
+
key={row}
|
|
15
|
+
>
|
|
16
|
+
<li>
|
|
17
|
+
<Skeleton className="h-16 w-140" />
|
|
18
|
+
<Skeleton className="h-16 w-96" />
|
|
19
|
+
<Skeleton className="ml-auto h-14 w-80 shrink-0" />
|
|
20
|
+
</li>
|
|
21
|
+
</PanelRow>
|
|
22
|
+
))}
|
|
23
|
+
</ul>
|
|
24
|
+
</PanelBody>
|
|
25
|
+
</Panel>
|
|
21
26
|
);
|
|
22
27
|
}
|
|
23
|
-
|
|
24
|
-
export function StoreSurface({
|
|
25
|
-
className,
|
|
26
|
-
children,
|
|
27
|
-
}: {
|
|
28
|
-
className?: string;
|
|
29
|
-
children: React.ReactNode;
|
|
30
|
-
}) {
|
|
31
|
-
return <div className={cn(STORE_SURFACE_CLASS, className)}>{children}</div>;
|
|
32
|
-
}
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
} from '@shipfox/react-ui/dropdown-menu';
|
|
9
9
|
import {EmptyState} from '@shipfox/react-ui/empty-state';
|
|
10
10
|
import {Modal, ModalContent, ModalHeader, ModalTitle} from '@shipfox/react-ui/modal';
|
|
11
|
+
import {Panel} from '@shipfox/react-ui/panel';
|
|
11
12
|
import {RelativeTime, RelativeTimeProvider} from '@shipfox/react-ui/relative-time';
|
|
12
13
|
import {
|
|
13
14
|
Table,
|
|
@@ -26,7 +27,7 @@ import {copyKeyName} from './copy-key.js';
|
|
|
26
27
|
import {DeleteEntryDialog} from './delete-entry-dialog.js';
|
|
27
28
|
import {secretsErrorToFormError} from './form-errors.js';
|
|
28
29
|
import {SecretForm} from './secret-form.js';
|
|
29
|
-
import {StoreRowsSkeleton
|
|
30
|
+
import {StoreRowsSkeleton} from './store-section-shell.js';
|
|
30
31
|
|
|
31
32
|
const SECRETS_DESCRIPTION =
|
|
32
33
|
'Encrypted, write-only values for sensitive data like API keys, tokens, and passwords.';
|
|
@@ -70,28 +71,29 @@ export function WorkspaceSecretsSection({workspaceId}: {workspaceId: string}) {
|
|
|
70
71
|
{secretsQuery.isPending ? <StoreRowsSkeleton label="Loading secrets" /> : null}
|
|
71
72
|
|
|
72
73
|
{secretsQuery.isError && secretsQuery.data === undefined ? (
|
|
73
|
-
<
|
|
74
|
-
<QueryLoadError query={secretsQuery} subject="secrets" />
|
|
75
|
-
</
|
|
74
|
+
<Panel>
|
|
75
|
+
<QueryLoadError query={secretsQuery} subject="secrets" variant="panel" />
|
|
76
|
+
</Panel>
|
|
76
77
|
) : null}
|
|
77
78
|
|
|
78
79
|
{secretsQuery.data !== undefined && secrets.length === 0 ? (
|
|
79
|
-
<
|
|
80
|
+
<Panel>
|
|
80
81
|
<EmptyState
|
|
81
82
|
icon="keyLine"
|
|
82
83
|
title="No secrets yet"
|
|
83
84
|
description={EMPTY_SECRETS_DESCRIPTION}
|
|
85
|
+
variant="panel"
|
|
84
86
|
action={
|
|
85
87
|
<Button size="sm" onClick={() => setFormState({mode: 'create'})}>
|
|
86
88
|
Create secret
|
|
87
89
|
</Button>
|
|
88
90
|
}
|
|
89
91
|
/>
|
|
90
|
-
</
|
|
92
|
+
</Panel>
|
|
91
93
|
) : null}
|
|
92
94
|
|
|
93
95
|
{secrets.length > 0 ? (
|
|
94
|
-
<
|
|
96
|
+
<Panel>
|
|
95
97
|
<Table>
|
|
96
98
|
<TableHeader>
|
|
97
99
|
<TableRow>
|
|
@@ -114,7 +116,7 @@ export function WorkspaceSecretsSection({workspaceId}: {workspaceId: string}) {
|
|
|
114
116
|
))}
|
|
115
117
|
</TableBody>
|
|
116
118
|
</Table>
|
|
117
|
-
</
|
|
119
|
+
</Panel>
|
|
118
120
|
) : null}
|
|
119
121
|
</section>
|
|
120
122
|
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
} from '@shipfox/react-ui/dropdown-menu';
|
|
9
9
|
import {EmptyState} from '@shipfox/react-ui/empty-state';
|
|
10
10
|
import {Modal, ModalContent, ModalHeader, ModalTitle} from '@shipfox/react-ui/modal';
|
|
11
|
+
import {Panel} from '@shipfox/react-ui/panel';
|
|
11
12
|
import {RelativeTime, RelativeTimeProvider} from '@shipfox/react-ui/relative-time';
|
|
12
13
|
import {
|
|
13
14
|
Table,
|
|
@@ -25,7 +26,7 @@ import {useDeleteVariableMutation, useVariablesQuery} from '#hooks/api/variables
|
|
|
25
26
|
import {copyKeyName} from './copy-key.js';
|
|
26
27
|
import {DeleteEntryDialog} from './delete-entry-dialog.js';
|
|
27
28
|
import {secretsErrorToFormError} from './form-errors.js';
|
|
28
|
-
import {StoreRowsSkeleton
|
|
29
|
+
import {StoreRowsSkeleton} from './store-section-shell.js';
|
|
29
30
|
import {VariableForm} from './variable-form.js';
|
|
30
31
|
|
|
31
32
|
const VARIABLES_DESCRIPTION =
|
|
@@ -70,28 +71,29 @@ export function WorkspaceVariablesSection({workspaceId}: {workspaceId: string})
|
|
|
70
71
|
{variablesQuery.isPending ? <StoreRowsSkeleton label="Loading variables" /> : null}
|
|
71
72
|
|
|
72
73
|
{variablesQuery.isError && variablesQuery.data === undefined ? (
|
|
73
|
-
<
|
|
74
|
-
<QueryLoadError query={variablesQuery} subject="variables" />
|
|
75
|
-
</
|
|
74
|
+
<Panel>
|
|
75
|
+
<QueryLoadError query={variablesQuery} subject="variables" variant="panel" />
|
|
76
|
+
</Panel>
|
|
76
77
|
) : null}
|
|
77
78
|
|
|
78
79
|
{variablesQuery.data !== undefined && variables.length === 0 ? (
|
|
79
|
-
<
|
|
80
|
+
<Panel>
|
|
80
81
|
<EmptyState
|
|
81
82
|
icon="bracesLine"
|
|
82
83
|
title="No variables yet"
|
|
83
84
|
description={EMPTY_VARIABLES_DESCRIPTION}
|
|
85
|
+
variant="panel"
|
|
84
86
|
action={
|
|
85
87
|
<Button size="sm" onClick={() => setFormState({mode: 'create'})}>
|
|
86
88
|
Create variable
|
|
87
89
|
</Button>
|
|
88
90
|
}
|
|
89
91
|
/>
|
|
90
|
-
</
|
|
92
|
+
</Panel>
|
|
91
93
|
) : null}
|
|
92
94
|
|
|
93
95
|
{variables.length > 0 ? (
|
|
94
|
-
<
|
|
96
|
+
<Panel>
|
|
95
97
|
<Table>
|
|
96
98
|
<TableHeader>
|
|
97
99
|
<TableRow>
|
|
@@ -114,7 +116,7 @@ export function WorkspaceVariablesSection({workspaceId}: {workspaceId: string})
|
|
|
114
116
|
))}
|
|
115
117
|
</TableBody>
|
|
116
118
|
</Table>
|
|
117
|
-
</
|
|
119
|
+
</Panel>
|
|
118
120
|
) : null}
|
|
119
121
|
</section>
|
|
120
122
|
|
|
@@ -2,5 +2,6 @@ import {defineRoute, useActiveWorkspace} from '@shipfox/client-shell/runtime';
|
|
|
2
2
|
import {WorkspaceSecretsSection} from '#index.js';
|
|
3
3
|
|
|
4
4
|
export default defineRoute({
|
|
5
|
+
staticData: {frame: 'content'},
|
|
5
6
|
component: () => <WorkspaceSecretsSection workspaceId={useActiveWorkspace().id} />,
|
|
6
7
|
});
|
|
@@ -2,5 +2,6 @@ import {defineRoute, useActiveWorkspace} from '@shipfox/client-shell/runtime';
|
|
|
2
2
|
import {WorkspaceVariablesSection} from '#index.js';
|
|
3
3
|
|
|
4
4
|
export default defineRoute({
|
|
5
|
+
staticData: {frame: 'content'},
|
|
5
6
|
component: () => <WorkspaceVariablesSection workspaceId={useActiveWorkspace().id} />,
|
|
6
7
|
});
|