Skip to content

Add typed JSON output to app config pull - #8604

Draft
gonzaloriestra wants to merge 1 commit into
gonzalo/json-app-config-linkfrom
gonzalo/json-app-config-pull
Draft

gonzaloriestra wants to merge 1 commit into
gonzalo/json-app-config-linkfrom
gonzalo/json-app-config-pull

Conversation

@gonzaloriestra

@gonzaloriestra gonzaloriestra commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Refreshing app configuration cannot return a machine-readable result.

WHAT is this pull request doing?

Add --json using the same public configuration contract as app config link. Preserve the configuration write, selected app lifecycle metadata and terminal success message. The example shows all supported remote app metadata fields.

Normal output:

Pulled latest configuration for "Example"
Updated shopify.app.toml with the remote data.

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?

pnpm shopify app config pull --path /path/to/app
pnpm shopify app config pull --path /path/to/app --json
pnpm shopify app config pull --json-schema

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've considered analytics changes to measure impact
  • Added a minor changeset for the new public JSON capability

@gonzaloriestra
gonzaloriestra added this pull request to stack #8606 September 21, 2026 08:08
@github-actions github-actions Bot added the Area: @shopify/cli @shopify/cli package issues label Sep 21, 2026
@gonzaloriestra

Copy link
Copy Markdown
Contributor Author

/snapit

@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/json-app-config-pull branch from 22106c9 to 4ee8147 Compare September 21, 2026 08:11
@gonzaloriestra

Copy link
Copy Markdown
Contributor Author

/snapit

@github-actions

Copy link
Copy Markdown
Contributor

Differences in type declarations

We 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:

  • Some seemingly private modules might be re-exported through public modules.
  • If the branch is behind main you might see odd diffs, rebase main into this branch.

New type declarations

We found no new type declarations in this PR

Existing type declarations

packages/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.
  *

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: @shopify/cli @shopify/cli package issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant