@shipfox/client-config 16.0.0 → 21.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/CHANGELOG.md +20 -0
- package/dist/config-error-screen.d.ts.map +1 -1
- package/dist/config-error-screen.js +29 -22
- package/dist/config-error-screen.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/config-error-screen.test.tsx +7 -1
- package/src/config-error-screen.tsx +20 -18
- package/tsconfig.build.tsbuildinfo +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
$ shipfox-swc
|
|
2
|
-
Successfully compiled: 4 files with swc (
|
|
2
|
+
Successfully compiled: 4 files with swc (143.9ms)
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @shipfox/client-config
|
|
2
2
|
|
|
3
|
+
## 21.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [0f4abe4]
|
|
8
|
+
- Updated dependencies [71d0c44]
|
|
9
|
+
- Updated dependencies [30beb8f]
|
|
10
|
+
- Updated dependencies [16733a7]
|
|
11
|
+
- Updated dependencies [163c40a]
|
|
12
|
+
- Updated dependencies [6703982]
|
|
13
|
+
- Updated dependencies [f1d127e]
|
|
14
|
+
- @shipfox/react-ui@2.0.0
|
|
15
|
+
|
|
16
|
+
## 17.0.0
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies [4b0731e]
|
|
21
|
+
- @shipfox/react-ui@1.2.0
|
|
22
|
+
|
|
3
23
|
## 16.0.0
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-error-screen.d.ts","sourceRoot":"","sources":["../src/config-error-screen.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAErD,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,oDAAoD;IACpD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,EAAC,MAAM,EAAE,OAAO,EAAC,EAAE,sBAAsB,+
|
|
1
|
+
{"version":3,"file":"config-error-screen.d.ts","sourceRoot":"","sources":["../src/config-error-screen.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAErD,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,oDAAoD;IACpD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,EAAC,MAAM,EAAE,OAAO,EAAC,EAAE,sBAAsB,+BA6D1E"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ButtonLink } from '@shipfox/react-ui/button';
|
|
3
|
-
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@shipfox/react-ui/card';
|
|
4
3
|
import { Icon } from '@shipfox/react-ui/icon';
|
|
4
|
+
import { Panel, PanelBody, PanelHeader, PanelTitle } from '@shipfox/react-ui/panel';
|
|
5
5
|
import { Code, Text } from '@shipfox/react-ui/typography';
|
|
6
6
|
/**
|
|
7
7
|
* Full-screen configuration diagnostic shown instead of the app when required
|
|
@@ -14,10 +14,12 @@ import { Code, Text } from '@shipfox/react-ui/typography';
|
|
|
14
14
|
*/ export function ConfigErrorScreen({ errors, docsUrl }) {
|
|
15
15
|
return /*#__PURE__*/ _jsx("main", {
|
|
16
16
|
className: "flex min-h-screen items-center justify-center bg-background-subtle-base px-frame py-frame",
|
|
17
|
-
children: /*#__PURE__*/ _jsxs(
|
|
18
|
-
className: "w-full max-w-[512px]",
|
|
17
|
+
children: /*#__PURE__*/ _jsxs(Panel, {
|
|
18
|
+
className: "w-full max-w-[512px] gap-group",
|
|
19
19
|
children: [
|
|
20
|
-
/*#__PURE__*/ _jsxs(
|
|
20
|
+
/*#__PURE__*/ _jsxs(PanelHeader, {
|
|
21
|
+
variant: "plain",
|
|
22
|
+
className: "flex-col items-start gap-inline",
|
|
21
23
|
children: [
|
|
22
24
|
/*#__PURE__*/ _jsxs("div", {
|
|
23
25
|
className: "flex items-center gap-inline",
|
|
@@ -26,21 +28,23 @@ import { Code, Text } from '@shipfox/react-ui/typography';
|
|
|
26
28
|
name: "errorWarningLine",
|
|
27
29
|
className: "size-20 text-tag-error-icon"
|
|
28
30
|
}),
|
|
29
|
-
/*#__PURE__*/ _jsx(
|
|
31
|
+
/*#__PURE__*/ _jsx(PanelTitle, {
|
|
30
32
|
variant: "h2",
|
|
31
33
|
children: "Configuration error"
|
|
32
34
|
})
|
|
33
35
|
]
|
|
34
36
|
}),
|
|
35
|
-
/*#__PURE__*/ _jsx(
|
|
37
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
38
|
+
size: "sm",
|
|
39
|
+
className: "text-foreground-neutral-muted",
|
|
36
40
|
children: "The Shipfox client could not start because its configuration is missing or invalid. Set the environment variables below and restart the container."
|
|
37
41
|
})
|
|
38
42
|
]
|
|
39
43
|
}),
|
|
40
|
-
/*#__PURE__*/ _jsx(
|
|
44
|
+
/*#__PURE__*/ _jsx(PanelBody, {
|
|
41
45
|
className: "flex flex-col",
|
|
42
46
|
children: errors.map((error)=>/*#__PURE__*/ _jsxs("div", {
|
|
43
|
-
className: "flex flex-col gap-tight border-t border-border-neutral-base py-row first:border-t-0 first:pt-0",
|
|
47
|
+
className: "flex flex-col gap-tight border-t border-border-neutral-base px-row py-row first:border-t-0 first:pt-0",
|
|
44
48
|
children: [
|
|
45
49
|
/*#__PURE__*/ _jsx(Code, {
|
|
46
50
|
variant: "label",
|
|
@@ -86,20 +90,23 @@ import { Code, Text } from '@shipfox/react-ui/typography';
|
|
|
86
90
|
]
|
|
87
91
|
}, error.key))
|
|
88
92
|
}),
|
|
89
|
-
docsUrl ? /*#__PURE__*/
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
93
|
+
docsUrl ? /*#__PURE__*/ _jsx("div", {
|
|
94
|
+
className: "p-panel pt-0",
|
|
95
|
+
children: /*#__PURE__*/ _jsxs(Text, {
|
|
96
|
+
size: "sm",
|
|
97
|
+
className: "text-foreground-neutral-muted",
|
|
98
|
+
children: [
|
|
99
|
+
"See the",
|
|
100
|
+
' ',
|
|
101
|
+
/*#__PURE__*/ _jsx(ButtonLink, {
|
|
102
|
+
href: docsUrl,
|
|
103
|
+
variant: "interactive",
|
|
104
|
+
underline: true,
|
|
105
|
+
children: "self-hosting configuration guide"
|
|
106
|
+
}),
|
|
107
|
+
"."
|
|
108
|
+
]
|
|
109
|
+
})
|
|
103
110
|
}) : null
|
|
104
111
|
]
|
|
105
112
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/config-error-screen.tsx"],"sourcesContent":["import {ButtonLink} from '@shipfox/react-ui/button';\nimport {
|
|
1
|
+
{"version":3,"sources":["../src/config-error-screen.tsx"],"sourcesContent":["import {ButtonLink} from '@shipfox/react-ui/button';\nimport {Icon} from '@shipfox/react-ui/icon';\nimport {Panel, PanelBody, PanelHeader, PanelTitle} from '@shipfox/react-ui/panel';\nimport {Code, Text} from '@shipfox/react-ui/typography';\nimport type {ConfigKeyError} from './load-config.js';\n\nexport interface ConfigErrorScreenProps {\n errors: ConfigKeyError[];\n /** Link to the self-hosting configuration guide. */\n docsUrl?: string;\n}\n\n/**\n * Full-screen configuration diagnostic shown instead of the app when required\n * config is missing or invalid. It lists every problem at once with the exact\n * environment variable to set, so a self-hoster fixes the deployment in one pass\n * rather than discovering errors one failed request at a time.\n *\n * Rendered outside the app's auth/router tree but inside `ThemeProvider` (see\n * main.tsx), so it uses the design system directly.\n */\nexport function ConfigErrorScreen({errors, docsUrl}: ConfigErrorScreenProps) {\n return (\n <main className=\"flex min-h-screen items-center justify-center bg-background-subtle-base px-frame py-frame\">\n <Panel className=\"w-full max-w-[512px] gap-group\">\n <PanelHeader variant=\"plain\" className=\"flex-col items-start gap-inline\">\n <div className=\"flex items-center gap-inline\">\n <Icon name=\"errorWarningLine\" className=\"size-20 text-tag-error-icon\" />\n <PanelTitle variant=\"h2\">Configuration error</PanelTitle>\n </div>\n <Text size=\"sm\" className=\"text-foreground-neutral-muted\">\n The Shipfox client could not start because its configuration is missing or invalid. Set\n the environment variables below and restart the container.\n </Text>\n </PanelHeader>\n\n <PanelBody className=\"flex flex-col\">\n {errors.map((error) => (\n <div\n key={error.key}\n className=\"flex flex-col gap-tight border-t border-border-neutral-base px-row py-row first:border-t-0 first:pt-0\"\n >\n <Code variant=\"label\" bold className=\"text-foreground-neutral-base\">\n {error.key}\n </Code>\n {error.description ? (\n <Text size=\"sm\" className=\"text-foreground-neutral-muted\">\n {error.description}\n </Text>\n ) : null}\n <Text size=\"sm\" className=\"text-tag-error-text\">\n {error.message}\n </Text>\n <Text size=\"xs\" className=\"text-foreground-neutral-muted\">\n Set{' '}\n <Code as=\"code\" variant=\"label\" className=\"text-foreground-neutral-subtle\">\n {error.envVars[0]}\n </Code>{' '}\n (self-hosting) or{' '}\n <Code as=\"code\" variant=\"label\" className=\"text-foreground-neutral-subtle\">\n {error.envVars[1]}\n </Code>{' '}\n (build time).\n </Text>\n </div>\n ))}\n </PanelBody>\n\n {docsUrl ? (\n <div className=\"p-panel pt-0\">\n <Text size=\"sm\" className=\"text-foreground-neutral-muted\">\n See the{' '}\n <ButtonLink href={docsUrl} variant=\"interactive\" underline>\n self-hosting configuration guide\n </ButtonLink>\n .\n </Text>\n </div>\n ) : null}\n </Panel>\n </main>\n );\n}\n"],"names":["ButtonLink","Icon","Panel","PanelBody","PanelHeader","PanelTitle","Code","Text","ConfigErrorScreen","errors","docsUrl","main","className","variant","div","name","size","map","error","bold","key","description","message","as","envVars","href","underline"],"mappings":";AAAA,SAAQA,UAAU,QAAO,2BAA2B;AACpD,SAAQC,IAAI,QAAO,yBAAyB;AAC5C,SAAQC,KAAK,EAAEC,SAAS,EAAEC,WAAW,EAAEC,UAAU,QAAO,0BAA0B;AAClF,SAAQC,IAAI,EAAEC,IAAI,QAAO,+BAA+B;AASxD;;;;;;;;CAQC,GACD,OAAO,SAASC,kBAAkB,EAACC,MAAM,EAAEC,OAAO,EAAyB;IACzE,qBACE,KAACC;QAAKC,WAAU;kBACd,cAAA,MAACV;YAAMU,WAAU;;8BACf,MAACR;oBAAYS,SAAQ;oBAAQD,WAAU;;sCACrC,MAACE;4BAAIF,WAAU;;8CACb,KAACX;oCAAKc,MAAK;oCAAmBH,WAAU;;8CACxC,KAACP;oCAAWQ,SAAQ;8CAAK;;;;sCAE3B,KAACN;4BAAKS,MAAK;4BAAKJ,WAAU;sCAAgC;;;;8BAM5D,KAACT;oBAAUS,WAAU;8BAClBH,OAAOQ,GAAG,CAAC,CAACC,sBACX,MAACJ;4BAECF,WAAU;;8CAEV,KAACN;oCAAKO,SAAQ;oCAAQM,IAAI;oCAACP,WAAU;8CAClCM,MAAME,GAAG;;gCAEXF,MAAMG,WAAW,iBAChB,KAACd;oCAAKS,MAAK;oCAAKJ,WAAU;8CACvBM,MAAMG,WAAW;qCAElB;8CACJ,KAACd;oCAAKS,MAAK;oCAAKJ,WAAU;8CACvBM,MAAMI,OAAO;;8CAEhB,MAACf;oCAAKS,MAAK;oCAAKJ,WAAU;;wCAAgC;wCACpD;sDACJ,KAACN;4CAAKiB,IAAG;4CAAOV,SAAQ;4CAAQD,WAAU;sDACvCM,MAAMM,OAAO,CAAC,EAAE;;wCACX;wCAAI;wCACM;sDAClB,KAAClB;4CAAKiB,IAAG;4CAAOV,SAAQ;4CAAQD,WAAU;sDACvCM,MAAMM,OAAO,CAAC,EAAE;;wCACX;wCAAI;;;;2BAtBTN,MAAME,GAAG;;gBA6BnBV,wBACC,KAACI;oBAAIF,WAAU;8BACb,cAAA,MAACL;wBAAKS,MAAK;wBAAKJ,WAAU;;4BAAgC;4BAChD;0CACR,KAACZ;gCAAWyB,MAAMf;gCAASG,SAAQ;gCAAca,SAAS;0CAAC;;4BAE9C;;;qBAIf;;;;AAIZ"}
|