@frigear-nu/cli 0.2.2 → 0.2.4
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/README.md +1 -1
- package/dist/chunks/init.mjs +6 -1
- package/dist/chunks/upgrade.mjs +49 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.d.mts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.mjs +1 -1
- package/dist/shared/{cli.Bq3BvIWj.mjs → cli.B_BErT55.mjs} +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ pnpx @frigear-nu/cli --help
|
|
|
9
9
|
|
|
10
10
|
| Command | What it does |
|
|
11
11
|
| --- | --- |
|
|
12
|
-
| `init [dir] --platform <web\|mobile\|desktop\|web,mobile>` | New project from a starter (or `-t <giget source>`), then `pnpm install` and `pnpm prepare:env`. |
|
|
12
|
+
| `init [dir] --platform <web\|mobile\|desktop\|web,mobile\|web,mobile,desktop>` | New project from a starter (or `-t <giget source>`), then `pnpm install` and `pnpm prepare:env`. |
|
|
13
13
|
| `app:create <name> --template <web\|web-standalone\|mobile\|desktop>` | Adds a starter's app to `apps/<name>`. |
|
|
14
14
|
| `module:create <name> [--scope @acme]` | Scaffolds a Nuxt module in `packages/<name>`. |
|
|
15
15
|
| `add <module...> [--app <app>]` | `pnpm add` in the app and adds the modules to its `nuxt.config`. |
|
package/dist/chunks/init.mjs
CHANGED
|
@@ -17,7 +17,8 @@ const STARTERS = {
|
|
|
17
17
|
"workspace": { platforms: ["web"], hint: "apps/web: users, auth, account and admin" },
|
|
18
18
|
"mobile": { platforms: ["mobile"], hint: "apps/mobile: a Capacitor app against any OAuth issuer" },
|
|
19
19
|
"mobile-standalone": { platforms: ["web", "mobile"], hint: "apps/web + apps/mobile, with apps/web as the OAuth server" },
|
|
20
|
-
"desktop": { platforms: ["desktop"], hint: "apps/desktop: a Tauri app against any OAuth issuer, or offline with its own server" }
|
|
20
|
+
"desktop": { platforms: ["desktop"], hint: "apps/desktop: a Tauri app against any OAuth issuer, or offline with its own server" },
|
|
21
|
+
"multi-platform": { platforms: ["web", "mobile", "desktop"], hint: "apps/web + apps/mobile + apps/desktop, with apps/web as the OAuth server" }
|
|
21
22
|
};
|
|
22
23
|
const nextSteps = {
|
|
23
24
|
"workspace": [" put your email in NUXT_ACL_ADMINS in apps/web/.env"],
|
|
@@ -26,6 +27,10 @@ const nextSteps = {
|
|
|
26
27
|
"desktop": [
|
|
27
28
|
" set NUXT_PUBLIC_AUTHENTICATION_CLIENT_ISSUER (and _API_BASE) in apps/desktop/.env, or DESKTOP_MODE=local",
|
|
28
29
|
" pnpm desktop:init"
|
|
30
|
+
],
|
|
31
|
+
"multi-platform": [
|
|
32
|
+
" put your email in NUXT_ACL_ADMINS in apps/web/.env",
|
|
33
|
+
" pnpm desktop:init"
|
|
29
34
|
]
|
|
30
35
|
};
|
|
31
36
|
const isStarter = (value) => value in STARTERS;
|
package/dist/chunks/upgrade.mjs
CHANGED
|
@@ -413,6 +413,52 @@ const usersRoutes = {
|
|
|
413
413
|
}
|
|
414
414
|
]
|
|
415
415
|
};
|
|
416
|
+
const eventsTicketsPage = {
|
|
417
|
+
id: "events-tickets-page",
|
|
418
|
+
package: "@frigear-nu/events",
|
|
419
|
+
since: "0.6.0",
|
|
420
|
+
title: "The tickets page moved to /dashboard/tickets",
|
|
421
|
+
docs: `${DOCS}/modules/features/events`,
|
|
422
|
+
rules: [
|
|
423
|
+
{
|
|
424
|
+
pattern: /(['"`])\/account\/tickets\b/g,
|
|
425
|
+
message: "With `@frigear-nu/dashboard` installed (its hub on), the tickets page is `/dashboard/tickets`; `/account/tickets` only redirects there. Link with `useEventLinks().tickets()` instead of the path, which follows `events.settings.pages.tickets`."
|
|
426
|
+
}
|
|
427
|
+
],
|
|
428
|
+
async project({ root, files }) {
|
|
429
|
+
const manual = [];
|
|
430
|
+
for (const { file, options } of await readNuxtConfigs(files)) {
|
|
431
|
+
if (option(options, "events.settings.pages.tickets") !== true) continue;
|
|
432
|
+
const modules = items(option(options, "modules"));
|
|
433
|
+
if (!modules.includes("@frigear-nu/dashboard")) continue;
|
|
434
|
+
manual.push(`${relative(root, file)}: \`events.settings.pages.tickets: true\` is \`/dashboard/tickets\` now, listed in the hub's \`dashboard\` menu instead of the account menu. Set \`tickets: '/account/tickets'\` to keep it in the account.`);
|
|
435
|
+
}
|
|
436
|
+
return { manual };
|
|
437
|
+
}
|
|
438
|
+
};
|
|
439
|
+
const oauthServerApplicationsPage = {
|
|
440
|
+
id: "oauth-server-applications-page",
|
|
441
|
+
package: "@frigear-nu/oauth-server",
|
|
442
|
+
since: "0.9.0",
|
|
443
|
+
title: "The applications page moved to /dashboard/apps",
|
|
444
|
+
docs: `${DOCS}/modules/identity/oauth-server`,
|
|
445
|
+
rules: [
|
|
446
|
+
{
|
|
447
|
+
pattern: /(['"`])\/account\/applications\b/g,
|
|
448
|
+
message: "With `@frigear-nu/dashboard` installed (its hub on), the applications page is `/dashboard/apps`; `/account/applications` only redirects there. Link with `useRuntimeConfig().public.oauthServer.pages.applications` instead of the path, which follows `oauthServer.settings.pages.applications`."
|
|
449
|
+
}
|
|
450
|
+
],
|
|
451
|
+
async project({ root, files }) {
|
|
452
|
+
const manual = [];
|
|
453
|
+
for (const { file, options } of await readNuxtConfigs(files)) {
|
|
454
|
+
if (option(options, "oauthServer.settings.pages.applications") !== true) continue;
|
|
455
|
+
const modules = items(option(options, "modules"));
|
|
456
|
+
if (!modules.includes("@frigear-nu/dashboard")) continue;
|
|
457
|
+
manual.push(`${relative(root, file)}: \`oauthServer.settings.pages.applications: true\` is \`/dashboard/apps\` now, listed in the hub's \`dashboard\` menu instead of the account menu. Set \`applications: '/account/applications'\` to keep it in the account.`);
|
|
458
|
+
}
|
|
459
|
+
return { manual };
|
|
460
|
+
}
|
|
461
|
+
};
|
|
416
462
|
|
|
417
463
|
const SERVER_AUTH = ["@frigear-nu/auth", "@frigear-nu/users", "@frigear-nu/oauth-server"];
|
|
418
464
|
const hasServerSessions = async (config, options) => {
|
|
@@ -476,7 +522,9 @@ const migrations = [
|
|
|
476
522
|
authPermissions,
|
|
477
523
|
authorizationRoles,
|
|
478
524
|
accountPermission,
|
|
479
|
-
usersPermissions
|
|
525
|
+
usersPermissions,
|
|
526
|
+
eventsTicketsPage,
|
|
527
|
+
oauthServerApplicationsPage
|
|
480
528
|
];
|
|
481
529
|
|
|
482
530
|
const REGISTRY = (process.env.npm_config_registry || "https://registry.npmjs.org").replace(/\/+$/, "");
|
package/dist/cli.mjs
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -23,11 +23,15 @@ declare const STARTERS: {
|
|
|
23
23
|
readonly platforms: readonly ["desktop"];
|
|
24
24
|
readonly hint: "apps/desktop: a Tauri app against any OAuth issuer, or offline with its own server";
|
|
25
25
|
};
|
|
26
|
+
readonly 'multi-platform': {
|
|
27
|
+
readonly platforms: readonly ["web", "mobile", "desktop"];
|
|
28
|
+
readonly hint: "apps/web + apps/mobile + apps/desktop, with apps/web as the OAuth server";
|
|
29
|
+
};
|
|
26
30
|
};
|
|
27
31
|
type Starter = keyof typeof STARTERS;
|
|
28
32
|
/**
|
|
29
|
-
* A starter from its name (`mobile-standalone`) or from its platforms (`web`, `mobile`, `desktop`, `web,mobile`,
|
|
30
|
-
* order).
|
|
33
|
+
* A starter from its name (`mobile-standalone`) or from its platforms (`web`, `mobile`, `desktop`, `web,mobile`,
|
|
34
|
+
* `web,mobile,desktop`, in any order).
|
|
31
35
|
*/
|
|
32
36
|
declare const resolveStarter: (value: string) => Starter | undefined;
|
|
33
37
|
declare const _default: citty.CommandDef<{
|
package/dist/index.d.ts
CHANGED
|
@@ -23,11 +23,15 @@ declare const STARTERS: {
|
|
|
23
23
|
readonly platforms: readonly ["desktop"];
|
|
24
24
|
readonly hint: "apps/desktop: a Tauri app against any OAuth issuer, or offline with its own server";
|
|
25
25
|
};
|
|
26
|
+
readonly 'multi-platform': {
|
|
27
|
+
readonly platforms: readonly ["web", "mobile", "desktop"];
|
|
28
|
+
readonly hint: "apps/web + apps/mobile + apps/desktop, with apps/web as the OAuth server";
|
|
29
|
+
};
|
|
26
30
|
};
|
|
27
31
|
type Starter = keyof typeof STARTERS;
|
|
28
32
|
/**
|
|
29
|
-
* A starter from its name (`mobile-standalone`) or from its platforms (`web`, `mobile`, `desktop`, `web,mobile`,
|
|
30
|
-
* order).
|
|
33
|
+
* A starter from its name (`mobile-standalone`) or from its platforms (`web`, `mobile`, `desktop`, `web,mobile`,
|
|
34
|
+
* `web,mobile,desktop`, in any order).
|
|
31
35
|
*/
|
|
32
36
|
declare const resolveStarter: (value: string) => Starter | undefined;
|
|
33
37
|
declare const _default: citty.CommandDef<{
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { m as default, a as mainCmd } from './shared/cli.
|
|
1
|
+
export { m as default, a as mainCmd } from './shared/cli.B_BErT55.mjs';
|
|
2
2
|
export { PLATFORMS, STARTERS, default as initCmd, resolveStarter } from './chunks/init.mjs';
|
|
3
3
|
export { m as migrations, u as upgradeWorkspace } from './chunks/upgrade.mjs';
|
|
4
4
|
import 'citty';
|