cli icon indicating copy to clipboard operation
cli copied to clipboard

Add declarative definitions import service

Open shauns opened this issue 1 month ago β€’ 4 comments

WHY are these changes introduced?

To enable importing metafield and metaobject definitions from a shop into a TOML configuration file, making it easier for developers to migrate existing custom data structures into their app configuration.

The service loads metafield definitions across all owner types, as well as metaobject definitions. These are then converted into their TOML equivalent, and for finessed rendering, a collection of patches to apply to control TOML formatting.

This service is not exposed within this PR.

image.png

shauns avatar Nov 21 '25 12:11 shauns

This stack of pull requests is managed by Graphite. Learn more about stacking.

shauns avatar Nov 21 '25 12:11 shauns

We detected some changes at packages/*/src and there are no updates in the .changeset. If the changes are user-facing, run pnpm changeset add to track your changes and include them in the next release CHANGELOG.

[!CAUTION] DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release.

github-actions[bot] avatar Nov 21 '25 12:11 github-actions[bot]

Coverage report

St.:grey_question:
Category Percentage Covered / Total
🟑 Statements
79.47% (+0.26% πŸ”Ό)
14141/17794
🟑 Branches
73.53% (+0.33% πŸ”Ό)
6936/9433
🟑 Functions
79.62% (+0.27% πŸ”Ό)
3630/4559
🟑 Lines
79.84% (+0.27% πŸ”Ό)
13367/16743
Show new covered files 🐣
St.:grey_question:
File Statements Branches Functions Lines
🟒
... / metafield_definitions.ts
100% 100% 100% 100%
🟒
... / metaobject_definitions.ts
100% 100% 100% 100%
🟒
... / declarative-definitions.ts
98.54% 93.18% 100% 98.51%
Show files with reduced coverage πŸ”»
St.:grey_question:
File Statements Branches Functions Lines
🟒
... / execute-operation.ts
92.86%
80% (-3.33% πŸ”»)
100% 92.31%
🟒
... / execute-bulk-operation.ts
92.98%
86.11% (-0.73% πŸ”»)
100% 92.73%
🟒
... / developer-platform-client.ts
84.62%
71.43% (-2.26% πŸ”»)
81.82%
93.75% (+3.13% πŸ”Ό)
πŸ”΄
... / environment.ts
35% (-6.67% πŸ”»)
41.18% (-1.68% πŸ”»)
40% (-10% πŸ”»)
36.84% (-6.64% πŸ”»)

Test suite run success

3532 tests passing in 1413 suites.

Report generated by πŸ§ͺjest coverage report action from b44cf4a51a98370a67c85d293514bd92a8af45f2

github-actions[bot] avatar Nov 21 '25 12:11 github-actions[bot]

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/http.d.ts
@@ -18,7 +18,7 @@ type AutomaticCancellationBehaviour = {
 } | {
     useAbortSignal: AbortSignal | (() => AbortSignal);
 };
-type RequestBehaviour = NetworkRetryBehaviour & AutomaticCancellationBehaviour;
+export type RequestBehaviour = NetworkRetryBehaviour & AutomaticCancellationBehaviour;
 export type RequestModeInput = PresetFetchBehaviour | RequestBehaviour;
 /**
  * Specify the behaviour of a network request.

packages/cli-kit/dist/public/node/api/graphql.d.ts
@@ -47,6 +47,7 @@ export type GraphQLRequestDocOptions<TResult, TVariables> = GraphQLRequestBaseOp
     }>>;
     variables?: TVariables;
     unauthorizedHandler?: UnauthorizedHandler;
+    autoRateLimitRestore?: boolean;
 };
 export interface GraphQLResponseOptions<T> {
     handleErrors?: boolean;

github-actions[bot] avatar Dec 11 '25 19:12 github-actions[bot]