Add cleanup script for e2e test org#6907
Add cleanup script for e2e test org#6907ryancbahan wants to merge 1 commit into02-26-add-e2e-to-cifrom
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. |
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/private/node/conf-store.d.ts@@ -123,10 +123,12 @@ interface RunWithRateLimitOptions {
* @returns true, or undefined if the task was not run.
*/
export declare function runWithRateLimit(options: RunWithRateLimitOptions, config?: LocalStorage<ConfSchema>): Promise<boolean>;
-export declare function getConfigStoreForPartnerStatus(): LocalStorage<Record<string, {
- status: true;
- checkedAt: string;
-}>>;
+export declare function getConfigStoreForPartnerStatus(): LocalStorage<{
+ [partnerToken: string]: {
+ status: true;
+ checkedAt: string;
+ };
+}>;
export declare function getCachedPartnerAccountStatus(partnersToken: string): true | null;
export declare function setCachedPartnerAccountStatus(partnersToken: string): void;
export {};
\ No newline at end of file
packages/cli-kit/dist/public/common/collection.d.ts@@ -8,7 +8,9 @@ import type { List, ValueIteratee } from 'lodash';
* @param iteratee - The function invoked per iteration.
* @returns Returns the composed aggregate object.
*/
-export declare function groupBy<T>(collection: ArrayLike<T> | null | undefined, iteratee?: ValueIteratee<T>): Record<string, T[]>;
+export declare function groupBy<T>(collection: ArrayLike<T> | null | undefined, iteratee?: ValueIteratee<T>): {
+ [index: string]: T[];
+};
/**
* Creates an array of elements split into two groups, the first of which contains elements predicate returns truthy for,
* while the second of which contains elements predicate returns falsey for.
packages/cli-kit/dist/public/node/dot-env.d.ts@@ -9,7 +9,9 @@ export interface DotEnvFile {
/**
* Variables of the .env file.
*/
- variables: Record<string, string>;
+ variables: {
+ [name: string]: string;
+ };
}
/**
* Reads and parses a .env file.
@@ -28,5 +30,7 @@ export declare function writeDotEnv(file: DotEnvFile): Promise<void>;
* @param envFileContent - .env file contents.
* @param updatedValues - object containing new env variables values.
*/
-export declare function patchEnvFile(envFileContent: string | null, updatedValues: Record<string, string | undefined>): string;
+export declare function patchEnvFile(envFileContent: string | null, updatedValues: {
+ [key: string]: string | undefined;
+}): string;
export declare function createDotEnvFileLine(key: string, value?: string, quote?: string): string;
\ No newline at end of file
packages/cli-kit/dist/public/node/environments.d.ts@@ -1,5 +1,7 @@
import { JsonMap } from '../../private/common/json.js';
-export type Environments = Record<string, JsonMap>;
+export interface Environments {
+ [name: string]: JsonMap;
+}
interface LoadEnvironmentOptions {
from?: string;
silent?: boolean;
packages/cli-kit/dist/public/node/error.d.ts@@ -1,5 +1,5 @@
import { AlertCustomSection } from './ui.js';
-import { OutputMessage } from './output.js';
+import { OutputMessage } from '../../public/node/output.js';
import { InlineToken, TokenItem } from '../../private/node/ui/components/TokenizedText.js';
export { ExtendableError } from 'ts-error';
export declare enum FatalErrorType {
packages/cli-kit/dist/public/node/fs.d.ts@@ -1,5 +1,5 @@
-import { OverloadParameters } from '../../private/common/ts/overloaded-parameters.js';
import { RandomNameFamily } from '../common/string.js';
+import { OverloadParameters } from '../../private/common/ts/overloaded-parameters.js';
import { findUp as internalFindUp } from 'find-up';
import { ReadStream, WriteStream } from 'fs';
import type { Pattern, Options as GlobOptions } from 'fast-glob';
packages/cli-kit/dist/public/node/git.d.ts@@ -17,7 +17,9 @@ export declare function initializeGitRepository(directory: string, initialBranch
* @returns Files ignored by the lockfile.
*/
export declare function checkIfIgnoredInGitRepository(directory: string, files: string[]): Promise<string[]>;
-export type GitIgnoreTemplate = Record<string, string[]>;
+export interface GitIgnoreTemplate {
+ [section: string]: string[];
+}
/**
* Create a .gitignore file in the given directory.
*
packages/cli-kit/dist/public/node/json-schema.d.ts@@ -1,7 +1,9 @@
import { ParseConfigurationResult } from './schema.js';
import { ErrorObject, SchemaObject } from 'ajv';
export type HandleInvalidAdditionalProperties = 'strip' | 'fail';
-type AjvError = ErrorObject<string, Record<string, unknown>>;
+type AjvError = ErrorObject<string, {
+ [key: string]: unknown;
+}>;
/**
* Normalises a JSON Schema by standardising it's internal implementation.
*
packages/cli-kit/dist/public/node/local-storage.d.ts@@ -2,7 +2,9 @@
* A wrapper around the package that provides a strongly-typed interface
* for accessing the local storage.
*/
-export declare class LocalStorage<T extends Record<string, any>> {
+export declare class LocalStorage<T extends {
+ [key: string]: any;
+}> {
private readonly config;
constructor(options: {
projectName?: string;
packages/cli-kit/dist/public/node/metadata.d.ts@@ -33,7 +33,9 @@ export type SensitiveSchema<T> = T extends RuntimeMetadataManager<infer _TPublic
* @param defaultPublicMetadata - Optional, default data for the container.
* @returns A container for the metadata.
*/
-export declare function createRuntimeMetadataContainer<TPublic extends AnyJson, TSensitive extends AnyJson = Record<string, never>>(defaultPublicMetadata?: Partial<TPublic>): RuntimeMetadataManager<TPublic, TSensitive>;
+export declare function createRuntimeMetadataContainer<TPublic extends AnyJson, TSensitive extends AnyJson = {
+ [key: string]: never;
+}>(defaultPublicMetadata?: Partial<TPublic>): RuntimeMetadataManager<TPublic, TSensitive>;
type CmdFieldsFromMonorail = PickByPrefix<MonorailEventPublic, 'cmd_all_'> & PickByPrefix<MonorailEventPublic, 'cmd_app_'> & PickByPrefix<MonorailEventPublic, 'cmd_create_app_'> & PickByPrefix<MonorailEventPublic, 'cmd_theme_'> & PickByPrefix<MonorailEventPublic, 'store_'>;
declare const coreData: RuntimeMetadataManager<CmdFieldsFromMonorail, {
commandStartOptions: {
packages/cli-kit/dist/public/node/mimes.d.ts@@ -10,4 +10,6 @@ export declare function lookupMimeType(fileName: string): string;
*
* @param newTypes - Object of key-values where key is extension and value is mime type.
*/
-export declare function setMimeTypes(newTypes: Record<string, string>): void;
\ No newline at end of file
+export declare function setMimeTypes(newTypes: {
+ [key: string]: string;
+}): void;
\ No newline at end of file
packages/cli-kit/dist/public/node/multiple-installation-warning.d.ts@@ -5,4 +5,6 @@
* @param directory - The directory of the project.
* @param dependencies - The dependencies of the project.
*/
-export declare function showMultipleCLIWarningIfNeeded(directory: string, dependencies: Record<string, string>): Promise<void>;
\ No newline at end of file
+export declare function showMultipleCLIWarningIfNeeded(directory: string, dependencies: {
+ [key: string]: string;
+}): Promise<void>;
\ No newline at end of file
packages/cli-kit/dist/public/node/node-package-manager.d.ts@@ -13,7 +13,9 @@ export declare const bunLockfile = "bun.lockb";
export declare const pnpmWorkspaceFile = "pnpm-workspace.yaml";
/** An array containing the lockfiles from all the package managers */
export declare const lockfiles: Lockfile[];
-export declare const lockfilesByManager: Record<PackageManager, Lockfile | undefined>;
+export declare const lockfilesByManager: {
+ [key in PackageManager]: Lockfile | undefined;
+};
export type Lockfile = 'yarn.lock' | 'package-lock.json' | 'pnpm-lock.yaml' | 'bun.lockb';
/**
* A union type that represents the type of dependencies in the package.json
@@ -111,7 +113,9 @@ export declare function getPackageVersion(packageJsonPath: string): Promise<stri
* @param packageJsonPath - Path to the package.json file
* @returns A promise that resolves with the list of dependencies.
*/
-export declare function getDependencies(packageJsonPath: string): Promise<Record<string, string>>;
+export declare function getDependencies(packageJsonPath: string): Promise<{
+ [key: string]: string;
+}>;
/**
* Returns true if the app uses workspaces, false otherwise.
* @param packageJsonPath - Path to the package.json file
@@ -163,19 +167,27 @@ export interface PackageJson {
/**
* The scripts attribute of the package.json
*/
- scripts?: Record<string, string>;
+ scripts?: {
+ [key: string]: string;
+ };
/**
* The dependencies attribute of the package.json
*/
- dependencies?: Record<string, string>;
+ dependencies?: {
+ [key: string]: string;
+ };
/**
* The devDependencies attribute of the package.json
*/
- devDependencies?: Record<string, string>;
+ devDependencies?: {
+ [key: string]: string;
+ };
/**
* The peerDependencies attribute of the package.json
*/
- peerDependencies?: Record<string, string>;
+ peerDependencies?: {
+ [key: string]: string;
+ };
/**
* The optional oclif settings attribute of the package.json
*/
@@ -189,11 +201,15 @@ export interface PackageJson {
/**
* The resolutions attribute of the package.json. Only useful when using yarn as package manager
*/
- resolutions?: Record<string, string>;
+ resolutions?: {
+ [key: string]: string;
+ };
/**
* The overrides attribute of the package.json. Only useful when using npm o npmn as package managers
*/
- overrides?: Record<string, string>;
+ overrides?: {
+ [key: string]: string;
+ };
/**
* The prettier attribute of the package.json
*/
@@ -268,7 +284,9 @@ export declare function findUpAndReadPackageJson(fromDirectory: string): Promise
path: string;
content: PackageJson;
}>;
-export declare function addResolutionOrOverride(directory: string, dependencies: Record<string, string>): Promise<void>;
+export declare function addResolutionOrOverride(directory: string, dependencies: {
+ [key: string]: string;
+}): Promise<void>;
/**
* Writes the package.json file to the given directory.
*
packages/cli-kit/dist/public/node/output.d.ts@@ -49,7 +49,9 @@ export declare function formatPackageManagerCommand(packageManager: PackageManag
export declare function outputContent(strings: TemplateStringsArray, ...keys: (ContentToken<unknown> | string)[]): TokenizedString;
/** Log levels. */
export type LogLevel = 'fatal' | 'error' | 'warn' | 'info' | 'debug' | 'trace' | 'silent';
-export declare let collectedLogs: Record<string, string[]>;
+export declare let collectedLogs: {
+ [key: string]: string[];
+};
/**
* This is only used during UnitTesting.
* If we are in a testing context, instead of printing the logs to the console,
packages/cli-kit/dist/public/node/path.d.ts import type { URL } from 'url';
/**
* Joins a list of paths together.
*
* @param paths - Paths to join.
* @returns Joined path.
*/
export declare function joinPath(...paths: string[]): string;
/**
* Normalizes a path.
*
* @param path - Path to normalize.
* @returns Normalized path.
*/
export declare function normalizePath(path: string): string;
/**
* Resolves a list of paths together.
*
* @param paths - Paths to resolve.
* @returns Resolved path.
*/
export declare function resolvePath(...paths: string[]): string;
/**
* Returns the relative path from one path to another.
*
* @param from - Path to resolve from.
* @param to - Path to resolve to.
* @returns Relative path.
*/
export declare function relativePath(from: string, to: string): string;
/**
* Returns whether the path is absolute.
*
* @param path - Path to check.
* @returns Whether the path is absolute.
*/
export declare function isAbsolutePath(path: string): boolean;
/**
* Returns the directory name of a path.
*
* @param path - Path to get the directory name of.
* @returns Directory name.
*/
export declare function dirname(path: string): string;
/**
* Returns the base name of a path.
*
* @param path - Path to get the base name of.
* @param ext - Optional extension to remove from the result.
* @returns Base name.
*/
export declare function basename(path: string, ext?: string): string;
/**
* Returns the extension of the path.
*
* @param path - Path to get the extension of.
* @returns Extension.
*/
export declare function extname(path: string): string;
/**
- * Parses a path into its components (root, dir, base, ext, name).
- *
- * @param path - Path to parse.
- * @returns Parsed path object.
- */
-export declare function parsePath(path: string): {
- root: string;
- dir: string;
- base: string;
- ext: string;
- name: string;
-};
-/**
* Given an absolute filesystem path, it makes it relative to
* the current working directory. This is useful when logging paths
* to allow the users to click on the file and let the OS open it
* in the editor of choice.
*
* @param path - Path to relativize.
* @param dir - Current working directory.
* @returns Relativized path.
*/
export declare function relativizePath(path: string, dir?: string): string;
/**
* Given 2 paths, it returns whether the second path is a subpath of the first path.
*
* @param mainPath - The main path.
* @param subpath - The subpath.
* @returns Whether the subpath is a subpath of the main path.
*/
export declare function isSubpath(mainPath: string, subpath: string): boolean;
/**
* Given a module's import.meta.url it returns the directory containing the module.
*
* @param moduleURL - The value of import.meta.url in the context of the caller module.
* @returns The path to the directory containing the caller module.
*/
export declare function moduleDirectory(moduleURL: string | URL): string;
/**
* When running a script using `npm run`, something interesting happens. If the current
* folder does not have a `package.json` or a `node_modules` folder, npm will traverse
* the directory tree upwards until it finds one. Then it will run the script and set
* `process.cwd()` to that folder, while the actual path is stored in the INIT_CWD
* environment variable (see here: https://docs.npmjs.com/cli/v9/commands/npm-run-script#description).
*
* @returns The path to the current working directory.
*/
export declare function cwd(): string;
/**
* Tries to get the value of the `--path` argument, if provided.
*
* @param argv - The arguments to search for the `--path` argument.
* @returns The value of the `--path` argument, if provided.
*/
export declare function sniffForPath(argv?: string[]): string | undefined;
/**
* Returns whether the `--json` or `-j` flags are present in the arguments.
*
* @param argv - The arguments to search for the `--json` and `-j` flags.
* @returns Whether the `--json` or `-j` flag is present in the arguments.
*/
export declare function sniffForJson(argv?: string[]): boolean;
packages/cli-kit/dist/public/node/plugins.d.ts@@ -20,22 +20,30 @@ type AppSpecificMonorailFields = PickByPrefix<MonorailEventPublic, 'app_', 'proj
type AppSpecificSensitiveMonorailFields = PickByPrefix<MonorailEventSensitive, 'app_'>;
export interface HookReturnsPerPlugin extends HookReturnPerTunnelPlugin {
public_command_metadata: {
- options: Record<string, never>;
+ options: {
+ [key: string]: never;
+ };
pluginReturns: {
'@shopify/app': Partial<AppSpecificMonorailFields>;
[pluginName: string]: JsonMap;
};
};
sensitive_command_metadata: {
- options: Record<string, never>;
+ options: {
+ [key: string]: never;
+ };
pluginReturns: {
'@shopify/app': Partial<AppSpecificSensitiveMonorailFields>;
[pluginName: string]: JsonMap;
};
};
[hookName: string]: {
- options: Record<string, unknown>;
- pluginReturns: Record<string, unknown>;
+ options: {
+ [key: string]: unknown;
+ };
+ pluginReturns: {
+ [key: string]: unknown;
+ };
};
}
export type PluginReturnsForHook<TEvent extends keyof TPluginMap, TPluginName extends keyof TPluginMap[TEvent]['pluginReturns'], TPluginMap extends HookReturnsPerPlugin = HookReturnsPerPlugin> = TPluginMap[TEvent]['pluginReturns'][TPluginName];
packages/cli-kit/dist/public/node/system.d.ts@@ -2,7 +2,9 @@ import { AbortSignal } from './abort.js';
import type { Writable, Readable } from 'stream';
export interface ExecOptions {
cwd?: string;
- env?: Record<string, string | undefined>;
+ env?: {
+ [key: string]: string | undefined;
+ };
stdin?: Readable | 'inherit';
stdout?: Writable | 'inherit';
stderr?: Writable | 'inherit';
packages/cli-kit/dist/private/node/analytics/bounded-collections.d.ts@@ -38,6 +38,8 @@ export declare class BMap<TKey, TValue> extends Map<TKey, TValue> {
set(key: TKey, value: TValue): this;
delete(key: TKey): boolean;
clear(): void;
- toObject(): Record<string, TValue>;
+ toObject(): {
+ [key: string]: TValue;
+ };
private enforceLimit;
}
\ No newline at end of file
packages/cli-kit/dist/private/node/api/graphql.d.ts@@ -1,4 +1,6 @@
import { Variables } from 'graphql-request';
-export declare function debugLogRequestInfo(api: string, query: string, url: string, variables?: Variables, headers?: Record<string, string>): void;
+export declare function debugLogRequestInfo(api: string, query: string, url: string, variables?: Variables, headers?: {
+ [key: string]: string;
+}): void;
export declare function sanitizeVariables(variables: Variables): string;
export declare function errorHandler(api: string): (error: unknown, requestId?: string) => unknown;
\ No newline at end of file
packages/cli-kit/dist/private/node/api/headers.d.ts@@ -13,8 +13,12 @@ export declare class GraphQLClientError extends RequestClientError {
* @param headers - HTTP headers.
* @returns A sanitized version of the headers as a string.
*/
-export declare function sanitizedHeadersOutput(headers: Record<string, string>): string;
-export declare function buildHeaders(token?: string): Record<string, string>;
+export declare function sanitizedHeadersOutput(headers: {
+ [key: string]: string;
+}): string;
+export declare function buildHeaders(token?: string): {
+ [key: string]: string;
+};
/**
* This utility function returns the https.Agent to use for a given service.
*/
packages/cli-kit/dist/private/node/api/rest.d.ts@@ -1,5 +1,9 @@
import { AdminSession } from '../../../public/node/session.js';
export declare function restRequestBody<T>(requestBody?: T): string | undefined;
-export declare function restRequestUrl(session: AdminSession, apiVersion: string, path: string, searchParams?: Record<string, string>): string;
-export declare function restRequestHeaders(session: AdminSession): Record<string, string>;
+export declare function restRequestUrl(session: AdminSession, apiVersion: string, path: string, searchParams?: {
+ [name: string]: string;
+}): string;
+export declare function restRequestHeaders(session: AdminSession): {
+ [key: string]: string;
+};
export declare function isThemeAccessSession(session: AdminSession): boolean;
\ No newline at end of file
packages/cli-kit/dist/private/node/session/exchange.d.ts@@ -19,7 +19,9 @@ export interface ExchangeScopes {
* @param store - the store to use, only needed for admin API
* @returns An array with the application access tokens.
*/
-export declare function exchangeAccessForApplicationTokens(identityToken: IdentityToken, scopes: ExchangeScopes, store?: string): Promise<Record<string, ApplicationToken>>;
+export declare function exchangeAccessForApplicationTokens(identityToken: IdentityToken, scopes: ExchangeScopes, store?: string): Promise<{
+ [x: string]: ApplicationToken;
+}>;
/**
* Given an expired access token, refresh it to get a new one.
*/
@@ -60,5 +62,7 @@ type IdentityDeviceError = 'authorization_pending' | 'access_denied' | 'expired_
* @returns An instance with the identity access tokens.
*/
export declare function exchangeDeviceCodeForAccessToken(deviceCode: string): Promise<Result<IdentityToken, IdentityDeviceError>>;
-export declare function requestAppToken(api: API, token: string, scopes?: string[], store?: string): Promise<Record<string, ApplicationToken>>;
+export declare function requestAppToken(api: API, token: string, scopes?: string[], store?: string): Promise<{
+ [x: string]: ApplicationToken;
+}>;
export {};
\ No newline at end of file
packages/cli-kit/dist/public/common/ts/json-narrowing.d.ts@@ -4,4 +4,6 @@
* @param unknownBlob - The unknown object to validate.
* @throws BugError - Thrown if the unknownBlob is not a string map.
*/
-export declare function assertStringMap(unknownBlob: unknown): asserts unknownBlob is Record<string, string>;
\ No newline at end of file
+export declare function assertStringMap(unknownBlob: unknown): asserts unknownBlob is {
+ [key: string]: string;
+};
\ No newline at end of file
packages/cli-kit/dist/public/node/api/admin.d.ts@@ -73,7 +73,9 @@ interface ApiVersion {
* @param apiVersion - Admin API version.
* @returns - The {@link RestResponse}.
*/
-export declare function restRequest<T>(method: string, path: string, session: AdminSession, requestBody?: T, searchParams?: Record<string, string>, apiVersion?: string): Promise<RestResponse>;
+export declare function restRequest<T>(method: string, path: string, session: AdminSession, requestBody?: T, searchParams?: {
+ [name: string]: string;
+}, apiVersion?: string): Promise<RestResponse>;
/**
* Respose of a REST request.
*/
@@ -89,6 +91,8 @@ export interface RestResponse {
/**
* HTTP response headers.
*/
- headers: Record<string, string[]>;
+ headers: {
+ [key: string]: string[];
+ };
}
export {};
\ No newline at end of file
packages/cli-kit/dist/public/node/api/app-dev.d.ts@@ -1,5 +1,5 @@
-import { RequestOptions } from './app-management.js';
import { UnauthorizedHandler } from './graphql.js';
+import { RequestOptions } from './app-management.js';
import { Variables } from 'graphql-request';
import { TypedDocumentNode } from '@graphql-typed-document-node/core';
/**
packages/cli-kit/dist/public/node/api/app-management.d.ts@@ -2,7 +2,9 @@ import { CacheOptions, GraphQLResponse, UnauthorizedHandler } from './graphql.js
import { RequestModeInput } from '../http.js';
import { TypedDocumentNode } from '@graphql-typed-document-node/core';
import { Variables } from 'graphql-request';
-export declare const appManagementHeaders: (token: string) => Record<string, string>;
+export declare const appManagementHeaders: (token: string) => {
+ [key: string]: string;
+};
export declare const appManagementAppLogsUrl: (organizationId: string, cursor?: string, filters?: {
status?: string;
source?: string;
packages/cli-kit/dist/public/node/api/graphql.d.ts@@ -3,10 +3,14 @@ import { LocalStorage } from '../local-storage.js';
import { RequestModeInput } from '../http.js';
import { rawRequest, RequestDocument, Variables } from 'graphql-request';
import { TypedDocumentNode } from '@graphql-typed-document-node/core';
-export type Exact<T extends Record<string, unknown>> = {
+export type Exact<T extends {
+ [key: string]: unknown;
+}> = {
[K in keyof T]: T[K];
};
-export type GraphQLVariables = Record<string, any>;
+export interface GraphQLVariables {
+ [key: string]: any;
+}
export type GraphQLResponse<T> = Awaited<ReturnType<typeof rawRequest<T>>>;
export interface CacheOptions {
cacheTTL: TimeInterval;
@@ -25,7 +29,9 @@ interface GraphQLRequestBaseOptions<TResult> {
api: string;
url: string;
token?: string;
- addedHeaders?: Record<string, string>;
+ addedHeaders?: {
+ [header: string]: string;
+ };
responseOptions?: GraphQLResponseOptions<TResult>;
cacheOptions?: CacheOptions;
preferredBehaviour?: RequestModeInput;
@@ -36,7 +42,9 @@ export type GraphQLRequestOptions<T> = GraphQLRequestBaseOptions<T> & {
unauthorizedHandler?: UnauthorizedHandler;
};
export type GraphQLRequestDocOptions<TResult, TVariables> = GraphQLRequestBaseOptions<TResult> & {
- query: TypedDocumentNode<TResult, TVariables> | TypedDocumentNode<TResult, Exact<Record<string, never>>>;
+ query: TypedDocumentNode<TResult, TVariables> | TypedDocumentNode<TResult, Exact<{
+ [key: string]: never;
+ }>>;
variables?: TVariables;
unauthorizedHandler?: UnauthorizedHandler;
autoRateLimitRestore?: boolean;
packages/cli-kit/dist/public/node/doctor/framework.d.ts@@ -3,23 +3,23 @@ import type { DoctorContext, TestResult } from './types.js';
* Result from running a CLI command.
*/
interface CommandResult {
- /** The full command that was run. */
+ /** The full command that was run */
command: string;
- /** Exit code (0 = success). */
+ /** Exit code (0 = success) */
exitCode: number;
- /** Standard output. */
+ /** Standard output */
stdout: string;
- /** Standard error. */
+ /** Standard error */
stderr: string;
- /** Combined output (stdout + stderr). */
+ /** Combined output (stdout + stderr) */
output: string;
- /** Whether the command succeeded (exitCode === 0). */
+ /** Whether the command succeeded (exitCode === 0) */
success: boolean;
}
/**
* Base class for doctor test suites.
*
- * Write tests using the test() method.
+ * Write tests using the test() method:.
*
*
*/
@@ -32,7 +32,6 @@ export declare abstract class DoctorSuite<TContext extends DoctorContext = Docto
* Run the entire test suite.
*
* @param context - The doctor context for this suite run.
- * @returns The list of test results.
*/
runSuite(context: TContext): Promise<TestResult[]>;
/**
@@ -50,9 +49,7 @@ export declare abstract class DoctorSuite<TContext extends DoctorContext = Docto
* Run a CLI command and return the result.
*
* @param command - The CLI command to run.
- * @param options - Optional overrides.
- * @param options.cwd - Working directory for the command.
- * @param options.env - Environment variables for the command.
+ * @param options - Optional cwd and env overrides.
* @example
* const result = await this.run('shopify theme init my-theme')
* const result = await this.run('shopify theme push --json')
@@ -68,9 +65,7 @@ export declare abstract class DoctorSuite<TContext extends DoctorContext = Docto
* Returns only success/failure.
*
* @param command - The CLI command to run.
- * @param options - Optional overrides.
- * @param options.cwd - Working directory for the command.
- * @param options.env - Environment variables for the command.
+ * @param options - Optional cwd and env overrides.
*/
protected runInteractive(command: string, options?: {
cwd?: string;
packages/cli-kit/dist/public/node/doctor/reporter.d.ts@@ -2,32 +2,9 @@ import type { TestResult } from './types.js';
/**
* Initialize the reporter with a base path for truncating file paths in output.
* Call this before running tests to enable path truncation.
- *
- * @param basePath - The base path used to truncate absolute paths in output.
*/
export declare function initReporter(basePath: string): void;
-/**
- * Log the start of a test suite.
- *
- * @param suiteName - The name of the suite.
- * @param description - The suite description.
- */
export declare function reportSuiteStart(suiteName: string, description: string): void;
-/**
- * Log the start of a test.
- *
- * @param testName - The name of the test.
- */
export declare function reportTestStart(testName: string): void;
-/**
- * Log the result of a single test (passed, failed, or skipped).
- *
- * @param result - The test result to report.
- */
export declare function reportTestResult(result: TestResult): void;
-/**
- * Log a summary of all test results.
- *
- * @param results - The list of test results to summarize.
- */
export declare function reportSummary(results: TestResult[]): void;
\ No newline at end of file
packages/cli-kit/dist/public/node/plugins/tunnel.d.ts@@ -37,13 +37,19 @@ export interface HookReturnPerTunnelPlugin {
port: number;
provider: string;
};
- pluginReturns: Record<string, Result<TunnelClient, TunnelError>>;
+ pluginReturns: {
+ [key: string]: Result<TunnelClient, TunnelError>;
+ };
};
tunnel_provider: {
- options: Record<string, never>;
- pluginReturns: Record<string, {
- name: string;
- }>;
+ options: {
+ [key: string]: never;
+ };
+ pluginReturns: {
+ [pluginName: string]: {
+ name: string;
+ };
+ };
};
}
export type TunnelProviderFunction = FanoutHookFunction<'tunnel_provider', ''>;
packages/cli-kit/dist/public/node/themes/conf.d.ts@@ -2,7 +2,9 @@ import { LocalStorage } from '../local-storage.js';
import { AdminSession } from '../session.js';
type HostThemeId = string;
type StoreFqdn = AdminSession['storeFqdn'];
-type HostThemeLocalStorageSchema = Record<StoreFqdn, HostThemeId>;
+interface HostThemeLocalStorageSchema {
+ [themeStore: StoreFqdn]: HostThemeId;
+}
export declare function hostThemeLocalStorage(): LocalStorage<HostThemeLocalStorageSchema>;
export declare function getHostTheme(storeFqdn: StoreFqdn): string | undefined;
export declare function setHostTheme(storeFqdn: StoreFqdn, themeId: HostThemeId): void;
packages/cli-kit/dist/private/node/ui/contexts/LinksContext.d.ts@@ -4,7 +4,9 @@ export interface Link {
url: string;
}
export interface ContextValue {
- links: React.RefObject<Record<string, Link>>;
+ links: React.RefObject<{
+ [key: string]: Link;
+ }>;
addLink: (label: string | undefined, url: string) => string;
}
export declare const LinksContext: React.Context<ContextValue | null>;
\ No newline at end of file
packages/cli-kit/dist/public/node/vendor/dev_server/dev-server-2016.d.ts@@ -1,17 +1,9 @@
import { HostOptions } from './types.js';
-/**
- *
- * @param projectName
- */
export declare function createServer(projectName: string): {
host: (options?: HostOptions) => string;
url: (options?: HostOptions) => string;
};
declare function assertRunning2016(projectName: string): void;
declare let assertRunningOverride: typeof assertRunning2016 | undefined;
-/**
- *
- * @param override
- */
export declare function setAssertRunning(override: typeof assertRunningOverride): void;
export {};
\ No newline at end of file
packages/cli-kit/dist/public/node/vendor/dev_server/dev-server-2024.d.ts@@ -1,17 +1,9 @@
import type { HostOptions } from './types.js';
-/**
- *
- * @param projectName
- */
export declare function createServer(projectName: string): {
host: (options?: HostOptions) => string;
url: (options?: HostOptions) => string;
};
declare function assertRunning2024(projectName: string): void;
declare let assertRunningOverride: typeof assertRunning2024 | undefined;
-/**
- *
- * @param override
- */
export declare function setAssertRunning(override: typeof assertRunningOverride): void;
export {};
\ No newline at end of file
packages/cli-kit/dist/public/node/vendor/dev_server/env.d.ts@@ -1,5 +1,2 @@
export declare const isDevServerEnvironment: boolean;
-/**
- *
- */
export declare function assertCompatibleEnvironment(): void;
\ No newline at end of file
packages/cli-kit/dist/private/node/ui/components/SelectInput.d.ts@@ -1,7 +1,7 @@
import React from 'react';
import { DOMElement } from 'ink';
declare module 'react' {
- function forwardRef<T, TProps>(render: (props: TProps, ref: React.Ref<T>) => React.ReactElement | null): (props: TProps & React.RefAttributes<T>) => React.ReactElement | null;
+ function forwardRef<T, P>(render: (props: P, ref: React.Ref<T>) => React.ReactElement | null): (props: P & React.RefAttributes<T>) => React.ReactElement | null;
}
export interface SelectInputProps<T> {
items: Item<T>[];
packages/cli-kit/dist/public/node/vendor/dev_server/network/host.d.ts@@ -1,9 +1,2 @@
-/**
- *
- * @param hostname
- */
export declare function getIpFromHosts(hostname: string): string;
-/**
- *
- */
export declare function TEST_ClearCache(): void;
\ No newline at end of file
packages/cli-kit/dist/public/node/vendor/dev_server/network/index.d.ts@@ -5,12 +5,5 @@ export interface ConnectionArguments {
port: number;
timeout?: number;
}
-/**
- *
- * @param options
- */
export declare function assertConnectable(options: ConnectionArguments): void;
-/**
- *
- */
export declare function TEST_testResetCheckPort(): void;
\ No newline at end of file
packages/cli-kit/dist/private/node/ui/components/Prompts/InfoTable.d.ts@@ -12,7 +12,9 @@ export interface InfoTableSection {
emptyItemsText?: string;
}
export interface InfoTableProps {
- table: Record<string, Items> | InfoTableSection[];
+ table: {
+ [header: string]: Items;
+ } | InfoTableSection[];
}
declare const InfoTable: FunctionComponent<InfoTableProps>;
export { InfoTable };
\ No newline at end of file
packages/cli-kit/dist/private/node/ui/components/Prompts/PromptLayout.d.ts@@ -1,5 +1,5 @@
-import { InfoTableProps } from './InfoTable.js';
import { InfoMessageProps } from './InfoMessage.js';
+import { InfoTableProps } from './InfoTable.js';
import { InlineToken, LinkToken, TokenItem } from '../TokenizedText.js';
import { AbortSignal } from '../../../../../public/node/abort.js';
import { PromptState } from '../../hooks/use-prompt.js';
packages/cli-kit/dist/private/node/ui/components/Table/ScalarDict.d.ts@@ -1,3 +1,5 @@
type Scalar = string | number | boolean | null | undefined;
-type ScalarDict = Record<string, Scalar>;
-export default ScalarDict;
\ No newline at end of file
+export default interface ScalarDict {
+ [key: string]: Scalar;
+}
+export {};
\ No newline at end of file
packages/cli-kit/dist/public/node/vendor/otel-js/export/InstantaneousMetricReader.d.ts@@ -1,5 +1,5 @@
-import { MetricReader } from '@opentelemetry/sdk-metrics';
import type { PushMetricExporter } from '@opentelemetry/sdk-metrics';
+import { MetricReader } from '@opentelemetry/sdk-metrics';
export interface InstantaneousMetricReaderOptions {
/**
* The backing exporter for the metric reader.
packages/cli-kit/dist/public/node/vendor/otel-js/service/types.d.ts@@ -1,11 +1,13 @@
import type { Counter, Histogram, MeterProvider, MetricAttributes, MetricOptions, UpDownCounter } from '@opentelemetry/api';
import type { ViewOptions } from '@opentelemetry/sdk-metrics';
-export type CustomMetricLabels<TLabels extends Record<TKeys, MetricAttributes>, TKeys extends string = keyof TLabels & string> = {
+export type CustomMetricLabels<TLabels extends {
+ [key in TKeys]: MetricAttributes;
+}, TKeys extends string = keyof TLabels & string> = {
[P in TKeys]: TLabels[P] extends MetricAttributes ? TLabels[P] : never;
};
-export type MetricRecording<TAttributes extends MetricAttributes = MetricAttributes> = [value: number, labels?: TAttributes];
-export type RecordMetricFunction<TAttributes extends MetricAttributes = MetricAttributes> = (...args: MetricRecording<TAttributes>) => void;
-export type OnRecordCallback<TAttributes extends MetricAttributes = MetricAttributes> = (metricName: string, ...args: MetricRecording<TAttributes>) => MetricRecording<TAttributes> | void;
+export type MetricRecording<TAttributes extends MetricAttributes = any> = [value: number, labels?: TAttributes];
+export type RecordMetricFunction<TAttributes extends MetricAttributes = any> = (...args: MetricRecording<TAttributes>) => void;
+export type OnRecordCallback<TAttributes extends MetricAttributes = any> = (metricName: string, ...args: MetricRecording<TAttributes>) => MetricRecording<TAttributes> | void;
export type MetricInstrument = Histogram | Counter | UpDownCounter;
export declare enum MetricInstrumentType {
Histogram = "Histogram",
@@ -21,12 +23,14 @@ export type MetricDescriptor = MetricOptions & ({
} | {
type: MetricInstrumentType.Counter | MetricInstrumentType.UpDownCounter;
});
-export type MetricsConfig = Record<string, MetricDescriptor>;
+export interface MetricsConfig {
+ [key: string]: MetricDescriptor;
+}
export interface OtelService {
readonly serviceName: string;
getMeterProvider(): MeterProvider;
addView(viewOptions: ViewOptions): void;
- record<TAttributes extends MetricAttributes = MetricAttributes>(...args: Parameters<OnRecordCallback<TAttributes>>): void;
+ record<TAttributes extends MetricAttributes = any>(...args: Parameters<OnRecordCallback<TAttributes>>): void;
/**
* callback is called when a metric is recorded.
* Returns a function to unsubscribe.
packages/cli-kit/dist/public/node/vendor/otel-js/utils/throttle.d.ts@@ -1,15 +1,7 @@
-type ThrottledFunction<T extends (...args: unknown[]) => unknown> = (...args: Parameters<T>) => ReturnType<T>;
+type ThrottledFunction<T extends (...args: any) => any> = (...args: Parameters<T>) => ReturnType<T>;
interface ThrottleOptions {
leading?: boolean;
trailing?: boolean;
}
-/**
- *
- * @param func
- * @param wait
- * @param root0
- * @param root0.leading
- * @param root0.trailing
- */
-export declare function throttle<T extends (...args: unknown[]) => unknown>(func: T, wait: number, { leading, trailing }?: ThrottleOptions): ThrottledFunction<T>;
+export declare function throttle<T extends (...args: any) => any>(func: T, wait: number, { leading, trailing }?: ThrottleOptions): ThrottledFunction<T>;
export {};
\ No newline at end of file
packages/cli-kit/dist/public/node/vendor/otel-js/utils/validators.d.ts@@ -1,5 +1 @@
-/**
- *
- * @param value
- */
export declare function isValidMetricName(value: string): boolean;
\ No newline at end of file
packages/cli-kit/dist/public/node/vendor/otel-js/service/BaseOtelService/BaseOtelService.d.ts@@ -32,13 +32,6 @@ export declare class BaseOtelService implements OtelService {
protected readonly recordListeners: Set<OnRecordCallback>;
/**
* Bootstraps an Otel exporter which can send Otel metrics to a dedicated Shopify supported collector endpoint.
- *
- * @param root0
- * @param root0.serviceName
- * @param root0.prefixMetric
- * @param root0.metrics
- * @param root0.onRecord
- * @param root0.meterProvider
*/
constructor({ serviceName, prefixMetric, metrics, onRecord, meterProvider }: BaseOtelServiceOptions);
getMeterProvider(): MeterProvider;
packages/cli-kit/dist/public/node/vendor/otel-js/service/DefaultOtelService/DefaultOtelService.d.ts@@ -2,7 +2,7 @@ import { BaseOtelService } from '../BaseOtelService/BaseOtelService.js';
import type { BaseOtelServiceOptions } from '../BaseOtelService/BaseOtelService.js';
export interface DefaultOtelServiceOptions extends BaseOtelServiceOptions {
/**
- * What environment is being deployed (production, staging).
+ * What environment is being deployed (production, staging)
*/
env?: string;
/**
@@ -18,17 +18,6 @@ export interface DefaultOtelServiceOptions extends BaseOtelServiceOptions {
export declare class DefaultOtelService extends BaseOtelService {
/**
* Bootstraps an Otel exporter which can send Otel metrics to a dedicated Shopify supported collector endpoint.
- *
- * @param root0
- * @param root0.throttleLimit
- * @param root0.env
- * @param root0.serviceName
- * @param root0.prefixMetric
- * @param root0.metrics
- * @param root0.onRecord
- * @param root0.meterProvider
- * @param root0.useXhr
- * @param root0.otelEndpoint
*/
constructor({ throttleLimit, env, serviceName, prefixMetric, metrics, onRecord, meterProvider, useXhr, otelEndpoint, }: DefaultOtelServiceOptions);
shutdown(): Promise<void>;
|
20170fc to
a559510
Compare
461b906 to
882dfe6
Compare
Coverage report
Test suite run success3778 tests passing in 1448 suites. Report generated by 🧪jest coverage report action from df6b6a0 |
882dfe6 to
afe3c7f
Compare
a559510 to
cc0d430
Compare
cc0d430 to
d746f11
Compare
afe3c7f to
187b3a9
Compare
187b3a9 to
fbbf2f2
Compare
d746f11 to
2db5c40
Compare
|
🤖 Code Review · #projects-dev-ai for questions ❌ Failed 📋 History❌ Failed |
2db5c40 to
df6b6a0
Compare
fbbf2f2 to
09a894e
Compare

WHY are these changes introduced?
E2e test runs create apps in the test org. Without cleanup, these accumulate over time. We need a way to remove them.
WHAT is this pull request doing?
Adds
packages/e2e/scripts/cleanup-test-apps.ts— a Playwright script that automates app deletion through the dev dashboard UI:dev.shopify.com/dashboard, handles account/org selectionUsage: