create-keboola-app 0.1.1 → 0.2.1

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/README.md +16 -11
  3. package/dist/{blocks-DYU5Ke29.js → blocks-BdJaEmz1.js} +36 -20
  4. package/dist/cli.js +29 -52
  5. package/dist/extract.js +9 -14
  6. package/dist/{regions-B3r5LhXl.js → regions-BNl4QsPP.js} +12 -22
  7. package/dist/{sanitize-CKs8pAzZ.js → sanitize-DVFBkv8b.js} +14 -24
  8. package/dist/sanitize.js +1 -2
  9. package/dist/template/AGENTS.md +20 -6
  10. package/dist/template/README.md +5 -0
  11. package/dist/template/oxlint.config.ts +10 -14
  12. package/dist/template/package.json +21 -20
  13. package/dist/template/src/auth/AuthScreen.test.tsx +44 -0
  14. package/dist/template/src/auth/AuthScreen.tsx +43 -0
  15. package/dist/template/src/auth/session.test.tsx +64 -0
  16. package/dist/template/src/auth/session.ts +42 -0
  17. package/dist/template/src/auth/states.tsx +70 -0
  18. package/dist/template/src/components/AppChrome.tsx +26 -74
  19. package/dist/template/src/components/SelectionFloater.tsx +10 -3
  20. package/dist/template/src/components/SidebarModeMenu.tsx +8 -13
  21. package/dist/template/src/nav.ts +6 -11
  22. package/dist/template/src/{routes/-fixtures.ts → overview-fixtures.ts} +6 -18
  23. package/dist/template/src/{routes/-hooks.ts → overview-hooks.ts} +1 -1
  24. package/dist/template/src/overview-sections.tsx +4 -1
  25. package/dist/template/src/recipes/Chart.test.tsx +1 -3
  26. package/dist/template/src/recipes/Chart.tsx +4 -11
  27. package/dist/template/src/recipes/DataGrid.test.tsx +1 -1
  28. package/dist/template/src/recipes/DataGrid.tsx +7 -21
  29. package/dist/template/src/routes/__root.tsx +21 -0
  30. package/dist/template/src/routes/{-index.test.tsx → index.test.tsx} +1 -1
  31. package/dist/template/src/routes/index.tsx +2 -3
  32. package/dist/template/src/routes/signed-out.test.tsx +56 -0
  33. package/dist/template/src/routes/signed-out.tsx +31 -0
  34. package/dist/template/src/routes/tokens/$id.tsx +2 -2
  35. package/dist/template/src/routes/tokens/{-index.test.tsx → index.test.tsx} +2 -2
  36. package/dist/template/src/routes/tokens/index.tsx +2 -3
  37. package/dist/template/src/routes/tokens/new.tsx +2 -2
  38. package/dist/template/src/sections/kpi.tsx +3 -7
  39. package/dist/template/src/slices/assistant.ts +3 -9
  40. package/dist/template/src/slices/shell.ts +4 -11
  41. package/dist/template/src/store.ts +9 -24
  42. package/dist/template/src/{routes/tokens/-fixtures.test.ts → tokens/fixtures.test.ts} +1 -1
  43. package/dist/template/src/{routes/tokens/-fixtures.ts → tokens/fixtures.ts} +1 -1
  44. package/dist/template/src/{routes/tokens/-hooks.ts → tokens/hooks.ts} +2 -2
  45. package/dist/template/src/{routes/tokens/-nav.ts → tokens/nav.ts} +1 -1
  46. package/dist/template/vite.config.ts +5 -0
  47. package/dist/template/vitest.config.ts +2 -5
  48. package/package.json +13 -12
  49. /package/dist/template/src/{routes/tokens/-types.ts → tokens/types.ts} +0 -0
@@ -1,4 +1,4 @@
1
- import type { CreateTokenInput, Token } from './-types';
1
+ import type { CreateTokenInput, Token } from './types';
2
2
 
3
3
  // Hand-rolled in-memory store — replaces a real API until @keboola/api-client
4
4
  // gains a typed Tokens namespace. Swap fetchTokens / createToken for real API
@@ -1,7 +1,7 @@
1
1
  import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
2
2
 
3
- import { createToken, fetchToken, fetchTokens } from './-fixtures';
4
- import type { CreateTokenInput } from './-types';
3
+ import { createToken, fetchToken, fetchTokens } from './fixtures';
4
+ import type { CreateTokenInput } from './types';
5
5
 
6
6
  const queryKeys = {
7
7
  all: ['tokens'] as const,
@@ -1,6 +1,6 @@
1
1
  import { KeyRound } from '@keboola/design/icons';
2
2
 
3
- import type { NavItem } from '../../nav';
3
+ import type { NavItem } from '../nav';
4
4
 
5
5
  /**
6
6
  * This module's entry in the rail.
@@ -9,6 +9,11 @@ export default defineConfig({
9
9
  TanStackRouterVite({
10
10
  routesDirectory: './src/routes',
11
11
  generatedRouteTree: './src/routeTree.gen.ts',
12
+ /**
13
+ * - A test file exports no `Route`, so unmatched it costs a generator warning per build.
14
+ * - Matched against the file name, not the path.
15
+ */
16
+ routeFileIgnorePattern: '\\.test\\.tsx?$',
12
17
  }),
13
18
  react(),
14
19
  tailwindcss(),
@@ -6,11 +6,8 @@ export default defineConfig({
6
6
  globals: true,
7
7
  environment: 'jsdom',
8
8
  setupFiles: ['./src/test-setup.ts'],
9
- // This suite runs inside the repo-wide `Checks` job, so it shares a 2-core
10
- // runner with every other package's tests — ~25x slower per test than a dev
11
- // machine here (measured: AssistantPanel's two prompt tests are 156ms/199ms
12
- // locally, 3881ms/5189ms there). The 5s default clips whichever one loses the
13
- // race; the userEvent-driven tests get headroom instead.
9
+ // The shared 2-core `Checks` runner is ~25x slower than a dev machine; the 5s default
10
+ // clips userEvent-driven tests.
14
11
  testTimeout: 15000,
15
12
  },
16
13
  resolve: {
package/package.json CHANGED
@@ -1,9 +1,12 @@
1
1
  {
2
2
  "name": "create-keboola-app",
3
- "version": "0.1.1",
3
+ "version": "0.2.1",
4
4
  "description": "Scaffold a Keboola-shaped frontend app — Vite + React 19 + TanStack Router/Query/Form + Zustand + @keboola/design — from a minimal shell plus the blocks you pick",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
+ "bin": {
8
+ "create-keboola-app": "./dist/cli.js"
9
+ },
7
10
  "files": [
8
11
  "dist",
9
12
  "README.md",
@@ -35,19 +38,20 @@
35
38
  "cli"
36
39
  ],
37
40
  "dependencies": {
38
- "@tanstack/router-generator": "^1.120.4"
41
+ "@tanstack/router-generator": "^1.167.46"
39
42
  },
40
43
  "devDependencies": {
44
+ "@keboola/eslint-plugin-design": "^0.8.0",
45
+ "@keboola/oxlint-config": "^10.3.0",
46
+ "@keboola/tsconfig": "^0.2.1",
41
47
  "@types/node": "24.12.0",
42
48
  "@typescript/native": "npm:typescript@^7.0.2",
43
- "oxfmt": "^0.57.0",
44
- "oxlint": "^1.72.0",
49
+ "oxfmt": "^0.66.0",
50
+ "oxlint": "^1.89.0",
45
51
  "tsdown": "^0.22.14",
46
52
  "typescript": "npm:@typescript/typescript6@^6.0.2",
47
- "vite": "^8.1.5",
48
- "vitest": "^4.1.10",
49
- "@keboola/oxlint-config": "^10.0.2",
50
- "@keboola/tsconfig": "^0.2.1"
53
+ "vite": "^8.3.5",
54
+ "vitest": "^5.0.5"
51
55
  },
52
56
  "scripts": {
53
57
  "build": "tsdown && node dist/extract.js",
@@ -57,10 +61,7 @@
57
61
  "lint:oxlint": "oxlint . --quiet",
58
62
  "knip:check": "pnpm --dir ../.. exec knip --workspace packages/create-keboola-app",
59
63
  "knip:fix": "pnpm --dir ../.. exec knip --workspace packages/create-keboola-app --fix-type types,exports,files",
60
- "test": "vitest run --passWithNoTests --reporter=dot",
64
+ "test": "vitest run --reporter=dot",
61
65
  "type-check": "tsc"
62
- },
63
- "bin": {
64
- "create-keboola-app": "./dist/cli.js"
65
66
  }
66
67
  }