epicshop 6.71.3 → 6.72.0

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.
@@ -124,16 +124,36 @@ export async function start(options = {}) {
124
124
  try {
125
125
  const { checkForUpdatesCached } = await import('@epic-web/workshop-utils/git.server');
126
126
  const { getMutedNotifications } = await import('@epic-web/workshop-utils/db.server');
127
- const updates = await checkForUpdatesCached();
128
- if (updates.updatesAvailable && updates.remoteCommit) {
129
- // Check if update notification is muted
130
- const mutedNotifications = await getMutedNotifications();
131
- const updateNotificationId = `update-repo-${updates.remoteCommit}`;
132
- if (!mutedNotifications.includes(updateNotificationId)) {
133
- const updateLink = chalk.blue.bgWhite(` ${updates.diffLink} `);
134
- console.log('\n', `šŸŽ‰ There are ${chalk.yellow('updates available')} for this workshop repository. šŸŽ‰\n\nTo get the updates, ${chalk.green.bold.bgWhite(`press the "u" key`)}\n\nTo view a diff, check:\n ${updateLink}\n\nTo dismiss this notification, ${chalk.red.bold.bgWhite(`press the "d" key`)}\n`);
135
- }
127
+ const updates = (await checkForUpdatesCached());
128
+ const updateNotificationId = updates.updateNotificationId ?? null;
129
+ const repoUpdatesAvailable = updates.repoUpdatesAvailable ?? updates.updatesAvailable;
130
+ const dependenciesNeedInstall = updates.dependenciesNeedInstall ?? false;
131
+ if (!updates.updatesAvailable || !updateNotificationId) {
132
+ return;
133
+ }
134
+ // Check if update notification is muted
135
+ const mutedNotifications = await getMutedNotifications();
136
+ if (mutedNotifications.includes(updateNotificationId)) {
137
+ return;
138
+ }
139
+ const updateLink = repoUpdatesAvailable && updates.diffLink
140
+ ? chalk.blue.bgWhite(` ${updates.diffLink} `)
141
+ : null;
142
+ const headline = repoUpdatesAvailable
143
+ ? `šŸŽ‰ There are ${chalk.yellow('updates available')} for this workshop repository. šŸŽ‰`
144
+ : `šŸ“¦ ${chalk.yellow('Dependencies are out of date')} for this workshop repository. šŸ“¦`;
145
+ const lines = [headline];
146
+ if (dependenciesNeedInstall) {
147
+ lines.push(`Your installed packages don't match ${chalk.cyan('package.json')}.`);
148
+ }
149
+ lines.push(repoUpdatesAvailable
150
+ ? `To get the updates${dependenciesNeedInstall ? ' and reinstall dependencies' : ''}, ${chalk.green.bold.bgWhite(`press the "u" key`)}`
151
+ : `To reinstall dependencies, ${chalk.green.bold.bgWhite(`press the "u" key`)}`);
152
+ if (updateLink) {
153
+ lines.push(`To view a diff, check:\n ${updateLink}`);
136
154
  }
155
+ lines.push(`To dismiss this notification, ${chalk.red.bold.bgWhite(`press the "d" key`)}`);
156
+ console.log('\n', `${lines.join('\n\n')}\n`);
137
157
  }
138
158
  catch {
139
159
  // Silently ignore update check errors
@@ -381,10 +401,9 @@ export async function start(options = {}) {
381
401
  try {
382
402
  const { checkForUpdatesCached } = await import('@epic-web/workshop-utils/git.server');
383
403
  const { muteNotification } = await import('@epic-web/workshop-utils/db.server');
384
- const updates = await checkForUpdatesCached();
385
- if (updates.updatesAvailable && updates.remoteCommit) {
386
- const updateNotificationId = `update-repo-${updates.remoteCommit}`;
387
- await muteNotification(updateNotificationId);
404
+ const updates = (await checkForUpdatesCached());
405
+ if (updates.updatesAvailable && updates.updateNotificationId) {
406
+ await muteNotification(updates.updateNotificationId);
388
407
  console.log(chalk.green('\nāœ… Update notification dismissed permanently.\n'));
389
408
  }
390
409
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "epicshop",
3
- "version": "6.71.3",
3
+ "version": "6.72.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -99,7 +99,7 @@
99
99
  "build:watch": "nx watch --projects=epicshop -- nx run \\$NX_PROJECT_NAME:build"
100
100
  },
101
101
  "dependencies": {
102
- "@epic-web/workshop-utils": "6.71.3",
102
+ "@epic-web/workshop-utils": "6.72.0",
103
103
  "@inquirer/prompts": "^8.2.0",
104
104
  "@sentry/node": "^10.35.0",
105
105
  "chalk": "^5.6.2",