@shipfox/client-shell 0.2.0 → 2.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 +33 -0
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/dist/vite/evaluate-features.d.ts +0 -1
- package/dist/vite/evaluate-features.d.ts.map +1 -1
- package/dist/vite/evaluate-features.js +60 -47
- package/dist/vite/evaluate-features.js.map +1 -1
- package/dist/vite/generate.js +2 -2
- package/dist/vite/generate.js.map +1 -1
- package/dist/vite/plugin.d.ts.map +1 -1
- package/dist/vite/plugin.js +3 -12
- package/dist/vite/plugin.js.map +1 -1
- package/package.json +28 -49
- package/src/vite/evaluate-features.test.ts +58 -3
- package/src/vite/evaluate-features.ts +71 -50
- package/src/vite/generate.ts +2 -2
- package/src/vite/plugin.test.ts +59 -9
- package/src/vite/plugin.ts +3 -16
- package/test/external/FINDINGS.md +33 -45
- package/test/external/README.md +21 -23
- package/test/external/fixture/package.json +1 -2
- package/test/external/fixture/src/app.fixture.tsx +78 -46
- package/test/external/fixture/src/features/external-settings.tsx +19 -0
- package/test/external/fixture/src/features/login-override.tsx +9 -0
- package/test/external/fixture/src/features.collision.ts +5 -5
- package/test/external/fixture/src/features.ts +49 -3
- package/test/external/fixture/src/link-typecheck.tsx +5 -5
- package/test/external/fixture/src/main.tsx +83 -1
- package/test/external/fixture/src/provider.ts +45 -0
- package/test/external/fixture/tsconfig.json +1 -1
- package/test/external/fixture/vite.config.ts +13 -2
- package/test/external/fixture/vitest.config.ts +3 -1
- package/test/external/verify.mjs +217 -47
- package/test/typecheck/shipfox-app.gen.ts +6 -6
- package/test/typecheck/types.tsx +6 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/test/external/fixture/src/features/override-impl.tsx +0 -12
- package/test/external/fixture/src/features/override.tsx +0 -20
- package/test/external/toy-feature/CHANGELOG.md +0 -15
- package/test/external/toy-feature/node_modules/.bin/shipfox-biome-check +0 -43
- package/test/external/toy-feature/node_modules/.bin/shipfox-biome-format +0 -43
- package/test/external/toy-feature/node_modules/.bin/shipfox-biome-lint +0 -43
- package/test/external/toy-feature/node_modules/.bin/shipfox-swc +0 -43
- package/test/external/toy-feature/node_modules/.bin/shipfox-tsc-check +0 -43
- package/test/external/toy-feature/node_modules/.bin/shipfox-tsc-emit +0 -43
- package/test/external/toy-feature/package.json +0 -57
- package/test/external/toy-feature/src/config.ts +0 -5
- package/test/external/toy-feature/src/index.ts +0 -64
- package/test/external/toy-feature/src/provider.tsx +0 -33
- package/test/external/toy-feature/src/routes/insights.tsx +0 -7
- package/test/external/toy-feature/src/routes/settings.tsx +0 -7
- package/test/external/toy-feature/tsconfig.build.json +0 -5
- package/test/external/toy-feature/tsconfig.json +0 -1
- package/test/not-route-impl.ts +0 -1
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {defineRoute} from '@shipfox/client-shell/runtime';
|
|
2
|
-
|
|
3
|
-
function OverriddenInsights() {
|
|
4
|
-
return <h1>Overridden insights</h1>;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export default defineRoute({
|
|
8
|
-
component: OverriddenInsights,
|
|
9
|
-
validateSearch: (search: Record<string, unknown>) => ({
|
|
10
|
-
view: search.view === 'compact' ? ('compact' as const) : ('full' as const),
|
|
11
|
-
}),
|
|
12
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import {defineClientFeature} from '@shipfox/client-shell';
|
|
2
|
-
import {ProviderProbe} from '@shipfox/client-shell-fixture-feature';
|
|
3
|
-
import {createElement, type PropsWithChildren} from 'react';
|
|
4
|
-
|
|
5
|
-
function AppFeatureProvider({children}: PropsWithChildren) {
|
|
6
|
-
return createElement(ProviderProbe, {id: 'app-feature'}, children);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const overrideFeature = defineClientFeature({
|
|
10
|
-
id: 'fixture.app-override',
|
|
11
|
-
routes: [
|
|
12
|
-
{
|
|
13
|
-
path: '/workspaces/$wid/insights',
|
|
14
|
-
parent: 'workspaceLayout',
|
|
15
|
-
override: true,
|
|
16
|
-
impl: './features/override-impl',
|
|
17
|
-
},
|
|
18
|
-
],
|
|
19
|
-
providers: [{id: 'fixture-app-provider', Component: AppFeatureProvider}],
|
|
20
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# @shipfox/client-shell-fixture-feature
|
|
2
|
-
|
|
3
|
-
## 0.0.3
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- Updated dependencies [3d064b8]
|
|
8
|
-
- Updated dependencies [6bc2e45]
|
|
9
|
-
- @shipfox/client-shell@0.2.0
|
|
10
|
-
|
|
11
|
-
## 0.0.2
|
|
12
|
-
|
|
13
|
-
### Patch Changes
|
|
14
|
-
|
|
15
|
-
- @shipfox/client-shell@0.0.2
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
basedir_win="$basedir"
|
|
4
|
-
exe=""
|
|
5
|
-
msys=""
|
|
6
|
-
|
|
7
|
-
case `uname -a` in
|
|
8
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
9
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
10
|
-
basedir_win=`cygpath -w "$basedir"`
|
|
11
|
-
fi
|
|
12
|
-
exe=".exe"
|
|
13
|
-
msys="true"
|
|
14
|
-
;;
|
|
15
|
-
*WSL2*)
|
|
16
|
-
if command -v wslpath > /dev/null 2>&1; then
|
|
17
|
-
basedir_win="$(wslpath -w "$basedir" 2> /dev/null)"
|
|
18
|
-
if [ $? -ne 0 ] || [ -z "$basedir_win" ]; then
|
|
19
|
-
basedir_win="$basedir"
|
|
20
|
-
else
|
|
21
|
-
exe=".exe"
|
|
22
|
-
fi
|
|
23
|
-
fi
|
|
24
|
-
;;
|
|
25
|
-
esac
|
|
26
|
-
|
|
27
|
-
if [ -z "$NODE_PATH" ]; then
|
|
28
|
-
export NODE_PATH="/Users/noe.charmet/conductor/workspaces/platform-v1/singapore/node_modules/.pnpm/node_modules"
|
|
29
|
-
else
|
|
30
|
-
export NODE_PATH="/Users/noe.charmet/conductor/workspaces/platform-v1/singapore/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
31
|
-
fi
|
|
32
|
-
if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
|
|
33
|
-
exec "$basedir/node.exe" "$basedir_win/../@shipfox/biome/bin/biome-check.js" "$@"
|
|
34
|
-
elif [ -x "$basedir/node" ]; then
|
|
35
|
-
exec "$basedir/node" "$basedir/../@shipfox/biome/bin/biome-check.js" "$@"
|
|
36
|
-
elif command -v node >/dev/null 2>&1; then
|
|
37
|
-
exec node "$basedir/../@shipfox/biome/bin/biome-check.js" "$@"
|
|
38
|
-
elif [ -n "$exe" ] && command -v node.exe >/dev/null 2>&1; then
|
|
39
|
-
exec node.exe "$basedir_win/../@shipfox/biome/bin/biome-check.js" "$@"
|
|
40
|
-
else
|
|
41
|
-
exec node "$basedir/../@shipfox/biome/bin/biome-check.js" "$@"
|
|
42
|
-
fi
|
|
43
|
-
# cmd-shim-target=/Users/noe.charmet/conductor/workspaces/platform-v1/singapore/libs/client/shell/test/external/toy-feature/node_modules/@shipfox/biome/bin/biome-check.js
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
basedir_win="$basedir"
|
|
4
|
-
exe=""
|
|
5
|
-
msys=""
|
|
6
|
-
|
|
7
|
-
case `uname -a` in
|
|
8
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
9
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
10
|
-
basedir_win=`cygpath -w "$basedir"`
|
|
11
|
-
fi
|
|
12
|
-
exe=".exe"
|
|
13
|
-
msys="true"
|
|
14
|
-
;;
|
|
15
|
-
*WSL2*)
|
|
16
|
-
if command -v wslpath > /dev/null 2>&1; then
|
|
17
|
-
basedir_win="$(wslpath -w "$basedir" 2> /dev/null)"
|
|
18
|
-
if [ $? -ne 0 ] || [ -z "$basedir_win" ]; then
|
|
19
|
-
basedir_win="$basedir"
|
|
20
|
-
else
|
|
21
|
-
exe=".exe"
|
|
22
|
-
fi
|
|
23
|
-
fi
|
|
24
|
-
;;
|
|
25
|
-
esac
|
|
26
|
-
|
|
27
|
-
if [ -z "$NODE_PATH" ]; then
|
|
28
|
-
export NODE_PATH="/Users/noe.charmet/conductor/workspaces/platform-v1/singapore/node_modules/.pnpm/node_modules"
|
|
29
|
-
else
|
|
30
|
-
export NODE_PATH="/Users/noe.charmet/conductor/workspaces/platform-v1/singapore/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
31
|
-
fi
|
|
32
|
-
if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
|
|
33
|
-
exec "$basedir/node.exe" "$basedir_win/../@shipfox/biome/bin/biome-format.js" "$@"
|
|
34
|
-
elif [ -x "$basedir/node" ]; then
|
|
35
|
-
exec "$basedir/node" "$basedir/../@shipfox/biome/bin/biome-format.js" "$@"
|
|
36
|
-
elif command -v node >/dev/null 2>&1; then
|
|
37
|
-
exec node "$basedir/../@shipfox/biome/bin/biome-format.js" "$@"
|
|
38
|
-
elif [ -n "$exe" ] && command -v node.exe >/dev/null 2>&1; then
|
|
39
|
-
exec node.exe "$basedir_win/../@shipfox/biome/bin/biome-format.js" "$@"
|
|
40
|
-
else
|
|
41
|
-
exec node "$basedir/../@shipfox/biome/bin/biome-format.js" "$@"
|
|
42
|
-
fi
|
|
43
|
-
# cmd-shim-target=/Users/noe.charmet/conductor/workspaces/platform-v1/singapore/libs/client/shell/test/external/toy-feature/node_modules/@shipfox/biome/bin/biome-format.js
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
basedir_win="$basedir"
|
|
4
|
-
exe=""
|
|
5
|
-
msys=""
|
|
6
|
-
|
|
7
|
-
case `uname -a` in
|
|
8
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
9
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
10
|
-
basedir_win=`cygpath -w "$basedir"`
|
|
11
|
-
fi
|
|
12
|
-
exe=".exe"
|
|
13
|
-
msys="true"
|
|
14
|
-
;;
|
|
15
|
-
*WSL2*)
|
|
16
|
-
if command -v wslpath > /dev/null 2>&1; then
|
|
17
|
-
basedir_win="$(wslpath -w "$basedir" 2> /dev/null)"
|
|
18
|
-
if [ $? -ne 0 ] || [ -z "$basedir_win" ]; then
|
|
19
|
-
basedir_win="$basedir"
|
|
20
|
-
else
|
|
21
|
-
exe=".exe"
|
|
22
|
-
fi
|
|
23
|
-
fi
|
|
24
|
-
;;
|
|
25
|
-
esac
|
|
26
|
-
|
|
27
|
-
if [ -z "$NODE_PATH" ]; then
|
|
28
|
-
export NODE_PATH="/Users/noe.charmet/conductor/workspaces/platform-v1/singapore/node_modules/.pnpm/node_modules"
|
|
29
|
-
else
|
|
30
|
-
export NODE_PATH="/Users/noe.charmet/conductor/workspaces/platform-v1/singapore/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
31
|
-
fi
|
|
32
|
-
if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
|
|
33
|
-
exec "$basedir/node.exe" "$basedir_win/../@shipfox/biome/bin/biome-lint.js" "$@"
|
|
34
|
-
elif [ -x "$basedir/node" ]; then
|
|
35
|
-
exec "$basedir/node" "$basedir/../@shipfox/biome/bin/biome-lint.js" "$@"
|
|
36
|
-
elif command -v node >/dev/null 2>&1; then
|
|
37
|
-
exec node "$basedir/../@shipfox/biome/bin/biome-lint.js" "$@"
|
|
38
|
-
elif [ -n "$exe" ] && command -v node.exe >/dev/null 2>&1; then
|
|
39
|
-
exec node.exe "$basedir_win/../@shipfox/biome/bin/biome-lint.js" "$@"
|
|
40
|
-
else
|
|
41
|
-
exec node "$basedir/../@shipfox/biome/bin/biome-lint.js" "$@"
|
|
42
|
-
fi
|
|
43
|
-
# cmd-shim-target=/Users/noe.charmet/conductor/workspaces/platform-v1/singapore/libs/client/shell/test/external/toy-feature/node_modules/@shipfox/biome/bin/biome-lint.js
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
basedir_win="$basedir"
|
|
4
|
-
exe=""
|
|
5
|
-
msys=""
|
|
6
|
-
|
|
7
|
-
case `uname -a` in
|
|
8
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
9
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
10
|
-
basedir_win=`cygpath -w "$basedir"`
|
|
11
|
-
fi
|
|
12
|
-
exe=".exe"
|
|
13
|
-
msys="true"
|
|
14
|
-
;;
|
|
15
|
-
*WSL2*)
|
|
16
|
-
if command -v wslpath > /dev/null 2>&1; then
|
|
17
|
-
basedir_win="$(wslpath -w "$basedir" 2> /dev/null)"
|
|
18
|
-
if [ $? -ne 0 ] || [ -z "$basedir_win" ]; then
|
|
19
|
-
basedir_win="$basedir"
|
|
20
|
-
else
|
|
21
|
-
exe=".exe"
|
|
22
|
-
fi
|
|
23
|
-
fi
|
|
24
|
-
;;
|
|
25
|
-
esac
|
|
26
|
-
|
|
27
|
-
if [ -z "$NODE_PATH" ]; then
|
|
28
|
-
export NODE_PATH="/Users/noe.charmet/conductor/workspaces/platform-v1/singapore/node_modules/.pnpm/node_modules"
|
|
29
|
-
else
|
|
30
|
-
export NODE_PATH="/Users/noe.charmet/conductor/workspaces/platform-v1/singapore/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
31
|
-
fi
|
|
32
|
-
if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
|
|
33
|
-
exec "$basedir/node.exe" "$basedir_win/../@shipfox/swc/bin/swc.js" "$@"
|
|
34
|
-
elif [ -x "$basedir/node" ]; then
|
|
35
|
-
exec "$basedir/node" "$basedir/../@shipfox/swc/bin/swc.js" "$@"
|
|
36
|
-
elif command -v node >/dev/null 2>&1; then
|
|
37
|
-
exec node "$basedir/../@shipfox/swc/bin/swc.js" "$@"
|
|
38
|
-
elif [ -n "$exe" ] && command -v node.exe >/dev/null 2>&1; then
|
|
39
|
-
exec node.exe "$basedir_win/../@shipfox/swc/bin/swc.js" "$@"
|
|
40
|
-
else
|
|
41
|
-
exec node "$basedir/../@shipfox/swc/bin/swc.js" "$@"
|
|
42
|
-
fi
|
|
43
|
-
# cmd-shim-target=/Users/noe.charmet/conductor/workspaces/platform-v1/singapore/libs/client/shell/test/external/toy-feature/node_modules/@shipfox/swc/bin/swc.js
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
basedir_win="$basedir"
|
|
4
|
-
exe=""
|
|
5
|
-
msys=""
|
|
6
|
-
|
|
7
|
-
case `uname -a` in
|
|
8
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
9
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
10
|
-
basedir_win=`cygpath -w "$basedir"`
|
|
11
|
-
fi
|
|
12
|
-
exe=".exe"
|
|
13
|
-
msys="true"
|
|
14
|
-
;;
|
|
15
|
-
*WSL2*)
|
|
16
|
-
if command -v wslpath > /dev/null 2>&1; then
|
|
17
|
-
basedir_win="$(wslpath -w "$basedir" 2> /dev/null)"
|
|
18
|
-
if [ $? -ne 0 ] || [ -z "$basedir_win" ]; then
|
|
19
|
-
basedir_win="$basedir"
|
|
20
|
-
else
|
|
21
|
-
exe=".exe"
|
|
22
|
-
fi
|
|
23
|
-
fi
|
|
24
|
-
;;
|
|
25
|
-
esac
|
|
26
|
-
|
|
27
|
-
if [ -z "$NODE_PATH" ]; then
|
|
28
|
-
export NODE_PATH="/Users/noe.charmet/conductor/workspaces/platform-v1/singapore/node_modules/.pnpm/node_modules"
|
|
29
|
-
else
|
|
30
|
-
export NODE_PATH="/Users/noe.charmet/conductor/workspaces/platform-v1/singapore/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
31
|
-
fi
|
|
32
|
-
if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
|
|
33
|
-
exec "$basedir/node.exe" "$basedir_win/../@shipfox/typescript/bin/tsc-check.js" "$@"
|
|
34
|
-
elif [ -x "$basedir/node" ]; then
|
|
35
|
-
exec "$basedir/node" "$basedir/../@shipfox/typescript/bin/tsc-check.js" "$@"
|
|
36
|
-
elif command -v node >/dev/null 2>&1; then
|
|
37
|
-
exec node "$basedir/../@shipfox/typescript/bin/tsc-check.js" "$@"
|
|
38
|
-
elif [ -n "$exe" ] && command -v node.exe >/dev/null 2>&1; then
|
|
39
|
-
exec node.exe "$basedir_win/../@shipfox/typescript/bin/tsc-check.js" "$@"
|
|
40
|
-
else
|
|
41
|
-
exec node "$basedir/../@shipfox/typescript/bin/tsc-check.js" "$@"
|
|
42
|
-
fi
|
|
43
|
-
# cmd-shim-target=/Users/noe.charmet/conductor/workspaces/platform-v1/singapore/libs/client/shell/test/external/toy-feature/node_modules/@shipfox/typescript/bin/tsc-check.js
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
basedir_win="$basedir"
|
|
4
|
-
exe=""
|
|
5
|
-
msys=""
|
|
6
|
-
|
|
7
|
-
case `uname -a` in
|
|
8
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
9
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
10
|
-
basedir_win=`cygpath -w "$basedir"`
|
|
11
|
-
fi
|
|
12
|
-
exe=".exe"
|
|
13
|
-
msys="true"
|
|
14
|
-
;;
|
|
15
|
-
*WSL2*)
|
|
16
|
-
if command -v wslpath > /dev/null 2>&1; then
|
|
17
|
-
basedir_win="$(wslpath -w "$basedir" 2> /dev/null)"
|
|
18
|
-
if [ $? -ne 0 ] || [ -z "$basedir_win" ]; then
|
|
19
|
-
basedir_win="$basedir"
|
|
20
|
-
else
|
|
21
|
-
exe=".exe"
|
|
22
|
-
fi
|
|
23
|
-
fi
|
|
24
|
-
;;
|
|
25
|
-
esac
|
|
26
|
-
|
|
27
|
-
if [ -z "$NODE_PATH" ]; then
|
|
28
|
-
export NODE_PATH="/Users/noe.charmet/conductor/workspaces/platform-v1/singapore/node_modules/.pnpm/node_modules"
|
|
29
|
-
else
|
|
30
|
-
export NODE_PATH="/Users/noe.charmet/conductor/workspaces/platform-v1/singapore/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
31
|
-
fi
|
|
32
|
-
if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
|
|
33
|
-
exec "$basedir/node.exe" "$basedir_win/../@shipfox/typescript/bin/tsc-emit.js" "$@"
|
|
34
|
-
elif [ -x "$basedir/node" ]; then
|
|
35
|
-
exec "$basedir/node" "$basedir/../@shipfox/typescript/bin/tsc-emit.js" "$@"
|
|
36
|
-
elif command -v node >/dev/null 2>&1; then
|
|
37
|
-
exec node "$basedir/../@shipfox/typescript/bin/tsc-emit.js" "$@"
|
|
38
|
-
elif [ -n "$exe" ] && command -v node.exe >/dev/null 2>&1; then
|
|
39
|
-
exec node.exe "$basedir_win/../@shipfox/typescript/bin/tsc-emit.js" "$@"
|
|
40
|
-
else
|
|
41
|
-
exec node "$basedir/../@shipfox/typescript/bin/tsc-emit.js" "$@"
|
|
42
|
-
fi
|
|
43
|
-
# cmd-shim-target=/Users/noe.charmet/conductor/workspaces/platform-v1/singapore/libs/client/shell/test/external/toy-feature/node_modules/@shipfox/typescript/bin/tsc-emit.js
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@shipfox/client-shell-fixture-feature",
|
|
3
|
-
"version": "0.0.3",
|
|
4
|
-
"private": true,
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"development": {
|
|
11
|
-
"types": "./src/index.ts",
|
|
12
|
-
"default": "./src/index.ts"
|
|
13
|
-
},
|
|
14
|
-
"default": {
|
|
15
|
-
"types": "./dist/index.d.ts",
|
|
16
|
-
"default": "./dist/index.js"
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"./routes/*": {
|
|
20
|
-
"development": {
|
|
21
|
-
"types": "./src/routes/*.tsx",
|
|
22
|
-
"default": "./src/routes/*.tsx"
|
|
23
|
-
},
|
|
24
|
-
"default": {
|
|
25
|
-
"types": "./dist/routes/*.d.ts",
|
|
26
|
-
"default": "./dist/routes/*.js"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"scripts": {
|
|
31
|
-
"build": "shipfox-swc",
|
|
32
|
-
"check": "shipfox-biome-check",
|
|
33
|
-
"check:fix": "shipfox-biome-check --write",
|
|
34
|
-
"type": "shipfox-tsc-check",
|
|
35
|
-
"type:emit": "shipfox-tsc-emit"
|
|
36
|
-
},
|
|
37
|
-
"dependencies": {
|
|
38
|
-
"@shipfox/client-shell": "workspace:*",
|
|
39
|
-
"@swc/helpers": "catalog:",
|
|
40
|
-
"zod": "catalog:"
|
|
41
|
-
},
|
|
42
|
-
"peerDependencies": {
|
|
43
|
-
"@tanstack/react-query": "^5.101.0",
|
|
44
|
-
"@tanstack/react-router": "^1.170.16",
|
|
45
|
-
"react": "^19.0.0"
|
|
46
|
-
},
|
|
47
|
-
"devDependencies": {
|
|
48
|
-
"@shipfox/biome": "workspace:*",
|
|
49
|
-
"@shipfox/swc": "workspace:*",
|
|
50
|
-
"@shipfox/ts-config": "workspace:*",
|
|
51
|
-
"@shipfox/typescript": "workspace:*",
|
|
52
|
-
"@tanstack/react-query": "catalog:",
|
|
53
|
-
"@tanstack/react-router": "catalog:",
|
|
54
|
-
"@types/react": "catalog:",
|
|
55
|
-
"react": "catalog:"
|
|
56
|
-
}
|
|
57
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import {defineClientFeature} from '@shipfox/client-shell';
|
|
2
|
-
import {toyConfigShape} from './config.js';
|
|
3
|
-
import {ToyFeatureProvider} from './provider.js';
|
|
4
|
-
|
|
5
|
-
export {
|
|
6
|
-
ProviderProbe,
|
|
7
|
-
type ProviderProbeEntry,
|
|
8
|
-
ProviderProbeObserver,
|
|
9
|
-
} from './provider.js';
|
|
10
|
-
|
|
11
|
-
export const toyFeature = defineClientFeature({
|
|
12
|
-
id: 'fixture.toy-feature',
|
|
13
|
-
routes: [
|
|
14
|
-
{
|
|
15
|
-
path: '/workspaces/$wid/insights',
|
|
16
|
-
parent: 'workspaceLayout',
|
|
17
|
-
impl: '@shipfox/client-shell-fixture-feature/routes/insights',
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
path: '/workspaces/$wid/settings/primary',
|
|
21
|
-
parent: 'workspaceSettings',
|
|
22
|
-
impl: '@shipfox/client-shell-fixture-feature/routes/settings',
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
path: '/workspaces/$wid/settings/secondary',
|
|
26
|
-
parent: 'workspaceSettings',
|
|
27
|
-
impl: '@shipfox/client-shell-fixture-feature/routes/settings',
|
|
28
|
-
},
|
|
29
|
-
],
|
|
30
|
-
providers: [{id: 'fixture-toy-provider', Component: ToyFeatureProvider}],
|
|
31
|
-
navigation: [
|
|
32
|
-
{
|
|
33
|
-
id: 'fixture-insights-first',
|
|
34
|
-
scope: 'workspace',
|
|
35
|
-
label: 'Insights first',
|
|
36
|
-
to: '/workspaces/$wid/insights',
|
|
37
|
-
order: 100,
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
id: 'fixture-insights-second',
|
|
41
|
-
scope: 'workspace',
|
|
42
|
-
label: 'Insights second',
|
|
43
|
-
to: '/workspaces/$wid/insights',
|
|
44
|
-
order: 200,
|
|
45
|
-
},
|
|
46
|
-
],
|
|
47
|
-
settingsSections: [
|
|
48
|
-
{
|
|
49
|
-
id: 'fixture-primary-settings',
|
|
50
|
-
pathSegment: 'primary',
|
|
51
|
-
label: 'Primary settings',
|
|
52
|
-
icon: 'userLine',
|
|
53
|
-
order: 100,
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
id: 'fixture-secondary-settings',
|
|
57
|
-
pathSegment: 'secondary',
|
|
58
|
-
label: 'Secondary settings',
|
|
59
|
-
icon: 'settings3Line',
|
|
60
|
-
order: 200,
|
|
61
|
-
},
|
|
62
|
-
],
|
|
63
|
-
configShape: toyConfigShape,
|
|
64
|
-
});
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import {type QueryClient, useQueryClient} from '@tanstack/react-query';
|
|
2
|
-
import {createContext, type PropsWithChildren, useContext, useEffect, useMemo} from 'react';
|
|
3
|
-
|
|
4
|
-
export interface ProviderProbeEntry {
|
|
5
|
-
id: string;
|
|
6
|
-
queryClient: QueryClient;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const ProviderProbeContext = createContext<readonly ProviderProbeEntry[]>([]);
|
|
10
|
-
|
|
11
|
-
export function ProviderProbe({id, children}: PropsWithChildren<{id: string}>) {
|
|
12
|
-
const parentEntries = useContext(ProviderProbeContext);
|
|
13
|
-
const queryClient = useQueryClient();
|
|
14
|
-
const entries = useMemo(
|
|
15
|
-
() => [...parentEntries, {id, queryClient}],
|
|
16
|
-
[id, parentEntries, queryClient],
|
|
17
|
-
);
|
|
18
|
-
return <ProviderProbeContext value={entries}>{children}</ProviderProbeContext>;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export function ProviderProbeObserver({
|
|
22
|
-
onChange,
|
|
23
|
-
}: {
|
|
24
|
-
onChange: (entries: readonly ProviderProbeEntry[]) => void;
|
|
25
|
-
}) {
|
|
26
|
-
const entries = useContext(ProviderProbeContext);
|
|
27
|
-
useEffect(() => onChange(entries), [entries, onChange]);
|
|
28
|
-
return null;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export function ToyFeatureProvider({children}: PropsWithChildren) {
|
|
32
|
-
return <ProviderProbe id="toy-feature">{children}</ProviderProbe>;
|
|
33
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{ "files": [], "references": [{ "path": "tsconfig.build.json" }] }
|
package/test/not-route-impl.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const value = 'not a route implementation';
|