@frigear-nu/cli 0.2.3 → 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.
@@ -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
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { m as main } from './shared/cli.BRfEZGZ1.mjs';
2
+ import { m as main } from './shared/cli.B_BErT55.mjs';
3
3
  import 'citty';
4
4
 
5
5
  await main();
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { m as default, a as mainCmd } from './shared/cli.BRfEZGZ1.mjs';
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';
@@ -1,6 +1,6 @@
1
1
  import { defineCommand, runMain } from 'citty';
2
2
 
3
- const version = "0.2.3";
3
+ const version = "0.2.4";
4
4
  const pkg = {
5
5
  version: version};
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frigear-nu/cli",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "description": "Frigear CLI: scaffold projects, apps and modules, and add Frigear modules to an app.",