-
Notifications
You must be signed in to change notification settings - Fork 162
Generate and store a combined config schema #5607
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
base: shauns/04-04-store_module_schemas_alongside_app
Are you sure you want to change the base?
Generate and store a combined config schema #5607
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. |
cd4608e
to
c3de307
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/public/node/fs.d.ts@@ -103,13 +103,13 @@ export declare function writeFile(path: string, data: string | Buffer, options?:
*/
export declare function writeFileSync(path: string, data: string): void;
/**
- * Creates a directory at the given path.
+ * Creates a directory at the given path. Directories are created recursively if needed.
*
* @param path - Path to the directory to be created.
*/
export declare function mkdir(path: string): Promise<void>;
/**
- * Synchronously creates a directory at the given path.
+ * Synchronously creates a directory at the given path. Directories are created recursively if needed.
*
* @param path - Path to the directory to be created.
*/
@@ -263,6 +263,13 @@ interface GenerateRandomDirectoryOptions {
* @returns It returns the name of the directory.
*/
export declare function generateRandomNameForSubdirectory(options: GenerateRandomDirectoryOptions): Promise<string>;
+/**
+ * Read the contents of a directory.
+ *
+ * @param path - Path to the directory.
+ * @returns A promise that resolves to an array of the names of the files in the directory.
+ */
+export declare function readdir(path: string): Promise<string[]>;
/**
* Traverse the file system and return pathnames that match the given pattern.
*
|
We detected some changes at packages/*/src and there are no updates in the .changeset. |
Coverage report
Show files with reduced coverage 🔻
Test suite run success2182 tests passing in 954 suites. Report generated by 🧪jest coverage report action from c3de307 |
I tried to test this but my i'm getting this:
|
@isaacroldan you'll need DCDD enabled. I don't think any other of the config modules export a portable schema right now. |
ah! that makes sense, in the next PRs in the stack i see you add the hardcoded schemas |
Add JSON schema support for app configuration validation
WHY are these changes introduced?
This PR generates a JSON schema for the app configuration file, which will enable better editor integration and validation for developers working with Shopify app configurations.
WHAT is this pull request doing?
Schema is a combination of locally specified schemas -- i.e. because the input format !== the submission format -- and JSON schema contracts.
hardcodedInputJsonSchema
property to extension specifications to support schema validation.shopify/schemas
directoryHow to test your changes?
Run at least one CLI command. Add
#: schema ./.shopify/schemas/app.schema.json
to the top of your app.toml file. See validation and autocomplete magic.