@redential/cli 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.
Files changed (46) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +217 -0
  3. package/dist/build-bundle.js +37 -0
  4. package/dist/categorize.js +25 -0
  5. package/dist/churn-exclusions.js +51 -0
  6. package/dist/cli.js +87 -0
  7. package/dist/config.js +13 -0
  8. package/dist/credentials.js +26 -0
  9. package/dist/errors.js +20 -0
  10. package/dist/git.js +141 -0
  11. package/dist/hash.js +4 -0
  12. package/dist/http-client.js +129 -0
  13. package/dist/import-detect.js +281 -0
  14. package/dist/login.js +133 -0
  15. package/dist/logout.js +6 -0
  16. package/dist/merkle.js +20 -0
  17. package/dist/prompt.js +70 -0
  18. package/dist/public-remote.js +43 -0
  19. package/dist/salt.js +20 -0
  20. package/dist/scan-command.js +24 -0
  21. package/dist/scan.js +145 -0
  22. package/dist/secret-scan.js +37 -0
  23. package/dist/skill-detect.js +234 -0
  24. package/dist/submit-command.js +49 -0
  25. package/dist/submit.js +71 -0
  26. package/dist/summary.js +148 -0
  27. package/dist/types.js +12 -0
  28. package/dist/version-check.js +62 -0
  29. package/package.json +48 -0
  30. package/signatures/ai/vector-search.json +39 -0
  31. package/signatures/ai/whisper.json +36 -0
  32. package/signatures/auth/firebase-auth.json +43 -0
  33. package/signatures/auth/oauth-oidc.json +41 -0
  34. package/signatures/auth/supabase-auth.json +29 -0
  35. package/signatures/backend/axum.json +24 -0
  36. package/signatures/db/activerecord.json +21 -0
  37. package/signatures/db/eloquent.json +22 -0
  38. package/signatures/db/supabase.json +31 -0
  39. package/signatures/frontend/tailwind.json +28 -0
  40. package/signatures/infra/docker.json +20 -0
  41. package/signatures/infra/github-actions.json +19 -0
  42. package/signatures/infra/kubernetes.json +21 -0
  43. package/signatures/infra/terraform.json +22 -0
  44. package/signatures/package-map.json +483 -0
  45. package/signatures/testing/jest.json +25 -0
  46. package/taxonomy.json +119 -0
@@ -0,0 +1,36 @@
1
+ {
2
+ "slug": "ai/whisper",
3
+ "importPatterns": [],
4
+ "apiPatterns": [
5
+ "openai\\.audio\\.transcriptions\\.create\\(",
6
+ "[\"']whisper-1[\"']",
7
+ "pipeline\\(\\s*[\"']automatic-speech-recognition[\"']"
8
+ ],
9
+ "configFilePatterns": [],
10
+ "fixtures": {
11
+ "positive": [
12
+ {
13
+ "path": "src/lib/whisper-openai.ts",
14
+ "diff": "const transcript = await openai.audio.transcriptions.create({ file, model: \"whisper-1\" });"
15
+ },
16
+ {
17
+ "path": "src/lib/whisper-local.ts",
18
+ "diff": "import { pipeline } from \"@xenova/transformers\";\nconst transcriber = await pipeline(\"automatic-speech-recognition\", \"openai/whisper-tiny.en\");"
19
+ },
20
+ {
21
+ "path": "src/lib/whisper-local.js",
22
+ "diff": "const { pipeline } = require(\"@xenova/transformers\");\nconst transcriber = await pipeline(\"automatic-speech-recognition\");"
23
+ }
24
+ ],
25
+ "negative": [
26
+ {
27
+ "path": "README.md",
28
+ "diff": "We looked at OpenAI's Whisper model and the @xenova/transformers whisper-tiny build but ended up using a third-party transcription vendor instead."
29
+ },
30
+ {
31
+ "path": "src/lib/embeddings.ts",
32
+ "diff": "import { pipeline } from \"@xenova/transformers\";\nconst embedder = await pipeline(\"feature-extraction\", \"Xenova/all-MiniLM-L6-v2\");"
33
+ }
34
+ ]
35
+ }
36
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "slug": "auth/firebase-auth",
3
+ "importPatterns": [
4
+ "from\\s+[\"']firebase(-admin)?/auth[\"']",
5
+ "require\\(\\s*[\"']firebase(-admin)?/auth[\"']\\s*\\)"
6
+ ],
7
+ "apiPatterns": [
8
+ "\\bsignInWithEmailAndPassword\\(",
9
+ "\\bsignInWithPopup\\(",
10
+ "\\bcreateUserWithEmailAndPassword\\("
11
+ ],
12
+ "configFilePatterns": [],
13
+ "fixtures": {
14
+ "positive": [
15
+ {
16
+ "path": "src/lib/firebase.ts",
17
+ "diff": "import { getAuth, signInWithEmailAndPassword } from \"firebase/auth\";\nconst auth = getAuth(app);\nawait signInWithEmailAndPassword(auth, email, password);"
18
+ },
19
+ {
20
+ "path": "src/lib/firebase-admin.ts",
21
+ "diff": "import { getAuth } from \"firebase-admin/auth\";\nconst adminAuth = getAuth();"
22
+ },
23
+ {
24
+ "path": "src/lib/firebase-social.ts",
25
+ "diff": "import { getAuth, signInWithPopup, GoogleAuthProvider, createUserWithEmailAndPassword } from \"firebase/auth\";\nconst auth = getAuth(app);\nawait signInWithPopup(auth, new GoogleAuthProvider());\nawait createUserWithEmailAndPassword(auth, email, password);"
26
+ },
27
+ {
28
+ "path": "src/lib/firebase-legacy.js",
29
+ "diff": "const { getAuth } = require(\"firebase/auth\");\nconst auth = getAuth();"
30
+ }
31
+ ],
32
+ "negative": [
33
+ {
34
+ "path": "README.md",
35
+ "diff": "We use Firebase for Firestore and Storage in this service, not for authentication."
36
+ },
37
+ {
38
+ "path": "src/lib/clerk.ts",
39
+ "diff": "import { getAuth } from \"@clerk/nextjs/server\";\nconst { userId } = getAuth(req);"
40
+ }
41
+ ]
42
+ }
43
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "slug": "auth/oauth-oidc",
3
+ "importPatterns": [
4
+ "from\\s+[\"']openid-client[\"']",
5
+ "from\\s+[\"']oauth4webapi[\"']",
6
+ "require\\(\\s*[\"'](openid-client|oauth4webapi)[\"']\\s*\\)"
7
+ ],
8
+ "apiPatterns": [
9
+ "grant_type=authorization_code",
10
+ "response_type=code",
11
+ "code_verifier",
12
+ "\\.well-known/openid-configuration"
13
+ ],
14
+ "configFilePatterns": [],
15
+ "fixtures": {
16
+ "positive": [
17
+ {
18
+ "path": "src/lib/oidc.ts",
19
+ "diff": "import { Configuration, authorizationCodeGrant } from \"openid-client\";\nconst config = new Configuration(issuer, clientId, clientSecret);"
20
+ },
21
+ {
22
+ "path": "src/lib/oauth-client.ts",
23
+ "diff": "import * as oauth from \"oauth4webapi\";\nconst tokenUrl = `https://provider.example.com/token?grant_type=authorization_code&code_verifier=${codeVerifier}`;"
24
+ },
25
+ {
26
+ "path": "src/lib/oidc-discovery.ts",
27
+ "diff": "import { discovery } from \"openid-client\";\nconst authUrl = `${issuer}/authorize?response_type=code&client_id=${clientId}&redirect_uri=${redirectUri}`;\nconst discoveryUrl = `${issuer}/.well-known/openid-configuration`;"
28
+ },
29
+ {
30
+ "path": "src/lib/oidc-legacy.js",
31
+ "diff": "const { Issuer } = require(\"openid-client\");"
32
+ }
33
+ ],
34
+ "negative": [
35
+ {
36
+ "path": "README.md",
37
+ "diff": "We discussed adding generic OAuth/OIDC support with PKCE and discovery documents but shipped Supabase's built-in provider instead."
38
+ }
39
+ ]
40
+ }
41
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "slug": "auth/supabase-auth",
3
+ "importPatterns": [
4
+ "from\\s+[\"']@supabase/(ssr|auth-helpers-nextjs|supabase-js)[\"']",
5
+ "require\\(\\s*[\"']@supabase/(ssr|auth-helpers-nextjs|supabase-js)[\"']\\s*\\)"
6
+ ],
7
+ "apiPatterns": [
8
+ "\\bsupabase\\.auth\\.(signInWithPassword|signInWithOAuth|getUser|getSession|exchangeCodeForSession|onAuthStateChange)\\("
9
+ ],
10
+ "configFilePatterns": [],
11
+ "fixtures": {
12
+ "positive": [
13
+ {
14
+ "path": "src/lib/supabase/server.ts",
15
+ "diff": "import { createServerClient } from \"@supabase/ssr\";\nconst supabase = createServerClient(url, key, cookieOptions);\nconst { data } = await supabase.auth.getUser();"
16
+ },
17
+ {
18
+ "path": "src/lib/supabase-client.js",
19
+ "diff": "const { createClient } = require(\"@supabase/supabase-js\");"
20
+ }
21
+ ],
22
+ "negative": [
23
+ {
24
+ "path": "README.md",
25
+ "diff": "We use Supabase for the Postgres database in this project, not for auth -- auth is handled by our own session cookies."
26
+ }
27
+ ]
28
+ }
29
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "slug": "backend/axum",
3
+ "importPatterns": ["\\buse\\s+axum(::|\\s*;)"],
4
+ "apiPatterns": ["\\baxum::Router\\b"],
5
+ "configFilePatterns": [],
6
+ "fixtures": {
7
+ "positive": [
8
+ {
9
+ "path": "src/main.rs",
10
+ "diff": "use axum::{Router, routing::get};\n\nasync fn handler() -> &'static str {\n \"hello\"\n}\n\nfn app() -> Router {\n Router::new().route(\"/\", get(handler))\n}"
11
+ },
12
+ {
13
+ "path": "src/routes.rs",
14
+ "diff": "let router = axum::Router::new().route(\"/health\", axum::routing::get(health));"
15
+ }
16
+ ],
17
+ "negative": [
18
+ {
19
+ "path": "README.md",
20
+ "diff": "We evaluated axum early on but ended up building the API on Actix instead."
21
+ }
22
+ ]
23
+ }
24
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "slug": "db/activerecord",
3
+ "importPatterns": [],
4
+ "apiPatterns": [
5
+ "class\\s+\\w+\\s*<\\s*ApplicationRecord\\b",
6
+ "class\\s+\\w+\\s*<\\s*ActiveRecord::Base\\b"
7
+ ],
8
+ "configFilePatterns": [],
9
+ "fixtures": {
10
+ "positive": [
11
+ { "path": "app/models/user.rb", "diff": "class User < ApplicationRecord\n has_many :posts\nend" },
12
+ { "path": "app/models/legacy_post.rb", "diff": "class LegacyPost < ActiveRecord::Base\nend" }
13
+ ],
14
+ "negative": [
15
+ {
16
+ "path": "README.md",
17
+ "diff": "We use ActiveRecord for most models but this one talks to an external API instead of a table."
18
+ }
19
+ ]
20
+ }
21
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "slug": "db/eloquent",
3
+ "importPatterns": [
4
+ "use\\s+Illuminate\\\\Database\\\\Eloquent\\\\Model\\b"
5
+ ],
6
+ "apiPatterns": [],
7
+ "configFilePatterns": [],
8
+ "fixtures": {
9
+ "positive": [
10
+ {
11
+ "path": "app/Models/Post.php",
12
+ "diff": "use Illuminate\\Database\\Eloquent\\Model;\n\nclass Post extends Model\n{\n protected $fillable = ['title'];\n}"
13
+ }
14
+ ],
15
+ "negative": [
16
+ {
17
+ "path": "README.md",
18
+ "diff": "We use Eloquent for most models but this one is a plain PHP class, not extending Model."
19
+ }
20
+ ]
21
+ }
22
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "slug": "db/supabase",
3
+ "importPatterns": [
4
+ "from\\s+[\"']@supabase/supabase-js[\"']",
5
+ "require\\(\\s*[\"']@supabase/supabase-js[\"']\\s*\\)"
6
+ ],
7
+ "apiPatterns": [
8
+ "supabase\\.from\\(",
9
+ "supabase\\.storage\\.",
10
+ "supabase\\.rpc\\("
11
+ ],
12
+ "configFilePatterns": [],
13
+ "fixtures": {
14
+ "positive": [
15
+ {
16
+ "path": "src/lib/supabase.ts",
17
+ "diff": "import { createClient } from \"@supabase/supabase-js\";\nconst supabase = createClient(process.env.SUPABASE_URL!, process.env.SUPABASE_ANON_KEY!);\nconst { data } = await supabase.from(\"profiles\").select(\"*\").eq(\"id\", userId);\nawait supabase.storage.from(\"avatars\").upload(path, file);\nconst { data: total } = await supabase.rpc(\"get_total_revenue\");"
18
+ },
19
+ {
20
+ "path": "src/lib/supabase.js",
21
+ "diff": "const { createClient } = require(\"@supabase/supabase-js\");"
22
+ }
23
+ ],
24
+ "negative": [
25
+ {
26
+ "path": "README.md",
27
+ "diff": "supabase.auth.signInWithPassword handles our login; we're not using supabase for storage or database queries here."
28
+ }
29
+ ]
30
+ }
31
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "slug": "frontend/tailwind",
3
+ "importPatterns": [
4
+ "@tailwind\\s+(base|components|utilities)"
5
+ ],
6
+ "apiPatterns": [],
7
+ "configFilePatterns": [
8
+ "(^|/)tailwind\\.config\\.(js|ts|cjs|mjs)$"
9
+ ],
10
+ "fixtures": {
11
+ "positive": [
12
+ {
13
+ "path": "tailwind.config.js",
14
+ "diff": "module.exports = { content: [\"./src/**/*.{js,ts,jsx,tsx}\"], theme: { extend: {} }, plugins: [] };"
15
+ },
16
+ {
17
+ "path": "src/styles/globals.css",
18
+ "diff": "@tailwind base;\n@tailwind components;\n@tailwind utilities;"
19
+ }
20
+ ],
21
+ "negative": [
22
+ {
23
+ "path": "README.md",
24
+ "diff": "We style everything with tailwind utility classes directly in JSX, configured via a tailwind config file described in the docs."
25
+ }
26
+ ]
27
+ }
28
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "slug": "infra/docker",
3
+ "importPatterns": [],
4
+ "apiPatterns": [],
5
+ "configFilePatterns": [
6
+ "(^|/)Dockerfile$",
7
+ "(^|/)docker-compose\\.ya?ml$",
8
+ "(^|/)compose\\.ya?ml$"
9
+ ],
10
+ "fixtures": {
11
+ "positive": [
12
+ { "path": "Dockerfile", "diff": "FROM node:20-alpine\nWORKDIR /app\nCOPY . .\nRUN npm ci\nCMD [\"node\", \"index.js\"]" },
13
+ { "path": "docker-compose.yml", "diff": "version: \"3.8\"\nservices:\n app:\n build: .\n ports:\n - \"3000:3000\"" },
14
+ { "path": "infra/compose.yaml", "diff": "services:\n web:\n image: nginx:latest" }
15
+ ],
16
+ "negative": [
17
+ { "path": "README.md", "diff": "We containerize the app with docker; the build steps are documented in the deploy guide, not in a checked-in Dockerfile yet." }
18
+ ]
19
+ }
20
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "slug": "infra/github-actions",
3
+ "importPatterns": [],
4
+ "apiPatterns": [
5
+ "uses:\\s*actions/checkout",
6
+ "runs-on:\\s*ubuntu"
7
+ ],
8
+ "configFilePatterns": [
9
+ "(^|/)\\.github/workflows/.*\\.ya?ml$"
10
+ ],
11
+ "fixtures": {
12
+ "positive": [
13
+ { "path": ".github/workflows/ci.yml", "diff": "name: CI\non: [push]\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v4\n - run: npm test" }
14
+ ],
15
+ "negative": [
16
+ { "path": "README.md", "diff": "We use github actions for CI, but the workflow file hasn't been checked into the repo yet." }
17
+ ]
18
+ }
19
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "slug": "infra/kubernetes",
3
+ "importPatterns": [],
4
+ "apiPatterns": [
5
+ "apiVersion:\\s*apps/v1",
6
+ "kind:\\s*Deployment",
7
+ "kind:\\s*Service"
8
+ ],
9
+ "configFilePatterns": [
10
+ "(^|/)(deployment|service|ingress)\\.ya?ml$"
11
+ ],
12
+ "fixtures": {
13
+ "positive": [
14
+ { "path": "k8s/deployment.yaml", "diff": "apiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: web\nspec:\n replicas: 3" },
15
+ { "path": "k8s/service.yaml", "diff": "apiVersion: v1\nkind: Service\nspec:\n selector:\n app: web\n ports:\n - port: 80" }
16
+ ],
17
+ "negative": [
18
+ { "path": "README.md", "diff": "We deploy to kubernetes but haven't finished the ingress config for the staging cluster yet." }
19
+ ]
20
+ }
21
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "slug": "infra/terraform",
3
+ "importPatterns": [],
4
+ "apiPatterns": [
5
+ "resource\\s+[\"']\\w+[\"']\\s+[\"']\\w+[\"']\\s*\\{",
6
+ "provider\\s+[\"']\\w+[\"']\\s*\\{"
7
+ ],
8
+ "configFilePatterns": [
9
+ "\\.tf$",
10
+ "\\.tfvars$"
11
+ ],
12
+ "fixtures": {
13
+ "positive": [
14
+ { "path": "infra/main.tf", "diff": "resource \"aws_s3_bucket\" \"data\" {\n bucket = \"my-bucket\"\n}" },
15
+ { "path": "infra/provider.tf", "diff": "provider \"aws\" {\n region = \"us-east-1\"\n}" },
16
+ { "path": "infra/prod.tfvars", "diff": "region = \"us-east-1\"\ninstance_type = \"t3.micro\"" }
17
+ ],
18
+ "negative": [
19
+ { "path": "README.md", "diff": "We manage infrastructure with terraform, but not every resource has been migrated from the manual setup yet." }
20
+ ]
21
+ }
22
+ }