@exposify/cli 0.0.1 → 0.0.2

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 (2) hide show
  1. package/dist/index.js +10 -26
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1234,36 +1234,14 @@ import { spawn } from "child_process";
1234
1234
  import { existsSync as existsSync2, readFileSync as readFileSync6, writeFileSync as writeFileSync5 } from "fs";
1235
1235
  import { join as join3 } from "path";
1236
1236
  import { parseEnv as parseEnv2 } from "util";
1237
+ import { authStacksOf, dependencyNames } from "@exposify/core";
1237
1238
  var KEY_ENV = "EXPOSIFY_KEY";
1238
- var KNOWN = [
1239
- { test: (p) => p.startsWith("@auth0/") || p === "auth0" || p === "express-openid-connect", label: "Auth0", path: "oauth" },
1240
- { test: (p) => p.startsWith("@clerk/"), label: "Clerk", path: "oauth" },
1241
- { test: (p) => p.startsWith("@workos-inc/"), label: "WorkOS", path: "oauth" },
1242
- { test: (p) => p.startsWith("@kinde-oss/"), label: "Kinde", path: "oauth" },
1243
- { test: (p) => p === "@supabase/supabase-js" || p === "@supabase/ssr", label: "Supabase Auth", path: "broker" },
1244
- { test: (p) => p === "firebase" || p === "firebase-admin", label: "Firebase Auth", path: "broker" },
1245
- { test: (p) => p === "next-auth" || p === "@auth/core", label: "Auth.js (NextAuth)", path: "broker" },
1246
- { test: (p) => p === "better-auth", label: "Better Auth", path: "broker" },
1247
- { test: (p) => p === "lucia", label: "Lucia", path: "broker" },
1248
- { test: (p) => p === "passport", label: "Passport", path: "broker" },
1249
- { test: (p) => p === "iron-session", label: "iron-session", path: "broker" },
1250
- { test: (p) => p === "express-session" || p === "cookie-session", label: "server sessions", path: "broker" },
1251
- { test: (p) => p === "jsonwebtoken" || p === "jose" || p === "@nestjs/jwt", label: "your own JWTs", path: "broker" }
1252
- ];
1253
1239
  function detectAuthStacks(root) {
1254
- let pkg;
1255
1240
  try {
1256
- pkg = JSON.parse(readFileSync6(join3(root, "package.json"), "utf8"));
1241
+ return authStacksOf(dependencyNames(JSON.parse(readFileSync6(join3(root, "package.json"), "utf8"))));
1257
1242
  } catch {
1258
1243
  return [];
1259
1244
  }
1260
- const names = Object.keys({ ...pkg.devDependencies, ...pkg.dependencies });
1261
- const found = [];
1262
- for (const known of KNOWN) {
1263
- const hit = names.find(known.test);
1264
- if (hit && !found.some((f) => f.label === known.label)) found.push({ label: known.label, pkg: hit, path: known.path });
1265
- }
1266
- return found;
1267
1245
  }
1268
1246
  function appNameOf(root) {
1269
1247
  try {
@@ -1916,9 +1894,12 @@ ${bold(title)} \xB7 How your users sign in`);
1916
1894
  }
1917
1895
  const own = login ? `your app's own login, ${login.what} (${login.fields.join(", ")})` : null;
1918
1896
  if (own) console.log(` Found ${own}. AI assistants sign in with it on a form your app serves at /mcp/login, so there's nothing to set up for it.`);
1897
+ const signedOut = "agents use your app signed out, and your own checks decide what they can do";
1919
1898
  const have = existingKey(root, process.env);
1920
1899
  if (have) {
1921
- console.log(green(` \u2713 ${KEY_ENV} is set (${have.from}):`) + " agents sign in through Exposify's broker.");
1900
+ console.log(
1901
+ green(` \u2713 ${KEY_ENV} is set (${have.from}):`) + (own ? " agents sign in with your app's login, through Exposify's broker." : ` until you add a sign-in method in the dashboard, ${signedOut}.`)
1902
+ );
1922
1903
  return;
1923
1904
  }
1924
1905
  const via = stacks[0] ? `With ${stacks[0].label}` : "With your own login";
@@ -1951,7 +1932,10 @@ ${bold(title)} \xB7 How your users sign in`);
1951
1932
  console.log(green(` \u2713 ${written.created ? "Created" : "Updated"} ${relative(cwd, written.path) || written.path} with ${KEY_ENV}`) + ` (project "${outcome.projectName}").`);
1952
1933
  if (!written.ignored) console.log(yellow(` ! Add .env to .gitignore: it now holds a secret.`));
1953
1934
  if (own) console.log(` Your app tells Exposify about its login when it starts with ${KEY_ENV}: nothing to add in the dashboard.`);
1954
- else console.log(` Next, in the dashboard: add how your users log in (presets for GitHub, Google, Supabase, \u2026).`);
1935
+ else {
1936
+ console.log(` No login form was found, so ${signedOut}.`);
1937
+ console.log(` To have agents act as a signed-in user, add a sign-in method in the dashboard (presets for GitHub, Google, Supabase, \u2026).`);
1938
+ }
1955
1939
  console.log(dim(` Deploying? Set ${KEY_ENV} there too. Restart your server to pick it up.`));
1956
1940
  }
1957
1941
  function serviceConfig(args) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exposify/cli",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "@babel/parser": "^8.0.0",
25
- "@exposify/core": "0.3.13"
25
+ "@exposify/core": "0.3.14"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/node": "^22.0.0",