-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove all conditional logic around App Management being disabled #5004
Remove all conditional logic around App Management being disabled #5004
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
We detected some changes at packages/*/src and there are no updates in the .changeset. |
5215a55
to
ec98d8c
Compare
This PR seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. |
still relevant |
81cc960
to
9ecb7d4
Compare
9ecb7d4
to
8efb2c3
Compare
Coverage report
Show files with reduced coverage 🔻
Test suite run success2002 tests passing in 904 suites. Report generated by 🧪jest coverage report action from de4d15e |
c110640
to
ca92bf3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if a Partners organization has already been migrated to BP? The CLI would show it twice in the list of orgs? For that reason, I was merging them here.
Then, if duplicated, we should choose which one to use depending on the app migration status.
This is a great question. I don't think it's relevant to this PR, though, as that behavior is unaffected. It would be worth checking why that deduplication was dropped. |
|
||
// When | ||
const got = isAppManagementEnabled(env) | ||
const got = isAppManagementDisabled() | ||
|
||
// Then | ||
expect(got).toBe(true) | ||
}) | ||
|
||
test('returns false when USE_APP_MANAGEMENT_API is falsy', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's worth renaming this test to not reference USE_APP_MANAGEMENT_API
.
Otherwise we hit permissions issues.
ca92bf3
to
de4d15e
Compare
Differences in type declarationsWe detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:
New type declarationsWe found no new type declarations in this PR Existing type declarationspackages/cli-kit/dist/private/node/constants.d.ts@@ -31,7 +31,6 @@ export declare const environmentVariables: {
otelURL: string;
themeKitAccessDomain: string;
json: string;
- useAppManagement: string;
};
export declare const defaultThemeKitAccessDomain = "theme-kit-access.shopifyapps.com";
export declare const systemEnvironmentVariables: {
packages/cli-kit/dist/private/node/api/headers.d.ts@@ -1,6 +1,6 @@
import { ExtendableError } from '../../../public/node/error.js';
import https from 'https';
-export declare class RequestClientError extends ExtendableError {
+declare class RequestClientError extends ExtendableError {
statusCode: number;
constructor(message: string, statusCode: number);
}
@@ -25,4 +25,5 @@ export declare function buildHeaders(token?: string): {
* if the service is running in a Spin environment, the attribute "rejectUnauthorized" is
* set to false
*/
-export declare function httpsAgent(): Promise<https.Agent>;
\ No newline at end of file
+export declare function httpsAgent(): Promise<https.Agent>;
+export {};
\ No newline at end of file
packages/cli-kit/dist/private/node/session/scopes.d.ts@@ -5,7 +5,7 @@ import { API } from '../api.js';
* @param extraScopes - custom user-defined scopes
* @returns Array of scopes
*/
-export declare function allDefaultScopes(extraScopes?: string[], systemEnvironment?: NodeJS.ProcessEnv): string[];
+export declare function allDefaultScopes(extraScopes?: string[]): string[];
/**
* Generate a flat array with the default scopes for the given API plus
* any custom scope defined by the user
@@ -13,4 +13,4 @@ export declare function allDefaultScopes(extraScopes?: string[], systemEnvironme
* @param extraScopes - custom user-defined scopes
* @returns Array of scopes
*/
-export declare function apiScopes(api: API, extraScopes?: string[], systemEnvironment?: NodeJS.ProcessEnv): string[];
\ No newline at end of file
+export declare function apiScopes(api: API, extraScopes?: string[]): string[];
\ No newline at end of file
packages/cli-kit/dist/public/node/context/local.d.ts@@ -26,12 +26,12 @@ export declare function isDevelopment(env?: NodeJS.ProcessEnv): boolean;
*/
export declare function isVerbose(env?: NodeJS.ProcessEnv): boolean;
/**
- * It returns true if the App Management API is available.
+ * It returns true if the App Management API is disabled.
+ * This should only be relevant when using a Partners token.
*
- * @param env - The environment variables from the environment of the current process.
- * @returns True if the App Management API is available.
+ * @returns True if the App Management API is disabled.
*/
-export declare function isAppManagementEnabled(env?: NodeJS.ProcessEnv): boolean;
+export declare function isAppManagementDisabled(): boolean;
/**
* Returns true if the environment in which the CLI is running is either
* a local environment (where dev is present) or a cloud environment (spin).
|
WHY are these changes introduced?
Completes https://github.com/Shopify/develop-app-inner-loop/issues/2343
Removes the App Management feature flag and makes it a default part of the CLI's functionality. This should be merged when App Management is ready to be rolled out to all eligible organizations.
WHAT is this pull request doing?
USE_APP_MANAGEMENT_API
environment variable and related checksHow to test your changes?
shopify app deploy --reset
(or you can start all the way back fromapp init
)Checklist