Skip to content

Commit 01d8424

Browse files
author
Kamil Sobol
authored
fix: warn about xr deprecation (#11899)
* fix: warn about xr deprecation * fix: lets be safe here * fix: don't ask, command!
1 parent 5370e8b commit 01d8424

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

packages/amplify-cli-core/src/help/help-helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const printHeaderText = (text: string) => printer.info(chalk.blue.bold(text));
5050
const printBodyText = (text: string) => printer.info(text);
5151
const printCategoryMessage = () => {
5252
printBodyText(DEFAULT_INDENT + 'Where <category> is one of: notifications, api, auth, custom, storage,');
53-
printBodyText(DEFAULT_INDENT + 'analytics, function, geo, hosting, interactions, predictions, xr');
53+
printBodyText(DEFAULT_INDENT + 'analytics, function, geo, hosting, interactions, predictions, xr (deprecated)');
5454
printer.blankLine();
5555
};
5656

packages/amplify-cli/src/display-banner-messages.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export const displayBannerMessages = async (input: Input): Promise<void> => {
1414
return;
1515
}
1616
await displayLayerMigrationMessage();
17+
await displayXrDeprecationMessage();
1718
if (skipHooks()) {
1819
printer.warn('Amplify command hooks are disabled in the current execution environment.');
1920
printer.warn('See https://docs.amplify.aws/cli/usage/command-hooks/ for more information.');
@@ -41,3 +42,24 @@ const displayLayerMigrationMessage = async (): Promise<void> => {
4142
printer.blankLine();
4243
}
4344
};
45+
46+
const displayXrDeprecationMessage = async (): Promise<void> => {
47+
const rootPath = pathManager.findProjectRoot();
48+
if (rootPath === undefined) {
49+
// Not in a valid project
50+
return;
51+
}
52+
53+
const meta = stateManager.getMeta(rootPath, { throwIfNotExist: false });
54+
if (meta) {
55+
const hasXr = 'xr' in meta;
56+
if (hasXr) {
57+
printer.blankLine();
58+
printer.warn('Amazon Sumerian is getting deprecated. The XR category depends on Amazon Sumerian to function.' +
59+
' Amazon Sumerian scenes will not be accessible by February 21, 2023.' +
60+
' Follow the documentation on this page https://docs.amplify.aws/lib/xr/getting-started/q/platform/js/' +
61+
' to understand your migration options.');
62+
printer.blankLine();
63+
}
64+
}
65+
}

0 commit comments

Comments
 (0)