Skip to content
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

Use app context in rest of commands #4685

Open
wants to merge 10 commits into
base: use-app-context-in-app-dev
Choose a base branch
from

Conversation

isaacroldan
Copy link
Contributor

@isaacroldan isaacroldan commented Oct 18, 2024

WHY are these changes introduced?

Use the generic app-context for all commands

WHAT is this pull request doing?

  • Use AppContext in import-extensions
  • Use AppContext in webhook trigger
  • AppCommand now forces all app commands to return a AppLinkedInterface, meaning that all commands should have a valid app and user always.

Remove a bunch of unused functions as a result of the above.

How to test your changes?

Post-release steps

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes

Copy link
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/json-schema.d.ts
@@ -2,7 +2,7 @@ import { ParseConfigurationResult } from './schema.js';
 import { ErrorObject, SchemaObject } from 'ajv';
 type AjvError = ErrorObject<string, {
     [key: string]: unknown;
-}>;
+}, unknown>;
 /**
  * Normalises a JSON Schema by standardising it's internal implementation.
  *
packages/cli-kit/dist/public/node/themes/urls.d.ts
@@ -3,5 +3,4 @@ import { AdminSession } from '@shopify/cli-kit/node/session';
 export declare function themePreviewUrl(theme: Theme, session: AdminSession): string;
 export declare function themeEditorUrl(theme: Theme, session: AdminSession): string;
 export declare function codeEditorUrl(theme: Theme, session: AdminSession): string;
-export declare function storeAdminUrl(session: AdminSession): string;
-export declare function storePasswordPage(store: AdminSession['storeFqdn']): string;
\ No newline at end of file
+export declare function storeAdminUrl(session: AdminSession): string;
\ No newline at end of file
packages/cli-kit/dist/private/node/ui/components/TextPrompt.d.ts
@@ -2,7 +2,7 @@ import { InlineToken, TokenItem } from './TokenizedText.js';
 import { AbortSignal } from '../../../../public/node/abort.js';
 import { FunctionComponent } from 'react';
 export interface TextPromptProps {
-    message: TokenItem;
+    message: string;
     onSubmit: (value: string) => void;
     defaultValue?: string;
     password?: boolean;

Copy link
Contributor

github-actions bot commented Oct 18, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
72.41% (+0.29% 🔼)
8284/11440
🟡 Branches
68.85% (+0.38% 🔼)
4031/5855
🟡 Functions
71.94% (+0.14% 🔼)
2184/3036
🟡 Lines
72.71% (+0.26% 🔼)
7835/10775
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / device-authorization.ts
86.05% (-1.45% 🔻)
70% 100%
86.05% (-1.13% 🔻)
🟢
... / ConcurrentOutput.tsx
98.39% (-1.61% 🔻)
90.91% (-4.55% 🔻)
100%
98.33% (-1.67% 🔻)
🟢
... / dot-env.ts
100%
93.33% (-0.42% 🔻)
100% 100%
🟢
... / spin.ts
97.5%
64% (-1.38% 🔻)
100% 97.44%
🟡
... / prerun.ts
78.13%
91.67% (-1.19% 🔻)
90% 77.42%

Test suite run success

1899 tests passing in 867 suites.

Report generated by 🧪jest coverage report action from 6218572

@isaacroldan isaacroldan marked this pull request as ready for review October 18, 2024 16:13
@isaacroldan isaacroldan requested a review from a team as a code owner October 18, 2024 16:13
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant