Repository navigation
Add typed JSON output to app function typegen - #8892
Conversation
|
/snapit |
|
🫰✨ Thanks @gonzaloriestra! Your snapshot has been published to npm. Built from Test the snapshot by installing your package globally: pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20261014142627Caution After installing, validate the version by running |
isaacroldan
left a comment
There was a problem hiding this comment.
Found two CI issues introduced here.
🤖 Generated by the review-pr skill
07b4acf to
7a3dc70
Compare
7a3dc70 to
464175a
Compare
464175a to
01dc1df
Compare
01dc1df to
f5b357b
Compare
f5b357b to
ee171bf
Compare
|
/snapit |
|
🫰✨ Thanks @gonzaloriestra! Your snapshot has been published to npm. Built from Test the snapshot by installing your package globally: pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20261015150445Caution After installing, validate the version by running |
ee171bf to
c95fae8
Compare
|
/snapit |
|
🫰✨ Thanks @gonzaloriestra! Your snapshot has been published to npm. Built from Test the snapshot by installing your package globally: pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20261015154027Caution After installing, validate the version by running |
c95fae8 to
92f3991
Compare
92f3991 to
a1f05bf
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/base-command.d.ts@@ -1,5 +1,4 @@
import { type JsonOutputSchema } from './json-output-schema.js';
-import { JsonMap } from '../../private/common/json.js';
import { Command } from '@oclif/core';
import { OutputFlags, Input, ParserOutput, FlagInput, OutputArgs } from '@oclif/core/parser';
export type ArgOutput = OutputArgs<any>;
@@ -37,8 +36,6 @@ declare abstract class BaseCommand extends Command {
argv: string[];
}>;
protected environmentsFilename(): string | undefined;
- protected parseEnvironmentFlags<TFlags extends FlagOutput, TGlobalFlags extends FlagOutput, TArgs extends ArgOutput>(environment: JsonMap, options: Input<TFlags, TGlobalFlags, TArgs>, explicitFlags: FlagOutput): Promise<FlagOutput>;
- protected validateNonTTYFlags(flags: FlagOutput): void;
protected failMissingNonTTYFlags(flags: FlagOutput, requiredFlags: string[]): void;
private failMissingNonTTYFlagRequirements;
private applicableNonTTYFlagRequirements;
packages/cli-kit/dist/public/node/system.d.ts@@ -8,6 +8,8 @@ export interface ExecOptions {
stderr?: Writable | 'inherit';
stdio?: 'inherit';
input?: string;
+ /** Whether to remove the final newline from captured stdout/stderr (default: true). */
+ stripFinalNewline?: boolean;
signal?: AbortSignal;
externalErrorHandler?: (error: unknown) => Promise<void>;
background?: boolean;
@@ -42,6 +44,7 @@ export interface CaptureOutputResult {
/**
* Runs a command asynchronously and returns stdout, stderr, and exit code.
* Unlike captureOutput, this function does NOT throw on non-zero exit codes.
+ * Startup failures and signal termination still throw an ExternalError.
*
* @param command - Command to be executed.
* @param args - Arguments to pass to the command.
@@ -61,6 +64,7 @@ export declare function captureOutputWithExitCode(command: string, args: string[
* Runs a command string asynchronously and returns stdout, stderr, and exit code.
* Parses the command string into command and arguments (handles quoted strings).
* Unlike captureOutput, this function does NOT throw on non-zero exit codes.
+ * Startup failures and signal termination still throw an ExternalError.
*
* @param command - Full command string to be executed (e.g., 'ls -la "my folder"').
* @param options - Optional settings for how to run the command.
|
a1f05bf to
d863110
Compare
d863110 to
692dd6a
Compare
692dd6a to
8857a40
Compare
8857a40 to
7d1a5bc
Compare
Related to https://github.com/shop/issues-develop/issues/23666
WHY are these changes introduced?
app function typegenhas no structured completion result for scripts and agents.WHAT is this pull request doing?
Add
--jsonand a discoverableFunctionTypegenResultschema. Return the completed Function's identity and route generator diagnostics through shared JSON events. Preserve the built-in and custom generator paths, text output, success banner, and existing failure handling. Output filenames are not inferred from arbitrary custom generator commands.Normal output (excerpt):
Matching JSON:
{ "status": "success", "function": { "handle": "cart-transformer", "name": "Cart transformer", "directory": "/path/to/app/extensions/cart-transformer" } }How to manually test your changes?
Repeat with a Function that configures
build.typegen_command.Checklist