Add typed JSON output to app config link - #8603
Draft
gonzaloriestra wants to merge 1 commit into
Draft
gonzaloriestra wants to merge 1 commit into
gonzaloriestra wants to merge 1 commit into
Conversation
gonzaloriestra
added this pull request to stack #8606
September 21, 2026 08:08
Contributor
Author
|
/snapit |
gonzaloriestra
force-pushed
the
gonzalo/json-app-config-link
branch
from
September 21, 2026 08:11
748636a to
5f38640
Compare
Contributor
Author
|
/snapit |
Contributor
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/public/node/testing/output.d.ts@@ -8,6 +8,19 @@ interface OutputMock {
error: () => string;
clear: () => void;
}
+interface StandardStreamsMock {
+ stdout: () => string;
+ stderr: () => string;
+ restore: () => void;
+}
+/**
+ * Captures writes to stdout and stderr, including console warnings intercepted by Vitest.
+ * Call restore in a finally block. This replaces process globals and must not be used in concurrent tests.
+ * CLI output tests must disable SHOPIFY_UNIT_TEST and reset modules before loading the command.
+ *
+ * @returns Captured output and a function to restore the original writers.
+ */
+export declare function mockAndCaptureStandardStreams(): StandardStreamsMock;
/**
* Returns a set of functions to get the outputs ocurred during a test run.
*
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WHY are these changes introduced?
App configuration linking cannot return a machine-readable result.
WHAT is this pull request doing?
Add --json with the written configuration and available public app metadata. Keep terminal presentation in a presenter and preserve shared linking callers. Optional app fields are omitted when unavailable; secrets and runtime state are excluded. The example shows all supported remote app metadata fields.
Normal output:
JSON output:
{ "configFile": "/app/shopify.app.toml", "configuration": { "client_id": "example-key", "name": "Example", "application_url": "https://example.com", "embedded": false, "access_scopes": { "scopes": "read_products" }, "custom_module": { "enabled": true } }, "app": { "id": "1", "title": "Example", "apiKey": "example-key", "organizationId": "123", "appType": "custom", "newApp": false, "grantedScopes": [ "read_products" ], "developmentStorePreviewEnabled": false, "applicationUrl": "https://example.com", "redirectUrlWhitelist": [], "requestedAccessScopes": [ "read_products" ], "webhookApiVersion": "2026-07", "embedded": false, "posEmbedded": false, "preferencesUrl": "", "gdprWebhooks": { "customerDeletionUrl": "", "customerDataRequestUrl": "", "shopDeletionUrl": "" }, "appProxy": { "subPath": "example", "subPathPrefix": "apps", "url": "https://example.com/proxy" }, "configuration": { "client_id": "example-key", "name": "Example", "application_url": "https://example.com", "embedded": false, "access_scopes": { "scopes": "read_products" }, "custom_module": { "enabled": true } } } }How to manually test your changes?
Checklist