File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,7 +58,6 @@ import {
5858} from '../api/graphql/app-management/generated/app-logs-subscribe.js'
5959import { Session } from '@shopify/cli-kit/node/session'
6060import { TokenItem } from '@shopify/cli-kit/node/ui'
61- import { blockPartnersAccess } from '@shopify/cli-kit/node/environment'
6261import { UnauthorizedHandler } from '@shopify/cli-kit/node/api/graphql'
6362import { JsonMapType } from '@shopify/cli-kit/node/toml'
6463
@@ -85,9 +84,7 @@ export function allDeveloperPlatformClients(): DeveloperPlatformClient[] {
8584
8685 clients . push ( AppManagementClient . getInstance ( ) )
8786
88- if ( ! blockPartnersAccess ( ) ) {
89- clients . push ( PartnersClient . getInstance ( ) )
90- }
87+ clients . push ( PartnersClient . getInstance ( ) )
9188
9289 return clients
9390}
@@ -105,8 +102,6 @@ function selectDeveloperPlatformClientByOrg(organization: Organization): Develop
105102}
106103
107104function defaultDeveloperPlatformClient ( ) : DeveloperPlatformClient {
108- if ( blockPartnersAccess ( ) ) return AppManagementClient . getInstance ( )
109-
110105 return PartnersClient . getInstance ( )
111106}
112107
Original file line number Diff line number Diff line change @@ -42,8 +42,6 @@ export const environmentVariables = {
4242 otelURL : 'SHOPIFY_CLI_OTEL_EXPORTER_OTLP_ENDPOINT' ,
4343 themeKitAccessDomain : 'SHOPIFY_CLI_THEME_KIT_ACCESS_DOMAIN' ,
4444 json : 'SHOPIFY_FLAG_JSON' ,
45- neverUsePartnersApi : 'SHOPIFY_CLI_NEVER_USE_PARTNERS_API' ,
46- usePartnersApi : 'SHOPIFY_CLI_USE_PARTNERS_API' ,
4745 skipNetworkLevelRetry : 'SHOPIFY_CLI_SKIP_NETWORK_LEVEL_RETRY' ,
4846 maxRequestTimeForNetworkCalls : 'SHOPIFY_CLI_MAX_REQUEST_TIME_FOR_NETWORK_CALLS' ,
4947}
Original file line number Diff line number Diff line change @@ -8,11 +8,9 @@ import {
88 adminFqdn ,
99} from './fqdn.js'
1010import { Environment , serviceEnvironment } from '../../../private/node/context/service.js'
11- import { blockPartnersAccess } from '../environment.js'
1211import { expect , describe , test , vi } from 'vitest'
1312
1413vi . mock ( '../../../private/node/context/service.js' )
15- vi . mock ( '../environment.js' )
1614
1715vi . mock ( '../vendor/dev_server/index.js' , ( ) => {
1816 return {
@@ -34,7 +32,6 @@ describe('partners', () => {
3432 test ( 'returns the local fqdn when the environment is local' , async ( ) => {
3533 // Given
3634 vi . mocked ( serviceEnvironment ) . mockReturnValue ( Environment . Local )
37- vi . mocked ( blockPartnersAccess ) . mockReturnValue ( false )
3835
3936 // When
4037 const got = await partnersFqdn ( )
@@ -46,7 +43,6 @@ describe('partners', () => {
4643 test ( 'returns the production fqdn when the environment is production' , async ( ) => {
4744 // Given
4845 vi . mocked ( serviceEnvironment ) . mockReturnValue ( Environment . Production )
49- vi . mocked ( blockPartnersAccess ) . mockReturnValue ( false )
5046
5147 // When
5248 const got = await partnersFqdn ( )
Original file line number Diff line number Diff line change 1- import { AbortError , BugError } from '../error.js'
1+ import { AbortError } from '../error.js'
22import { serviceEnvironment } from '../../../private/node/context/service.js'
33import { DevServer , DevServerCore } from '../vendor/dev_server/index.js'
4- import { blockPartnersAccess } from '../environment.js'
54
65export const NotProvidedStoreFQDNError = new AbortError (
76 "Couldn't obtain the Shopify FQDN because the store FQDN was not provided." ,
@@ -13,9 +12,6 @@ export const NotProvidedStoreFQDNError = new AbortError(
1312 * @returns Fully-qualified domain of the partners service we should interact with.
1413 */
1514export async function partnersFqdn ( ) : Promise < string > {
16- if ( blockPartnersAccess ( ) ) {
17- throw new BugError ( 'Partners API is is no longer available.' )
18- }
1915 const environment = serviceEnvironment ( )
2016 const productionFqdn = 'partners.shopify.com'
2117 switch ( environment ) {
Original file line number Diff line number Diff line change @@ -83,26 +83,6 @@ export function jsonOutputEnabled(environment = getEnvironmentVariables()): bool
8383 return sniffForJson ( ) || isTruthy ( environment [ environmentVariables . json ] )
8484}
8585
86- /**
87- * If true, the CLI should not use the Partners API.
88- *
89- * @returns True when the CLI should not use the Partners API.
90- */
91- export function blockPartnersAccess ( ) : boolean {
92- // Block if explicitly set to never use Partners API
93- if ( isTruthy ( getEnvironmentVariables ( ) [ environmentVariables . neverUsePartnersApi ] ) ) {
94- return true
95- }
96-
97- // If explicitly forcing to use Partners API, do not block
98- if ( isTruthy ( getEnvironmentVariables ( ) [ environmentVariables . usePartnersApi ] ) ) {
99- return false
100- }
101-
102- // Block for 3P devs
103- return ! isTruthy ( getEnvironmentVariables ( ) [ environmentVariables . firstPartyDev ] )
104- }
105-
10686/**
10787 * If true, the CLI should not use the network level retry.
10888 *
You can’t perform that action at this time.
0 commit comments