Skip to content

ai dev server status #5908

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

ai dev server status #5908

wants to merge 1 commit into from

Conversation

isaacroldan
Copy link
Contributor

WHY are these changes introduced?

Fixes #0000

WHAT is this pull request doing?

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 Author

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

@isaacroldan isaacroldan force-pushed the 05-28-ai_dev_server_status branch 2 times, most recently from f4e0719 to 1b9c1ff Compare May 28, 2025 16:11
@shauns shauns force-pushed the 05-28-ai_dev_server_status branch from 1b9c1ff to 64d7f0a Compare May 28, 2025 18:44
@nickwesselman
Copy link
Contributor

/snapit

Copy link
Contributor

🫰✨ 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 ETARGET error, install it with NPM and the flag --@shopify:registry=https://registry.npmjs.org

Caution

After installing, validate the version by running just shopify in your terminal.
If the versions don't match, you might have multiple global instances installed.
Use which shopify to find out which one you are running and uninstall it.

@nickwesselman
Copy link
Contributor

/snapit

Copy link
Contributor

🫰✨ 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 ETARGET error, install it with NPM and the flag --@shopify:registry=https://registry.npmjs.org

Caution

After installing, validate the version by running just shopify in your terminal.
If the versions don't match, you might have multiple global instances installed.
Use which shopify to find out which one you are running and uninstall it.

@shauns shauns force-pushed the 05-28-ai_dev_server_status branch 2 times, most recently from 7dd228d to 0fd9b35 Compare May 28, 2025 23:43
Copy link
Contributor

shauns commented May 28, 2025

/snapit

Copy link
Contributor

Unused exports (1)

Filename exports
packages/app/src/cli/services/dev/processes/dev-status-server.ts launchDevLockfileCleanup

Copy link
Contributor

🫰✨ Thanks @shauns! 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 ETARGET error, install it with NPM and the flag --@shopify:registry=https://registry.npmjs.org

Caution

After installing, validate the version by running just shopify in your terminal.
If the versions don't match, you might have multiple global instances installed.
Use which shopify to find out which one you are running and uninstall it.

@isaacroldan isaacroldan force-pushed the 05-28-ai_dev_server_status branch 2 times, most recently from 5df11e0 to 8b1298e Compare May 29, 2025 13:58
Copy link
Contributor Author

/snapit

Copy link
Contributor

🫰✨ Thanks @isaacroldan! 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 ETARGET error, install it with NPM and the flag --@shopify:registry=https://registry.npmjs.org

Caution

After installing, validate the version by running just shopify in your terminal.
If the versions don't match, you might have multiple global instances installed.
Use which shopify to find out which one you are running and uninstall it.

@shauns shauns force-pushed the 05-28-ai_dev_server_status branch from 8b1298e to f983174 Compare May 29, 2025 22:11
@isaacroldan isaacroldan force-pushed the 05-28-ai_dev_server_status branch from f983174 to ea2a69a Compare May 29, 2025 23:40
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

packages/cli-kit/dist/public/node/api/admin-as-app.d.ts
import { GraphQLVariables } from './graphql.js';
import { AdminSession } from '../session.js';
/**
 * Executes a GraphQL query against the Admin API on behalf of the app. Uses string queries etc.
 *
 * @param query - GraphQL query to execute.
 * @param allowMutation - Whether the query is a mutation.
 * @param session - Admin session.
 * @param apiVersion - API version, e.g. '2024-07'.
 * @param variables - GraphQL variables to pass to the query.
 * @returns The response of the query of generic type <TResult>.
 */
export declare function adminAsAppRequest<T>(query: string, allowMutation: boolean, session: AdminSession, apiVersion: string, variables?: GraphQLVariables): Promise<{
    status: 'blocked';
} | {
    status: 'success';
    data: T;
}>;

Existing type declarations

packages/cli-kit/dist/public/node/fs.d.ts
@@ -86,6 +86,7 @@ export declare function appendFile(path: string, content: string): Promise<void>
 export declare function appendFileSync(path: string, data: string): void;
 export interface WriteOptions {
     encoding: BufferEncoding;
+    autoDeleteOnExit?: boolean;
 }
 /**
  * Writes content to file at path.
packages/cli-kit/dist/public/node/serial-batch-processor.d.ts
@@ -4,10 +4,9 @@
  * automatically queued for the next batch.
  */
 export declare class SerialBatchProcessor<T> {
-    private readonly processBatch;
+    processBatch?: (items: T[]) => Promise<void>;
     private queue;
     private processingPromise;
-    constructor(processBatch: (items: T[]) => Promise<void>);
     enqueue(item: T): void;
     waitForCompletion(): Promise<void>;
     private startProcessing;
packages/cli-kit/dist/public/node/session.d.ts
@@ -82,4 +82,15 @@ export declare function ensureAuthenticatedBusinessPlatform(scopes?: BusinessPla
  * @returns A promise that resolves when the logout is complete.
  */
 export declare function logout(): Promise<void>;
+/**
+ * Ensure that we have a valid Admin session for the given store, acting on behalf of the app.
+ *
+ * This will fail if the app has not already been installed.
+ *
+ * @param storeFqdn - Store fqdn to request auth for.
+ * @param apiKey - API key for the app.
+ * @param apiSecret - API secret for the app.
+ * @returns The access token for the Admin API.
+ */
+export declare function ensureAuthenticatedAdminAsApp(storeFqdn: string, apiKey: string, apiSecret: string): Promise<AdminSession>;
 export {};
\ No newline at end of file
packages/cli-kit/dist/public/node/ui.d.ts
@@ -206,6 +206,8 @@ export declare function renderFatalError(error: Fatal, { renderOptions }?: Rende
 export interface RenderSelectPromptOptions<T> extends Omit<SelectPromptProps<T>, 'onSubmit'> {
     isConfirmationPrompt?: boolean;
     renderOptions?: RenderOptions;
+    flagName?: string;
+    flagValues?: string[];
 }
 /**
  * Renders a select prompt to the console.
@@ -238,7 +240,7 @@ export interface RenderSelectPromptOptions<T> extends Omit<SelectPromptProps<T>,
  *    Press ↑↓ arrows to select, enter to confirm.
  *
  */
-export declare function renderSelectPrompt<T>({ renderOptions, isConfirmationPrompt, ...props }: RenderSelectPromptOptions<T>, uiDebugOptions?: UIDebugOptions): Promise<T>;
+export declare function renderSelectPrompt<T>({ renderOptions, isConfirmationPrompt, flagName, flagValues, ...props }: RenderSelectPromptOptions<T>, uiDebugOptions?: UIDebugOptions): Promise<T>;
 export interface RenderConfirmationPromptOptions extends Pick<SelectPromptProps<boolean>, 'message' | 'infoTable' | 'infoMessage' | 'abortSignal'> {
     confirmationMessage?: string;
     cancellationMessage?: string;
@@ -267,6 +269,8 @@ export interface RenderConfirmationPromptOptions extends Pick<SelectPromptProps<
 export declare function renderConfirmationPrompt({ message, infoTable, confirmationMessage, cancellationMessage, renderOptions, defaultValue, abortSignal, infoMessage, }: RenderConfirmationPromptOptions): Promise<boolean>;
 export interface RenderAutocompleteOptions<T> extends PartialBy<Omit<AutocompletePromptProps<T>, 'onSubmit'>, 'search'> {
     renderOptions?: RenderOptions;
+    flagName?: string;
+    flagValues?: string[];
 }
 /**
  * Renders an autocomplete prompt to the console.
@@ -306,7 +310,7 @@ export interface RenderAutocompleteOptions<T> extends PartialBy<Omit<Autocomplet
  *    Press ↑↓ arrows to select, enter to confirm.
  *
  */
-export declare function renderAutocompletePrompt<T>({ renderOptions, ...props }: RenderAutocompleteOptions<T>, uiDebugOptions?: UIDebugOptions): Promise<T>;
+export declare function renderAutocompletePrompt<T>({ renderOptions, flagName, flagValues, ...props }: RenderAutocompleteOptions<T>, uiDebugOptions?: UIDebugOptions): Promise<T>;
 interface RenderTableOptions<T extends ScalarDict> extends TableProps<T> {
     renderOptions?: RenderOptions;
 }
@@ -332,6 +336,7 @@ interface RenderTasksOptions {
 export declare function renderTasks<TContext>(tasks: Task<TContext>[], { renderOptions }?: RenderTasksOptions): Promise<TContext>;
 export interface RenderTextPromptOptions extends Omit<TextPromptProps, 'onSubmit'> {
     renderOptions?: RenderOptions;
+    flagName?: string;
 }
 /**
  * Renders a text prompt to the console.
@@ -341,7 +346,7 @@ export interface RenderTextPromptOptions extends Omit<TextPromptProps, 'onSubmit
  *    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  *
  */
-export declare function renderTextPrompt({ renderOptions, ...props }: RenderTextPromptOptions, uiDebugOptions?: UIDebugOptions): Promise<string>;
+export declare function renderTextPrompt({ renderOptions, flagName, ...props }: RenderTextPromptOptions, uiDebugOptions?: UIDebugOptions): Promise<string>;
 export interface RenderDangerousConfirmationPromptOptions extends Omit<DangerousConfirmationPromptProps, 'onSubmit'> {
     renderOptions?: RenderOptions;
 }
packages/cli-kit/dist/private/node/ui/components/ConcurrentOutput.d.ts
@@ -8,6 +8,11 @@ export interface ConcurrentOutputProps {
     showTimestamps?: boolean;
     keepRunningAfterProcessesResolve?: boolean;
     useAlternativeColorPalette?: boolean;
+    onLogOutput?: (log: {
+        timestamp: number;
+        message: string;
+        prefix?: string;
+    }) => void;
 }
 interface ConcurrentOutputContext {
     outputPrefix?: string;

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.

3 participants