show warning message when installing mkcert in WSL
WHY are these changes introduced?
Provide guidance on certificate trust configuration for windows users under WSL.
WHAT is this pull request doing?
When a user is running the CLI in WSL, they'll now see a warning explaining that additional steps are required to configure certificate trust in Windows, along with a link to documentation that provides detailed instructions.
The PR also:
- Adds a pause (keypress prompt) after the warning to ensure users see the message
- Updates tests to cover the new WSL detection and warning functionality
How to test your changes?
- Run the CLI in a WSL environment
- Generate a certificate using the CLI
- Verify that the WSL warning appears with a link to documentation
- Verify that the CLI pauses for user input after displaying the warning
Measuring impact
How do we know this change was effective? Please choose one:
- [x] n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
Checklist
- [x] I've considered possible cross-platform impacts (Mac, Linux, Windows)
- [x] I've considered possible documentation changes
-
#5730
π (View in Graphite)
-
#5729
-
main
This stack of pull requests is managed by Graphite. Learn more about stacking.
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
mainyou might see odd diffs, rebasemaininto this branch.
New type declarations
We found no new type declarations in this PR
Existing type declarations
packages/cli-kit/dist/private/node/analytics.d.ts
@@ -21,6 +21,7 @@ interface EnvironmentData {
env_package_manager: string;
env_is_global: boolean;
env_auth_method: string;
+ env_is_wsl: boolean;
}
export declare function getEnvironmentData(config: Interfaces.Config): Promise<EnvironmentData>;
export declare function getSensitiveEnvironmentData(config: Interfaces.Config): Promise<{
packages/cli-kit/dist/public/node/monorail.d.ts
@@ -2,7 +2,7 @@ import { JsonMap } from '../../private/common/json.js';
import { DeepRequired } from '../common/ts/deep-required.js';
export { DeepRequired };
type Optional<T> = T | null;
-export declare const MONORAIL_COMMAND_TOPIC = "app_cli3_command/1.16";
+export declare const MONORAIL_COMMAND_TOPIC = "app_cli3_command/1.17";
export interface Schemas {
[MONORAIL_COMMAND_TOPIC]: {
sensitive: {
packages/cli-kit/dist/public/node/system.d.ts
@@ -56,4 +56,10 @@ export declare function terminalSupportsPrompting(): boolean;
*
* @returns True if the current environment is a CI environment.
*/
-export declare function isCI(): boolean;
\ No newline at end of file
+export declare function isCI(): boolean;
+/**
+ * Check if the current environment is a WSL environment.
+ *
+ * @returns True if the current environment is a WSL environment.
+ */
+export declare const isWsl: boolean;
\ No newline at end of file
Coverage report
St.:grey_question: |
Category | Percentage | Covered / Total |
|---|---|---|---|
| π‘ | Statements | 76.64% (+0.02% πΌ) |
9607/12535 |
| π‘ | Branches | 71.97% (+0.02% πΌ) |
4752/6603 |
| π‘ | Functions | 76.56% | 2485/3246 |
| π‘ | Lines | 77.15% (+0.02% πΌ) |
9079/11768 |
Test suite run success
2271 tests passing in 983 suites.
Report generated by π§ͺjest coverage report action from ce3d7604054098595be016523a4b5c35a9bfb896
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.
/snapit
π«°β¨ Thanks @nickwesselman! Your snapshot has been published to npm.
Test the snapshot by installing your package globally:
pnpm i -g @shopify/[email protected]
[!TIP] If you get an
ETARGETerror, install it with NPM and the flag--@shopify:registry=https://registry.npmjs.org
[!CAUTION] After installing, validate the version by running just
shopifyin your terminal. If the versions don't match, you might have multiple global instances installed. Usewhich shopifyto find out which one you are running and uninstall it.
We have a bit of a delay after "pressing any key"... I assume because expensive dev things are starting, but it makes it seem like the keypress didn't work. π€
I wonder if even adding the print of a blank line would help, since your keypress then gives the appearance of advancing the dev process.
Makes sense, we can add a blank line or if you think a short text might help we could do that. (For now i'll add the empty line)
Yeah give it a try with an empty line first. If it doesn't feel responsive enough, maybe something like
Resuming `app dev`...
(with a blank line at the bottom to separate it from the dev output)
/snapit
π«°β¨ Thanks @nickwesselman! Your snapshot has been published to npm.
Test the snapshot by installing your package globally:
pnpm i -g @shopify/[email protected]
[!TIP] If you get an
ETARGETerror, install it with NPM and the flag--@shopify:registry=https://registry.npmjs.org
[!CAUTION] After installing, validate the version by running just
shopifyin your terminal. If the versions don't match, you might have multiple global instances installed. Usewhich shopifyto find out which one you are running and uninstall it.