passflow 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +67 -2
- package/dist/cli.mjs +1755 -0
- package/package.json +42 -3
- package/skills/REVISION +1 -0
- package/skills/index.json +405 -0
- package/skills/passflow-nextjs/SKILL.md +205 -0
- package/skills/passflow-nextjs/assets/.env.example +5 -0
- package/skills/passflow-nextjs/assets/app/account/page.tsx +29 -0
- package/skills/passflow-nextjs/assets/app/actions.example.ts +21 -0
- package/skills/passflow-nextjs/assets/app/api/me/route.ts +22 -0
- package/skills/passflow-nextjs/assets/components/auth-links.tsx +11 -0
- package/skills/passflow-nextjs/assets/lib/call-api.example.ts +15 -0
- package/skills/passflow-nextjs/assets/lib/passflow.ts +4 -0
- package/skills/passflow-nextjs/assets/proxy.ts +10 -0
- package/skills/passflow-nextjs/references/guardrails.md +87 -0
- package/skills/passflow-nextjs/scripts/index.json +405 -0
- package/skills/passflow-nextjs/scripts/lib.sh +1069 -0
- package/skills/passflow-nextjs/scripts/verify.sh +467 -0
- package/skills/passflow-node-api/SKILL.md +188 -0
- package/skills/passflow-node-api/assets/examples/explain-rejection.ts +22 -0
- package/skills/passflow-node-api/assets/examples/express-routes.ts +22 -0
- package/skills/passflow-node-api/assets/examples/fastify-routes.ts +28 -0
- package/skills/passflow-node-api/assets/examples/hono-routes.ts +19 -0
- package/skills/passflow-node-api/assets/src/express-cors.ts +11 -0
- package/skills/passflow-node-api/assets/src/express.ts +13 -0
- package/skills/passflow-node-api/assets/src/fastify-cors.ts +11 -0
- package/skills/passflow-node-api/assets/src/fastify.ts +14 -0
- package/skills/passflow-node-api/assets/src/fetch-handler.ts +13 -0
- package/skills/passflow-node-api/assets/src/hono-cors.ts +11 -0
- package/skills/passflow-node-api/assets/src/hono.ts +16 -0
- package/skills/passflow-node-api/assets/src/passflow.ts +10 -0
- package/skills/passflow-node-api/references/guardrails.md +66 -0
- package/skills/passflow-node-api/scripts/index.json +405 -0
- package/skills/passflow-node-api/scripts/lib.sh +1069 -0
- package/skills/passflow-node-api/scripts/verify.sh +283 -0
- package/skills/passflow-react-vite/SKILL.md +224 -0
- package/skills/passflow-react-vite/assets/server/express-cors.ts +9 -0
- package/skills/passflow-react-vite/assets/server/express.ts +14 -0
- package/skills/passflow-react-vite/assets/server/fastify-cors.ts +11 -0
- package/skills/passflow-react-vite/assets/server/fastify.ts +15 -0
- package/skills/passflow-react-vite/assets/server/hono-cors.ts +8 -0
- package/skills/passflow-react-vite/assets/server/hono.ts +17 -0
- package/skills/passflow-react-vite/assets/server/passflow.ts +19 -0
- package/skills/passflow-react-vite/assets/server/tsconfig.json +14 -0
- package/skills/passflow-react-vite/assets/src/passflow.tsx +28 -0
- package/skills/passflow-react-vite/assets/src/require-sign-in.tsx +35 -0
- package/skills/passflow-react-vite/assets/src/use-api.ts +23 -0
- package/skills/passflow-react-vite/references/guardrails.md +82 -0
- package/skills/passflow-react-vite/scripts/index.json +405 -0
- package/skills/passflow-react-vite/scripts/lib.sh +1069 -0
- package/skills/passflow-react-vite/scripts/verify.sh +678 -0
- package/skills/passflow-tanstack-start/SKILL.md +182 -0
- package/skills/passflow-tanstack-start/assets/.env.example +5 -0
- package/skills/passflow-tanstack-start/assets/src/components/auth-links.tsx +10 -0
- package/skills/passflow-tanstack-start/assets/src/lib/call-api.example.ts +14 -0
- package/skills/passflow-tanstack-start/assets/src/lib/passflow.ts +14 -0
- package/skills/passflow-tanstack-start/assets/src/lib/server-functions.example.ts +20 -0
- package/skills/passflow-tanstack-start/assets/src/routes/account.tsx +25 -0
- package/skills/passflow-tanstack-start/assets/src/routes/api/me.ts +25 -0
- package/skills/passflow-tanstack-start/assets/src/start.ts +14 -0
- package/skills/passflow-tanstack-start/references/guardrails.md +73 -0
- package/skills/passflow-tanstack-start/scripts/index.json +405 -0
- package/skills/passflow-tanstack-start/scripts/lib.sh +1069 -0
- package/skills/passflow-tanstack-start/scripts/verify.sh +470 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import '@passflow/react/dist/style.css';
|
|
2
|
+
import { LoginButton, PassflowProvider } from '@passflow/react';
|
|
3
|
+
import type { ReactNode } from 'react';
|
|
4
|
+
|
|
5
|
+
// Both values are public: Vite puts every VITE_ variable into the browser bundle. Nothing secret goes in VITE_.
|
|
6
|
+
const passflowUrl: string | undefined = import.meta.env.VITE_PASSFLOW_URL;
|
|
7
|
+
const passflowAppId: string | undefined = import.meta.env.VITE_PASSFLOW_APP_ID;
|
|
8
|
+
if (!passflowUrl || !passflowAppId) {
|
|
9
|
+
throw new Error('VITE_PASSFLOW_URL and VITE_PASSFLOW_APP_ID must be set in .env.local');
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// One Passflow client for the whole app. Wrap the root component in it, in src/main.tsx.
|
|
13
|
+
// `offline` is the scope that gets a refresh token, so a reload keeps the user signed in.
|
|
14
|
+
export function PassflowRoot({ children }: { children: ReactNode }) {
|
|
15
|
+
return (
|
|
16
|
+
<PassflowProvider url={passflowUrl} appId={passflowAppId} scopes={['id', 'offline', 'openid']}>
|
|
17
|
+
{children}
|
|
18
|
+
</PassflowProvider>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Signed out it reads "Sign in" and opens the hosted sign-in; signed in it shows the user and signs out.
|
|
23
|
+
// Sign-in and sign-out return to the app's root URL, which is a registered redirect URL of the app.
|
|
24
|
+
// The button's default is the current page's URL, which is registered only when it is the root.
|
|
25
|
+
export function AccountButton() {
|
|
26
|
+
const appRoot = new URL(import.meta.env.BASE_URL, window.location.origin).href;
|
|
27
|
+
return <LoginButton authRedirectOptions={{ redirectUrl: appRoot }} postLogoutRedirectUri={appRoot} />;
|
|
28
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { PassflowEvent, type PassflowSubscriber, useAuth, usePassflow } from '@passflow/react';
|
|
2
|
+
import { type ReactNode, useEffect, useState } from 'react';
|
|
3
|
+
import { AccountButton } from './passflow';
|
|
4
|
+
|
|
5
|
+
// True when this page load is the return from the hosted sign-in: the SDK is still redeeming the code.
|
|
6
|
+
function isSignInReturn(): boolean {
|
|
7
|
+
const params = new URLSearchParams(window.location.search);
|
|
8
|
+
return params.has('code') && (params.has('state') || params.has('user_state'));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// Hides its children from a signed-out user. It renders nothing until the first session check ends,
|
|
12
|
+
// then the children when a user is signed in, else the sign-in button.
|
|
13
|
+
// This only hides a page. The API checks the token on every protected route; that is what protects data.
|
|
14
|
+
export function RequireSignIn({ children }: { children: ReactNode }) {
|
|
15
|
+
const passflow = usePassflow();
|
|
16
|
+
const { isSignedIn, isLoading } = useAuth();
|
|
17
|
+
const [returning, setReturning] = useState(isSignInReturn);
|
|
18
|
+
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
if (!returning) return;
|
|
21
|
+
const subscriber: PassflowSubscriber = { onAuthChange: () => setReturning(false) };
|
|
22
|
+
passflow.subscribe(subscriber, [PassflowEvent.SignIn, PassflowEvent.Error]);
|
|
23
|
+
// A code that is not a Passflow sign-in return gets no event: stop waiting after a while.
|
|
24
|
+
const timer = setTimeout(() => setReturning(false), 15_000);
|
|
25
|
+
return () => {
|
|
26
|
+
clearTimeout(timer);
|
|
27
|
+
passflow.unsubscribe(subscriber);
|
|
28
|
+
};
|
|
29
|
+
}, [passflow, returning]);
|
|
30
|
+
|
|
31
|
+
if (isLoading || (returning && !isSignedIn)) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
return isSignedIn ? <>{children}</> : <AccountButton />;
|
|
35
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type FetchLike, usePassflow } from '@passflow/react';
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
|
|
4
|
+
// The API's origin as the browser calls it, for example http://localhost:8086 or https://api.example.com.
|
|
5
|
+
const apiBase: string | undefined = import.meta.env.VITE_API_URL;
|
|
6
|
+
if (!apiBase) {
|
|
7
|
+
throw new Error('VITE_API_URL must be set in .env.local');
|
|
8
|
+
}
|
|
9
|
+
const apiRoot = apiBase.replace(/\/+$/, '');
|
|
10
|
+
const apiOrigin = new URL(apiRoot).origin;
|
|
11
|
+
|
|
12
|
+
// The full URL of an API path: apiUrl('/api/me').
|
|
13
|
+
export function apiUrl(path: string): string {
|
|
14
|
+
return `${apiRoot}${path}`;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// A fetch for the API. It adds `Authorization: Bearer <access token>` to requests for VITE_API_URL's origin
|
|
18
|
+
// (and the page's own origin) only, and refreshes an expired token first. Requests to any other origin, and
|
|
19
|
+
// requests made while signed out, go out without a token. Never add the header by hand.
|
|
20
|
+
export function useApi(): FetchLike {
|
|
21
|
+
const passflow = usePassflow();
|
|
22
|
+
return useMemo(() => passflow.withAuth(fetch, { origins: [apiOrigin] }), [passflow]);
|
|
23
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Guardrails: React + Vite with a Node API
|
|
2
|
+
|
|
3
|
+
Read this before you edit any auth code in the SPA or its API. Each rule says what to do, why, what to do instead, and whether `scripts/verify.sh` checks it.
|
|
4
|
+
|
|
5
|
+
This stack keeps the user's tokens in browser storage. That is how `@passflow/react` works for a single-page app, and it is allowed here. The rules below are about secrets in the bundle, where the token goes, and what the API checks.
|
|
6
|
+
|
|
7
|
+
## 1. Nothing secret in a `VITE_` variable
|
|
8
|
+
|
|
9
|
+
- **Rule:** a `VITE_` variable holds only public values: the issuer URL, the app's client ID, the API's URL.
|
|
10
|
+
- **Why:** Vite writes every `VITE_` value into the JavaScript it ships. Anyone who opens the app can read it.
|
|
11
|
+
- **Instead:** a secret belongs to a server and is read there from a name without the `VITE_` prefix. This stack needs none: the SPA is a public client with PKCE, and the API verifies tokens with public keys.
|
|
12
|
+
- **Checked:** `verify.sh static` fails on a `VITE_` name containing `SECRET` in the source or a secret-looking `VITE_` name in `.env.local`, and searches `dist/` for the names and values of secrets.
|
|
13
|
+
|
|
14
|
+
## 2. The API checks the token on every protected route
|
|
15
|
+
|
|
16
|
+
- **Rule:** each API route that returns or changes private data has `authenticate` on it (Express, Hono) or a `preHandler` of `app.passflow.authenticate` (Fastify).
|
|
17
|
+
- **Why:** `RequireSignIn` only hides part of a page. The API is reachable without the SPA, by anyone with `curl`.
|
|
18
|
+
- **Instead:** put the check on the route itself, or on a router or Fastify scope that holds only protected routes. Treat `RequireSignIn` as layout, never as access control.
|
|
19
|
+
- **Checked:** `verify.sh run` calls the protected route with no token and with an invalid token, and expects 401 both times.
|
|
20
|
+
|
|
21
|
+
## 3. `PASSFLOW_AUDIENCE` is the SPA app's client ID
|
|
22
|
+
|
|
23
|
+
- **Rule:** the API's `PASSFLOW_AUDIENCE` has the same value as `VITE_PASSFLOW_APP_ID`, and `PASSFLOW_ISSUER` the same as `VITE_PASSFLOW_URL`.
|
|
24
|
+
- **Why:** the access tokens the SPA gets carry `aud = [app ID]`. An invented audience (`api`, a URL) matches no token, so every call gets 401.
|
|
25
|
+
- **Instead:** take both values from the env file the developer filled in. If one is missing, tell the developer; never make one up.
|
|
26
|
+
- **Checked:** no. A wrong value shows as 401 `invalid_token` on every signed-in call.
|
|
27
|
+
|
|
28
|
+
## 4. The token goes to the API's origin only, through `useApi()`
|
|
29
|
+
|
|
30
|
+
- **Rule:** the SPA calls the API with the fetch from `useApi()`. Nothing builds an `Authorization` header by hand or reads the token.
|
|
31
|
+
- **Why:** `withAuth` adds the token only for the page's own origin and the origins listed, and refreshes it first when it has expired. A hand-made header leaks the token to whatever URL the code calls, and goes stale.
|
|
32
|
+
- **Instead:** `const api = useApi();` then `api(apiUrl('/path'))`. Set `VITE_API_URL` to the API's real origin in each environment.
|
|
33
|
+
- **Checked:** no.
|
|
34
|
+
|
|
35
|
+
## 5. Verify tokens with `createVerifier`, never by hand
|
|
36
|
+
|
|
37
|
+
- **Rule:** the API checks every access token with the verifier from `createVerifier`, through the framework adapter. The SPA never decodes a token to decide anything.
|
|
38
|
+
- **Why:** decoding is not verifying. A decoded token has no signature, issuer, audience or expiry check, and anyone can write one that decodes.
|
|
39
|
+
- **Instead:** no `jwt-decode`, no `jsonwebtoken`, no `atob(...)` or base64 `Buffer.from` on a token. In the SPA use `useAuth().isSignedIn`; in the API read claims with `getAuth(...)` after the middleware ran.
|
|
40
|
+
- **Checked:** `verify.sh static` (guardrails) fails on `jwt-decode`, `jsonwebtoken`, `jwtDecode(`, and on `atob(` or a base64 `Buffer.from` in files that handle tokens.
|
|
41
|
+
|
|
42
|
+
## 6. CORS first, the SPA's origin only, `WWW-Authenticate` exposed
|
|
43
|
+
|
|
44
|
+
- **Rule:** the API mounts CORS before every route, allows only `APP_BASE_URL`'s origin, and wraps its options in `exposeChallengeHeader`.
|
|
45
|
+
- **Why:** a preflight that reaches authentication fails, and a 401 without CORS headers is unreadable to the SPA. A browser hides `WWW-Authenticate` from a cross-origin page unless `Access-Control-Expose-Headers` names it. Allowing every origin lets any site call the API from a user's browser.
|
|
46
|
+
- **Instead:** if the API already has CORS, set its origin to `appOrigin` (or add it to its list) and wrap its options in `exposeChallengeHeader`. Otherwise mount the CORS asset, when the CORS package is already a dependency. Keep the existing `credentials` setting and never turn it on: a bearer token needs no credentials.
|
|
47
|
+
- **Checked:** `verify.sh run` checks the 401 to the SPA's origin allows that origin and exposes `WWW-Authenticate`, the preflight allows `Authorization`, and another origin is not allowed.
|
|
48
|
+
|
|
49
|
+
## 7. No server code in the SPA
|
|
50
|
+
|
|
51
|
+
- **Rule:** nothing in `src/` imports from the API's folder, from `@passflow/node` or from a server framework.
|
|
52
|
+
- **Why:** an import pulls the API's code and env names into the browser bundle, and server code does not run there.
|
|
53
|
+
- **Instead:** the SPA talks to the API over HTTP only.
|
|
54
|
+
- **Checked:** `verify.sh static` searches `src/` for imports of `@passflow/node`, `express`, `fastify`, `hono` or a `../server/` or `../api/` path, and searches `dist/` for the API's env names (`PASSFLOW_ISSUER`, `PASSFLOW_AUDIENCE`, `APP_BASE_URL`).
|
|
55
|
+
|
|
56
|
+
## 8. Copy SDK calls from `assets/`, never from memory
|
|
57
|
+
|
|
58
|
+
- **Rule:** every `@passflow/react` and `@passflow/node` import and call in the app matches an asset file.
|
|
59
|
+
- **Why:** the packages have a small, exact surface. A remembered name, prop or import path compiles badly or, worse, compiles and checks nothing.
|
|
60
|
+
- **Instead:** copy the asset, then adapt only what `SKILL.md` allows (file location, the routes, the API's existing CORS).
|
|
61
|
+
- **Checked:** `verify.sh static` type-checks the SPA and the API and builds the SPA.
|
|
62
|
+
|
|
63
|
+
## 9. Never print or log a token
|
|
64
|
+
|
|
65
|
+
- **Rule:** no `console.log`, logger call, error message or response body contains a token, an `Authorization` header or an env value.
|
|
66
|
+
- **Why:** logs and browser consoles are copied, shared and kept. A logged token is a stolen session.
|
|
67
|
+
- **Instead:** to debug a rejection on the API, log `error.code` and `error.reason` of a `PassflowAuthError`, nothing else.
|
|
68
|
+
- **Checked:** no.
|
|
69
|
+
|
|
70
|
+
## 10. Add only the Passflow packages; leave scripts and env files alone
|
|
71
|
+
|
|
72
|
+
- **Rule:** the only dependencies you add are `@passflow/react` and `@passflow/node`. You never create a server, never edit `package.json` scripts, and never create or edit a `.env*` file: `.env.local`, `.env` and `.env.example` included.
|
|
73
|
+
- **Why:** the choice of server packages belongs to the project, and a change through the Passflow service that adds another dependency, touches a script or writes an env file is refused as a whole. The env file holds the developer's real values; the CLI and the service write `.env.example` themselves.
|
|
74
|
+
- **Instead:** when the project needs another package (a CORS package), a start command that loads `.env.local`, or env values, list the exact command or line in the final message to the developer. With no API at all, stop: "add an API first".
|
|
75
|
+
- **Checked:** `verify.sh` refuses a project whose API does not list `express`, `fastify` or `hono`.
|
|
76
|
+
|
|
77
|
+
## 11. The env file stays out of git
|
|
78
|
+
|
|
79
|
+
- **Rule:** `.env.local` is never committed. On the developer's machine, if `git ls-files --error-unmatch .env.local` succeeds, stop and tell the user. A Passflow GitHub App run never starts on such a repository: the service refuses a committed `.env`, `.env.local` or `.env.*.local` before the agent runs.
|
|
80
|
+
- **Why:** a `.gitignore` line does not cover a file git already tracks.
|
|
81
|
+
- **Instead:** tell the user to run `git rm --cached .env.local`, commit, and add `.env.local` to `.gitignore`.
|
|
82
|
+
- **Checked:** no.
|
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": 1,
|
|
3
|
+
"package_managers": {
|
|
4
|
+
"supported": [
|
|
5
|
+
"npm",
|
|
6
|
+
"pnpm",
|
|
7
|
+
"yarn-classic"
|
|
8
|
+
],
|
|
9
|
+
"refused": [
|
|
10
|
+
"yarn-berry",
|
|
11
|
+
"bun"
|
|
12
|
+
],
|
|
13
|
+
"detect": [
|
|
14
|
+
{
|
|
15
|
+
"file": "pnpm-lock.yaml",
|
|
16
|
+
"manager": "pnpm"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"file": "package-lock.json",
|
|
20
|
+
"manager": "npm"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"file": "yarn.lock",
|
|
24
|
+
"manager": "yarn-classic"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"file": ".yarnrc.yml",
|
|
28
|
+
"manager": "yarn-berry"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"file": "bun.lock",
|
|
32
|
+
"manager": "bun"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"file": "bun.lockb",
|
|
36
|
+
"manager": "bun"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"stacks": [
|
|
41
|
+
{
|
|
42
|
+
"id": "tanstack-start",
|
|
43
|
+
"skill": "passflow-tanstack-start",
|
|
44
|
+
"detect": {
|
|
45
|
+
"all": [
|
|
46
|
+
{
|
|
47
|
+
"package": "@tanstack/react-start",
|
|
48
|
+
"range": ">=1.169.5"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"package": "@tanstack/react-router",
|
|
52
|
+
"range": ">=1.170.46"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"app_type": "bff",
|
|
57
|
+
"default_base_url": "http://localhost:3000",
|
|
58
|
+
"env_file": ".env.local",
|
|
59
|
+
"env_keys": [
|
|
60
|
+
"PASSFLOW_ISSUER",
|
|
61
|
+
"PASSFLOW_CLIENT_ID",
|
|
62
|
+
"PASSFLOW_CLIENT_SECRET",
|
|
63
|
+
"PASSFLOW_SECRET",
|
|
64
|
+
"APP_BASE_URL"
|
|
65
|
+
],
|
|
66
|
+
"secret_env_keys": [
|
|
67
|
+
"PASSFLOW_CLIENT_SECRET",
|
|
68
|
+
"PASSFLOW_SECRET"
|
|
69
|
+
],
|
|
70
|
+
"not_provisioned_env_keys": [],
|
|
71
|
+
"packages": [
|
|
72
|
+
{
|
|
73
|
+
"name": "@passflow/tanstack-react-start",
|
|
74
|
+
"version_env": "PASSFLOW_TANSTACK_REACT_START_VERSION",
|
|
75
|
+
"env_keys": [
|
|
76
|
+
"PASSFLOW_ISSUER",
|
|
77
|
+
"PASSFLOW_CLIENT_ID",
|
|
78
|
+
"PASSFLOW_CLIENT_SECRET",
|
|
79
|
+
"PASSFLOW_SECRET",
|
|
80
|
+
"APP_BASE_URL"
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"allowed_paths": [
|
|
85
|
+
"src/**",
|
|
86
|
+
"app/**",
|
|
87
|
+
".gitignore",
|
|
88
|
+
"package.json",
|
|
89
|
+
"package-lock.json",
|
|
90
|
+
"pnpm-lock.yaml",
|
|
91
|
+
"yarn.lock"
|
|
92
|
+
],
|
|
93
|
+
"denied_paths": [
|
|
94
|
+
"next.config.*",
|
|
95
|
+
"vite.config.*",
|
|
96
|
+
"vitest.config.*",
|
|
97
|
+
"app.config.*",
|
|
98
|
+
"tsconfig*.json",
|
|
99
|
+
"jsconfig*.json",
|
|
100
|
+
"postcss.config.*",
|
|
101
|
+
"tailwind.config.*",
|
|
102
|
+
"eslint.config.*",
|
|
103
|
+
".eslintrc*",
|
|
104
|
+
"babel.config.*",
|
|
105
|
+
".babelrc*",
|
|
106
|
+
"turbo.json",
|
|
107
|
+
"nx.json",
|
|
108
|
+
"Dockerfile*",
|
|
109
|
+
"docker-compose*",
|
|
110
|
+
".github/**",
|
|
111
|
+
".env*",
|
|
112
|
+
"**/.env*",
|
|
113
|
+
"scripts/**",
|
|
114
|
+
".npmrc",
|
|
115
|
+
"**/.npmrc",
|
|
116
|
+
".yarnrc",
|
|
117
|
+
".yarnrc.yml",
|
|
118
|
+
".yarn/**",
|
|
119
|
+
".pnp.cjs",
|
|
120
|
+
".pnp.loader.mjs",
|
|
121
|
+
"pnpm-workspace.yaml",
|
|
122
|
+
"npm-shrinkwrap.json",
|
|
123
|
+
"bun.lock",
|
|
124
|
+
"bun.lockb"
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"id": "nextjs",
|
|
129
|
+
"skill": "passflow-nextjs",
|
|
130
|
+
"detect": {
|
|
131
|
+
"all": [
|
|
132
|
+
{
|
|
133
|
+
"package": "next",
|
|
134
|
+
"range": ">=16"
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
"app_type": "bff",
|
|
139
|
+
"default_base_url": "http://localhost:3000",
|
|
140
|
+
"env_file": ".env.local",
|
|
141
|
+
"env_keys": [
|
|
142
|
+
"PASSFLOW_ISSUER",
|
|
143
|
+
"PASSFLOW_CLIENT_ID",
|
|
144
|
+
"PASSFLOW_CLIENT_SECRET",
|
|
145
|
+
"PASSFLOW_SECRET",
|
|
146
|
+
"APP_BASE_URL"
|
|
147
|
+
],
|
|
148
|
+
"secret_env_keys": [
|
|
149
|
+
"PASSFLOW_CLIENT_SECRET",
|
|
150
|
+
"PASSFLOW_SECRET"
|
|
151
|
+
],
|
|
152
|
+
"not_provisioned_env_keys": [],
|
|
153
|
+
"packages": [
|
|
154
|
+
{
|
|
155
|
+
"name": "@passflow/nextjs",
|
|
156
|
+
"version_env": "PASSFLOW_NEXTJS_VERSION",
|
|
157
|
+
"env_keys": [
|
|
158
|
+
"PASSFLOW_ISSUER",
|
|
159
|
+
"PASSFLOW_CLIENT_ID",
|
|
160
|
+
"PASSFLOW_CLIENT_SECRET",
|
|
161
|
+
"PASSFLOW_SECRET",
|
|
162
|
+
"APP_BASE_URL"
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
],
|
|
166
|
+
"allowed_paths": [
|
|
167
|
+
"app/**",
|
|
168
|
+
"src/**",
|
|
169
|
+
"lib/**",
|
|
170
|
+
"components/**",
|
|
171
|
+
"proxy.ts",
|
|
172
|
+
"proxy.js",
|
|
173
|
+
"middleware.ts",
|
|
174
|
+
"middleware.js",
|
|
175
|
+
"src/proxy.ts",
|
|
176
|
+
"src/proxy.js",
|
|
177
|
+
"src/middleware.ts",
|
|
178
|
+
"src/middleware.js",
|
|
179
|
+
".gitignore",
|
|
180
|
+
"package.json",
|
|
181
|
+
"package-lock.json",
|
|
182
|
+
"pnpm-lock.yaml",
|
|
183
|
+
"yarn.lock"
|
|
184
|
+
],
|
|
185
|
+
"denied_paths": [
|
|
186
|
+
"next.config.*",
|
|
187
|
+
"vite.config.*",
|
|
188
|
+
"vitest.config.*",
|
|
189
|
+
"app.config.*",
|
|
190
|
+
"tsconfig*.json",
|
|
191
|
+
"jsconfig*.json",
|
|
192
|
+
"postcss.config.*",
|
|
193
|
+
"tailwind.config.*",
|
|
194
|
+
"eslint.config.*",
|
|
195
|
+
".eslintrc*",
|
|
196
|
+
"babel.config.*",
|
|
197
|
+
".babelrc*",
|
|
198
|
+
"turbo.json",
|
|
199
|
+
"nx.json",
|
|
200
|
+
"Dockerfile*",
|
|
201
|
+
"docker-compose*",
|
|
202
|
+
".github/**",
|
|
203
|
+
".env*",
|
|
204
|
+
"**/.env*",
|
|
205
|
+
"scripts/**",
|
|
206
|
+
".npmrc",
|
|
207
|
+
"**/.npmrc",
|
|
208
|
+
".yarnrc",
|
|
209
|
+
".yarnrc.yml",
|
|
210
|
+
".yarn/**",
|
|
211
|
+
".pnp.cjs",
|
|
212
|
+
".pnp.loader.mjs",
|
|
213
|
+
"pnpm-workspace.yaml",
|
|
214
|
+
"npm-shrinkwrap.json",
|
|
215
|
+
"bun.lock",
|
|
216
|
+
"bun.lockb"
|
|
217
|
+
]
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"id": "react-vite",
|
|
221
|
+
"skill": "passflow-react-vite",
|
|
222
|
+
"detect": {
|
|
223
|
+
"all": [
|
|
224
|
+
{
|
|
225
|
+
"package": "vite"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"package": "react"
|
|
229
|
+
}
|
|
230
|
+
]
|
|
231
|
+
},
|
|
232
|
+
"app_type": "spa",
|
|
233
|
+
"default_base_url": "http://localhost:5173",
|
|
234
|
+
"env_file": ".env.local",
|
|
235
|
+
"env_keys": [
|
|
236
|
+
"VITE_PASSFLOW_URL",
|
|
237
|
+
"VITE_PASSFLOW_APP_ID",
|
|
238
|
+
"VITE_API_URL",
|
|
239
|
+
"PASSFLOW_ISSUER",
|
|
240
|
+
"PASSFLOW_AUDIENCE",
|
|
241
|
+
"APP_BASE_URL"
|
|
242
|
+
],
|
|
243
|
+
"secret_env_keys": [],
|
|
244
|
+
"not_provisioned_env_keys": [
|
|
245
|
+
"VITE_API_URL"
|
|
246
|
+
],
|
|
247
|
+
"packages": [
|
|
248
|
+
{
|
|
249
|
+
"name": "@passflow/react",
|
|
250
|
+
"version_env": "PASSFLOW_REACT_VERSION",
|
|
251
|
+
"env_keys": [
|
|
252
|
+
"VITE_PASSFLOW_URL",
|
|
253
|
+
"VITE_PASSFLOW_APP_ID",
|
|
254
|
+
"VITE_API_URL"
|
|
255
|
+
]
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"name": "@passflow/node",
|
|
259
|
+
"version_env": "PASSFLOW_NODE_VERSION",
|
|
260
|
+
"env_keys": [
|
|
261
|
+
"PASSFLOW_ISSUER",
|
|
262
|
+
"PASSFLOW_AUDIENCE",
|
|
263
|
+
"APP_BASE_URL"
|
|
264
|
+
]
|
|
265
|
+
}
|
|
266
|
+
],
|
|
267
|
+
"allowed_paths": [
|
|
268
|
+
"src/**",
|
|
269
|
+
"server/**",
|
|
270
|
+
"api/**",
|
|
271
|
+
".gitignore",
|
|
272
|
+
"package.json",
|
|
273
|
+
"package-lock.json",
|
|
274
|
+
"pnpm-lock.yaml",
|
|
275
|
+
"yarn.lock"
|
|
276
|
+
],
|
|
277
|
+
"denied_paths": [
|
|
278
|
+
"next.config.*",
|
|
279
|
+
"vite.config.*",
|
|
280
|
+
"vitest.config.*",
|
|
281
|
+
"app.config.*",
|
|
282
|
+
"tsconfig*.json",
|
|
283
|
+
"jsconfig*.json",
|
|
284
|
+
"postcss.config.*",
|
|
285
|
+
"tailwind.config.*",
|
|
286
|
+
"eslint.config.*",
|
|
287
|
+
".eslintrc*",
|
|
288
|
+
"babel.config.*",
|
|
289
|
+
".babelrc*",
|
|
290
|
+
"turbo.json",
|
|
291
|
+
"nx.json",
|
|
292
|
+
"Dockerfile*",
|
|
293
|
+
"docker-compose*",
|
|
294
|
+
".github/**",
|
|
295
|
+
".env*",
|
|
296
|
+
"**/.env*",
|
|
297
|
+
"scripts/**",
|
|
298
|
+
".npmrc",
|
|
299
|
+
"**/.npmrc",
|
|
300
|
+
".yarnrc",
|
|
301
|
+
".yarnrc.yml",
|
|
302
|
+
".yarn/**",
|
|
303
|
+
".pnp.cjs",
|
|
304
|
+
".pnp.loader.mjs",
|
|
305
|
+
"pnpm-workspace.yaml",
|
|
306
|
+
"npm-shrinkwrap.json",
|
|
307
|
+
"bun.lock",
|
|
308
|
+
"bun.lockb",
|
|
309
|
+
"index.html"
|
|
310
|
+
]
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"id": "node-api",
|
|
314
|
+
"skill": "passflow-node-api",
|
|
315
|
+
"detect": {
|
|
316
|
+
"any": [
|
|
317
|
+
{
|
|
318
|
+
"package": "express"
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"package": "fastify"
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"package": "hono"
|
|
325
|
+
}
|
|
326
|
+
]
|
|
327
|
+
},
|
|
328
|
+
"app_type": null,
|
|
329
|
+
"default_base_url": null,
|
|
330
|
+
"env_file": ".env",
|
|
331
|
+
"env_keys": [
|
|
332
|
+
"PASSFLOW_ISSUER",
|
|
333
|
+
"PASSFLOW_AUDIENCE"
|
|
334
|
+
],
|
|
335
|
+
"secret_env_keys": [],
|
|
336
|
+
"not_provisioned_env_keys": [],
|
|
337
|
+
"packages": [
|
|
338
|
+
{
|
|
339
|
+
"name": "@passflow/node",
|
|
340
|
+
"version_env": "PASSFLOW_NODE_VERSION",
|
|
341
|
+
"env_keys": [
|
|
342
|
+
"PASSFLOW_ISSUER",
|
|
343
|
+
"PASSFLOW_AUDIENCE"
|
|
344
|
+
]
|
|
345
|
+
}
|
|
346
|
+
],
|
|
347
|
+
"allowed_paths": [
|
|
348
|
+
"src/**",
|
|
349
|
+
"server/**",
|
|
350
|
+
"lib/**",
|
|
351
|
+
"routes/**",
|
|
352
|
+
"index.ts",
|
|
353
|
+
"index.js",
|
|
354
|
+
"index.mjs",
|
|
355
|
+
"server.ts",
|
|
356
|
+
"server.js",
|
|
357
|
+
"server.mjs",
|
|
358
|
+
"app.ts",
|
|
359
|
+
"app.js",
|
|
360
|
+
"app.mjs",
|
|
361
|
+
"main.ts",
|
|
362
|
+
"main.js",
|
|
363
|
+
"main.mjs",
|
|
364
|
+
".gitignore",
|
|
365
|
+
"package.json",
|
|
366
|
+
"package-lock.json",
|
|
367
|
+
"pnpm-lock.yaml",
|
|
368
|
+
"yarn.lock"
|
|
369
|
+
],
|
|
370
|
+
"denied_paths": [
|
|
371
|
+
"next.config.*",
|
|
372
|
+
"vite.config.*",
|
|
373
|
+
"vitest.config.*",
|
|
374
|
+
"app.config.*",
|
|
375
|
+
"tsconfig*.json",
|
|
376
|
+
"jsconfig*.json",
|
|
377
|
+
"postcss.config.*",
|
|
378
|
+
"tailwind.config.*",
|
|
379
|
+
"eslint.config.*",
|
|
380
|
+
".eslintrc*",
|
|
381
|
+
"babel.config.*",
|
|
382
|
+
".babelrc*",
|
|
383
|
+
"turbo.json",
|
|
384
|
+
"nx.json",
|
|
385
|
+
"Dockerfile*",
|
|
386
|
+
"docker-compose*",
|
|
387
|
+
".github/**",
|
|
388
|
+
".env*",
|
|
389
|
+
"**/.env*",
|
|
390
|
+
"scripts/**",
|
|
391
|
+
".npmrc",
|
|
392
|
+
"**/.npmrc",
|
|
393
|
+
".yarnrc",
|
|
394
|
+
".yarnrc.yml",
|
|
395
|
+
".yarn/**",
|
|
396
|
+
".pnp.cjs",
|
|
397
|
+
".pnp.loader.mjs",
|
|
398
|
+
"pnpm-workspace.yaml",
|
|
399
|
+
"npm-shrinkwrap.json",
|
|
400
|
+
"bun.lock",
|
|
401
|
+
"bun.lockb"
|
|
402
|
+
]
|
|
403
|
+
}
|
|
404
|
+
]
|
|
405
|
+
}
|