Expose structured local configuration issues in app config validate JSON#7090
Expose structured local configuration issues in app config validate JSON#7090dmerand wants to merge 1 commit intodlm-app-validate-errorsfrom
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
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@@ -8,7 +8,6 @@ export declare const environmentVariables: {
env: string;
firstPartyDev: string;
noAnalytics: string;
- cliToken: string;
partnersToken: string;
runAsUser: string;
serviceEnv: string;
packages/cli-kit/dist/public/node/environment.d.ts@@ -10,12 +10,17 @@
*/
export declare function getEnvironmentVariables(): NodeJS.ProcessEnv;
/**
- * Returns the value of the SHOPIFY_CLI_TOKEN environment variable,
- * falling back to the deprecated SHOPIFY_CLI_PARTNERS_TOKEN.
+ * Returns the value of the SHOPIFY_CLI_PARTNERS_TOKEN environment variable.
*
- * @returns The CLI token value, or undefined if neither env var is set.
+ * @returns Current process environment variables.
+ */
+export declare function getPartnersToken(): string | undefined;
+/**
+ * Check if the current proccess is running using the partners token.
+ *
+ * @returns True if the current proccess is running using the partners token.
*/
-export declare function getCliToken(): string | undefined;
+export declare function usePartnersToken(): boolean;
/**
* Returns the value of the organization id from the environment variables.
*
packages/cli-kit/dist/private/node/session/exchange.d.ts@@ -25,7 +25,7 @@ export declare function exchangeAccessForApplicationTokens(identityToken: Identi
*/
export declare function refreshAccessToken(currentToken: IdentityToken): Promise<IdentityToken>;
/**
- * Given a custom CLI token passed as ENV variable, request a valid Partners API token.
+ * Given a custom CLI token passed as ENV variable, request a valid Partners API token
* This token does not accept extra scopes, just the cli one.
* @param token - The CLI token passed as ENV variable
* @returns An instance with the application access tokens.
@@ -35,7 +35,7 @@ export declare function exchangeCustomPartnerToken(token: string): Promise<{
userId: string;
}>;
/**
- * Given a custom CLI token passed as ENV variable, request a valid App Management API token.
+ * Given a custom CLI token passed as ENV variable, request a valid App Management API token
* @param token - The CLI token passed as ENV variable
* @returns An instance with the application access tokens.
*/
@@ -44,7 +44,7 @@ export declare function exchangeCliTokenForAppManagementAccessToken(token: strin
userId: string;
}>;
/**
- * Given a custom CLI token passed as ENV variable, request a valid Business Platform API token.
+ * Given a custom CLI token passed as ENV variable, request a valid Business Platform API token
* @param token - The CLI token passed as ENV variable
* @returns An instance with the application access tokens.
*/
|
|
Stack context: this series builds
Please review in order. This top PR is the architectural follow-up that removes command-layer text parsing for early failures. |
Coverage report
Test suite run success4011 tests passing in 1530 suites. Report generated by 🧪jest coverage report action from f9b868c |
7417593 to
edb96a0
Compare
b34f147 to
4cbff46
Compare
edb96a0 to
b82d4c6
Compare
4cbff46 to
28f8829
Compare
b82d4c6 to
a1bb168
Compare
28f8829 to
0456af0
Compare
964455a to
123cec3
Compare
a1bb168 to
f321549
Compare
123cec3 to
30acf6b
Compare
f321549 to
d19c2e9
Compare
834c24c to
f9b868c
Compare
30acf6b to
a7602f8
Compare
|
We detected some changes at Caution DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release. |

What
Expose structured local configuration issues in
shopify app config validate --json.This PR turns the internal structured issue data into the public
{valid, issues}JSON contract for loader-backed local configuration failures.Why
app config validate --jsonis meant to be machine-readable for automation and repair loops.The earlier work preserved structured issues internally, but the JSON path was still too tied to rendered CLI text and command-shaped abort handling. This PR moves to a shared lower-level
LocalConfigErrorso loader-backed local configuration failures can flow into the public JSON contract without reconstructing issues from human-readable output.How
{valid, issues}LocalConfigErroras the shared lower-layer local configuration errorLocalConfigErrorLocalConfigErrorin JSON modeNotes
This PR covers the loader / validation pipeline path.
Project-backed discovery, app-config selection, and malformed discovered config failures stay in the next PR.