@biffo/cli 0.273.14 → 0.275.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/_skeletons/plugin-template/web-admin/_gitignore +5 -0
- package/_skeletons/plugin-template/web-admin/eslint.config.js +8 -0
- package/_skeletons/plugin-template/web-admin/index.html +12 -0
- package/_skeletons/plugin-template/web-admin/package.json +40 -0
- package/_skeletons/plugin-template/web-admin/pnpm-lock.yaml +2914 -0
- package/_skeletons/plugin-template/web-admin/src/App.test.tsx +22 -0
- package/_skeletons/plugin-template/web-admin/src/App.tsx +50 -0
- package/_skeletons/plugin-template/web-admin/src/base-path.test.ts +65 -0
- package/_skeletons/plugin-template/web-admin/src/index.css +40 -0
- package/_skeletons/plugin-template/web-admin/src/lib/api-core.test.ts +125 -0
- package/_skeletons/plugin-template/web-admin/src/lib/api-core.ts +97 -0
- package/_skeletons/plugin-template/web-admin/src/lib/api.ts +40 -0
- package/_skeletons/plugin-template/web-admin/src/lib/auth.ts +82 -0
- package/_skeletons/plugin-template/web-admin/src/lib/cognito-hygiene.ts +60 -0
- package/_skeletons/plugin-template/web-admin/src/lib/identity.ts +73 -0
- package/_skeletons/plugin-template/web-admin/src/main.tsx +11 -0
- package/_skeletons/plugin-template/web-admin/src/test-setup.ts +1 -0
- package/_skeletons/plugin-template/web-admin/tsconfig.json +21 -0
- package/_skeletons/plugin-template/web-admin/vite.config.ts +28 -0
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
"moduleResolution": "bundler",
|
|
9
|
+
"allowImportingTsExtensions": true,
|
|
10
|
+
"resolveJsonModule": true,
|
|
11
|
+
"isolatedModules": true,
|
|
12
|
+
"noEmit": true,
|
|
13
|
+
"jsx": "react-jsx",
|
|
14
|
+
"strict": true,
|
|
15
|
+
"noUnusedLocals": true,
|
|
16
|
+
"noUnusedParameters": true,
|
|
17
|
+
"noFallthroughCasesInSwitch": true,
|
|
18
|
+
"types": ["vitest/globals", "@testing-library/jest-dom"]
|
|
19
|
+
},
|
|
20
|
+
"include": ["src", "vite.config.ts"]
|
|
21
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { defineConfig } from 'vitest/config'
|
|
2
|
+
import react from '@vitejs/plugin-react'
|
|
3
|
+
|
|
4
|
+
// Served by the shared plugin host at /api/v1/plugins/example-plugin/admin/*
|
|
5
|
+
// (the API Gateway path, not a separate CloudFront/S3 origin the way the
|
|
6
|
+
// founder-facing web/ app is) — every asset/link URL must carry that full
|
|
7
|
+
// prefix, INCLUDING THIS PLUGIN'S OWN NAME. `biffo plugin create` rewrites
|
|
8
|
+
// `example-plugin` to the real slug (see .scaffold-tokens.json); do not hand-edit
|
|
9
|
+
// this after scaffolding without updating BOTH this file and base-path.test.ts.
|
|
10
|
+
//
|
|
11
|
+
// This is not a theoretical trap. idea-scout's copy of this file was pasted
|
|
12
|
+
// from ideation's and kept ideation's base. The built index.html then requested
|
|
13
|
+
// idea-scout's own asset filenames under ideation's path — 503, blank page, and
|
|
14
|
+
// NOT ONE local gate caught it: lint, typecheck, unit tests and the production
|
|
15
|
+
// build all passed, because `base` only affects the URLs inside the emitted
|
|
16
|
+
// HTML. It was visible solely by loading the page and reading the network log.
|
|
17
|
+
//
|
|
18
|
+
// The neighbouring trap: with a short base like "/example-plugin/admin/",
|
|
19
|
+
// CloudFront's 404->index.html rule papers the miss over as a 200 serving the
|
|
20
|
+
// PORTAL's homepage, so the browser tries to parse HTML as JS. Both failure
|
|
21
|
+
// modes are silent in different ways — hence the full path, and hence
|
|
22
|
+
// base-path.test.ts asserting it stays correct rather than trusting eyes alone.
|
|
23
|
+
export default defineConfig({
|
|
24
|
+
base: '/api/v1/plugins/example-plugin/admin/',
|
|
25
|
+
plugins: [react()],
|
|
26
|
+
build: { outDir: 'dist' },
|
|
27
|
+
test: { environment: 'jsdom', globals: true, setupFiles: ['./src/test-setup.ts'] },
|
|
28
|
+
})
|