From 81581d36ef25db74e00ae1629cc2ccac747053e0 Mon Sep 17 00:00:00 2001 From: gonzaloriestra <14979109+gonzaloriestra@users.noreply.github.com> Date: Sat, 1 Aug 2026 00:26:25 +0000 Subject: [PATCH 1/3] [Refactor] Use ARCH_MAP constant for platform and arch resolution in os.ts --- packages/cli-kit/src/public/node/os.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/cli-kit/src/public/node/os.ts b/packages/cli-kit/src/public/node/os.ts index 139f798cbb0..1a0fae62f5a 100644 --- a/packages/cli-kit/src/public/node/os.ts +++ b/packages/cli-kit/src/public/node/os.ts @@ -46,6 +46,12 @@ export async function username(platform: typeof process.platform = process.platf type PlatformArch = Exclude | 'amd64' | '386' type PlatformStrings = Exclude | 'windows' + +const ARCH_MAP: Record = { + x64: 'amd64', + ia32: '386', +} + /** * Returns the platform and architecture. * @returns Returns the current platform and architecture. @@ -57,14 +63,7 @@ export function platformAndArch( platform: PlatformStrings arch: PlatformArch } { - let archString: PlatformArch - if (arch === 'x64') { - archString = 'amd64' - } else if (arch === 'ia32') { - archString = '386' - } else { - archString = arch - } + const archString = (ARCH_MAP[arch] ?? arch) as PlatformArch const platformString = (platform.match(/^win.+/) ? 'windows' : platform) as PlatformStrings return {platform: platformString, arch: archString} } From 888812391da14511d2436586cd86af0066890e59 Mon Sep 17 00:00:00 2001 From: gonzaloriestra <14979109+gonzaloriestra@users.noreply.github.com> Date: Sat, 1 Aug 2026 00:48:58 +0000 Subject: [PATCH 2/3] [Refactor] Use ARCH_MAP constant for platform and arch resolution in os.ts --- packages/app/src/cli/api/graphql/admin/generated/types.d.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/app/src/cli/api/graphql/admin/generated/types.d.ts b/packages/app/src/cli/api/graphql/admin/generated/types.d.ts index 678c7e4367d..cb72cd63c47 100644 --- a/packages/app/src/cli/api/graphql/admin/generated/types.d.ts +++ b/packages/app/src/cli/api/graphql/admin/generated/types.d.ts @@ -123,10 +123,6 @@ export type MetafieldAdminAccess = | 'MERCHANT_READ' /** The merchant has read and write access. No other apps have access. */ | 'MERCHANT_READ_WRITE' - /** The merchant and other apps have no access. */ - | 'PRIVATE' - /** The merchant and other apps have read-only access. */ - | 'PUBLIC_READ' /** The merchant and other apps have read and write access. */ | 'PUBLIC_READ_WRITE'; From 7e99f73893393130eed1176e2fc62f5a9f3999ba Mon Sep 17 00:00:00 2001 From: gonzaloriestra <14979109+gonzaloriestra@users.noreply.github.com> Date: Sat, 1 Aug 2026 01:15:53 +0000 Subject: [PATCH 3/3] [Refactor] Use ARCH_MAP constant for platform and arch resolution in os.ts --- .../app/src/cli/api/graphql/admin/generated/types.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/app/src/cli/api/graphql/admin/generated/types.d.ts b/packages/app/src/cli/api/graphql/admin/generated/types.d.ts index cb72cd63c47..869f90af9df 100644 --- a/packages/app/src/cli/api/graphql/admin/generated/types.d.ts +++ b/packages/app/src/cli/api/graphql/admin/generated/types.d.ts @@ -123,6 +123,10 @@ export type MetafieldAdminAccess = | 'MERCHANT_READ' /** The merchant has read and write access. No other apps have access. */ | 'MERCHANT_READ_WRITE' + /** The merchant and other apps have no access. */ + | 'PRIVATE' + /** The merchant and other apps have read-only access. */ + | 'PUBLIC_READ' /** The merchant and other apps have read and write access. */ | 'PUBLIC_READ_WRITE'; @@ -210,10 +214,6 @@ export type MetaobjectAdminAccess = | 'MERCHANT_READ' /** The merchant has read and write access. No other apps have access. */ | 'MERCHANT_READ_WRITE' - /** The merchant and other apps have no access. */ - | 'PRIVATE' - /** The merchant and other apps have read-only access. */ - | 'PUBLIC_READ' /** The merchant and other apps have read and write access. */ | 'PUBLIC_READ_WRITE';