create-kontrolia-auth 2.0.0 → 2.0.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployment.d.ts","sourceRoot":"","sources":["../../src/steps/deployment.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"deployment.d.ts","sourceRoot":"","sources":["../../src/steps/deployment.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAoCpD;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAkI3F"}
|
package/dist/steps/deployment.js
CHANGED
|
@@ -3,15 +3,22 @@ import { updateEnvValue, writeEnvFile } from "../utils/files.js";
|
|
|
3
3
|
import { registerOAuthClient } from "../utils/oauth-client.js";
|
|
4
4
|
const NEXT_STEPS = {
|
|
5
5
|
docker: "Ya está: los servicios auth-server y admin-panel viven en el mismo docker/docker-compose.yml. Corre `docker compose -f docker/docker-compose.yml up -d` para tenerlos arriba.",
|
|
6
|
-
vercel: "
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
6
|
+
vercel: "Lo más confiable con un monorepo pnpm es conectar el repo desde el dashboard (no desplegar carpetas sueltas por CLI):\n" +
|
|
7
|
+
"1) vercel.com → Add New → Project → importa este repo de GitHub.\n" +
|
|
8
|
+
"2) Root Directory: apps/auth-server. Framework: Next.js (se detecta solo) — Vercel ve el pnpm-lock.yaml de la raíz del repo y usa pnpm automáticamente.\n" +
|
|
9
|
+
"3) Settings → Environment Variables, pega las variables de apps/auth-server/.env.local.\n" +
|
|
10
|
+
"4) Repite con un segundo proyecto: Root Directory apps/admin-panel y las variables de admin-panel/.env.local.\n" +
|
|
11
|
+
"\n" +
|
|
12
|
+
"Si prefieres la CLI (`npm i -g vercel`): corre `vercel` desde la RAÍZ del repo, nunca estando ya dentro de apps/auth-server — " +
|
|
13
|
+
"cuando pregunte en qué carpeta está el código, contesta apps/auth-server. Si corres `vercel` estando ya adentro de esa " +
|
|
14
|
+
"carpeta, solo sube esos archivos (sin el pnpm-lock.yaml ni los paquetes hermanos de la raíz) y el build falla con " +
|
|
15
|
+
'"npm error Unsupported URL Type workspace:". Repite desde la raíz para admin-panel.',
|
|
16
|
+
railway: "Recomendado: conecta el repo desde el dashboard de Railway (New Project → Deploy from GitHub repo), un servicio con " +
|
|
17
|
+
"Root Directory apps/auth-server y otro con apps/admin-panel — así Railway siempre parte del repo completo.\n" +
|
|
18
|
+
"Por CLI (`npm i -g @railway/cli && railway login`): corre `railway init`/`railway up` desde la RAÍZ del repo, nunca " +
|
|
19
|
+
"estando ya dentro de apps/auth-server — igual que con Vercel, si subes solo esa carpeta te falta el pnpm-lock.yaml de " +
|
|
20
|
+
"la raíz y el install falla contra los paquetes @kontrolia/* (workspace:*).\n" +
|
|
21
|
+
"En cada servicio (dashboard de Railway → Variables) pega su .env.local.",
|
|
15
22
|
render: "1) Sube el repo a GitHub.\n" +
|
|
16
23
|
"2) En Render → New → Web Service, apúntalo a apps/auth-server (Build: `pnpm install && pnpm build`, Start: `pnpm start`).\n" +
|
|
17
24
|
"3) Repite para apps/admin-panel.\n" +
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/utils/update.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/utils/update.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAqEnE"}
|
package/dist/utils/update.js
CHANGED
|
@@ -11,7 +11,12 @@ import { run } from "./exec.js";
|
|
|
11
11
|
* not it actually moved), false if it stopped short of that for any reason.
|
|
12
12
|
*/
|
|
13
13
|
export async function pullLatest(repoRoot) {
|
|
14
|
-
|
|
14
|
+
// Untracked files (a stray .vercel/ from a manual deploy, editor scratch
|
|
15
|
+
// files, anything not in .gitignore yet) are deliberately not treated as
|
|
16
|
+
// "dirty" here — git pull can't silently discard something it was never
|
|
17
|
+
// tracking, and it refuses on its own if an incoming file would collide
|
|
18
|
+
// with one. Only local edits to files git already tracks block the pull.
|
|
19
|
+
const dirty = (await run("git", ["status", "--porcelain", "--untracked-files=no"], { cwd: repoRoot })).trim();
|
|
15
20
|
if (dirty) {
|
|
16
21
|
p.log.error("Hay cambios sin guardar en esta copia — no los voy a tocar. Guárdalos (git commit / git stash) y vuelve a correr `npx create-kontrolia-auth update`.");
|
|
17
22
|
return false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-kontrolia-auth",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Turnkey installer for KontrolIA Auth. `npx create-kontrolia-auth mi-app` checks requirements, downloads the repo, installs deps, and runs a wizard: (1) connect to an existing Supabase project or create a new self-hosted one via Docker; (2) where to deploy auth-server/admin-panel (Docker, Vercel, Railway, Render, Coolify). Also exposes `update`, `migrate` and `doctor` subcommands.",
|
|
6
6
|
"keywords": [
|