create-user-hub 0.2.0 → 0.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-user-hub",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Start a TanStack Start + Convex app with User Hub sign-in: bun create user-hub@latest my-app",
5
5
  "type": "module",
6
6
  "bin": {
@@ -110,16 +110,6 @@ the sign-in in your browser. A coding agent runs it with --browser and shows
110
110
  you the link to open.`;
111
111
  }
112
112
 
113
- // hub-user register --json prints { error, status, forbidden } with exit code
114
- // 4; forbidden means a 403 (not this account's app), not a login problem.
115
- function forbidden(output: string) {
116
- try {
117
- return (JSON.parse(output) as { forbidden?: boolean }).forbidden === true;
118
- } catch {
119
- return false;
120
- }
121
- }
122
-
123
113
  // Put back an auth config left aside by an interrupted run.
124
114
  if (existsSync(AUTH_CONFIG_ASIDE) && !existsSync(AUTH_CONFIG)) {
125
115
  renameSync(AUTH_CONFIG_ASIDE, AUTH_CONFIG);
@@ -233,15 +223,8 @@ for (;;) {
233
223
  "--json",
234
224
  ...(alreadyRegistered ? [] : ["--new"]),
235
225
  );
236
- // hub-user exits with 4 when the hub refuses the API key (401) or this
237
- // account may not change the app (403); its JSON says which.
226
+ // hub-user exits with 4 when the hub refuses the API key (401).
238
227
  if (registered.code === 4) {
239
- if (forbidden(registered.output)) {
240
- fail(`The hub says your account may not change the app "${appName}": it belongs to
241
- another account, or was registered before accounts and only a hub admin can
242
- change it. Signing in again does not help. Ask a hub admin, or register this
243
- app under a new name: ${alreadyRegistered ? `delete HUB_APP_NAME from ${ENV_FILE}, then run ` : ""}bun run setup --name <new name>`);
244
- }
245
228
  if (!process.stdin.isTTY || signedInAgain) {
246
229
  fail(loginHelp("The hub did not accept this folder's API key."));
247
230
  }