@shopify/cli-kit 3.32.1 → 3.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants.d.ts +2 -6
- package/dist/constants.js +0 -4
- package/dist/constants.js.map +1 -1
- package/dist/file.d.ts +1 -1
- package/dist/git.js +1 -1
- package/dist/git.js.map +1 -1
- package/dist/http.js +2 -2
- package/dist/http.js.map +1 -1
- package/dist/index.d.ts +0 -5
- package/dist/index.js +0 -5
- package/dist/index.js.map +1 -1
- package/dist/metadata.js +1 -1
- package/dist/metadata.js.map +1 -1
- package/dist/output.js +1 -1
- package/dist/output.js.map +1 -1
- package/dist/path.d.ts +1 -1
- package/dist/path.js +5 -3
- package/dist/path.js.map +1 -1
- package/dist/private/common/array.d.ts +1 -0
- package/dist/private/common/array.js +4 -0
- package/dist/private/common/array.js.map +1 -0
- package/dist/private/node/analytics.js +6 -9
- package/dist/private/node/analytics.js.map +1 -1
- package/dist/private/node/api/graphql.js +1 -0
- package/dist/private/node/api/graphql.js.map +1 -1
- package/dist/private/node/api/headers.js +1 -1
- package/dist/private/node/api/headers.js.map +1 -1
- package/dist/private/node/api/rest.d.ts +6 -0
- package/dist/private/node/api/rest.js +27 -0
- package/dist/private/node/api/rest.js.map +1 -0
- package/dist/private/node/environment/service.d.ts +18 -0
- package/dist/private/node/environment/service.js +32 -0
- package/dist/private/node/environment/service.js.map +1 -0
- package/dist/{environment → private/node/environment}/spin-cache.d.ts +0 -0
- package/dist/{environment → private/node/environment}/spin-cache.js +0 -0
- package/dist/private/node/environment/spin-cache.js.map +1 -0
- package/dist/{environment → private/node/environment}/utilities.d.ts +0 -0
- package/dist/{environment → private/node/environment}/utilities.js +0 -0
- package/dist/private/node/environment/utilities.js.map +1 -0
- package/dist/{session → private/node/session}/authorize.d.ts +1 -5
- package/dist/{session → private/node/session}/authorize.js +9 -9
- package/dist/private/node/session/authorize.js.map +1 -0
- package/dist/{session → private/node/session}/device-authorization.d.ts +0 -0
- package/dist/{session → private/node/session}/device-authorization.js +7 -9
- package/dist/private/node/session/device-authorization.js.map +1 -0
- package/dist/{session → private/node/session}/exchange.d.ts +2 -2
- package/dist/{session → private/node/session}/exchange.js +5 -5
- package/dist/private/node/session/exchange.js.map +1 -0
- package/dist/{session → private/node/session}/identity-token-validation.d.ts +0 -0
- package/dist/{session → private/node/session}/identity-token-validation.js +4 -4
- package/dist/private/node/session/identity-token-validation.js.map +1 -0
- package/dist/{session → private/node/session}/identity.d.ts +1 -1
- package/dist/{session → private/node/session}/identity.js +2 -3
- package/dist/private/node/session/identity.js.map +1 -0
- package/dist/{session → private/node/session}/post-auth.d.ts +1 -1
- package/dist/{session → private/node/session}/post-auth.js +3 -3
- package/dist/private/node/session/post-auth.js.map +1 -0
- package/dist/{session → private/node/session}/redirect-listener.d.ts +0 -0
- package/dist/{session → private/node/session}/redirect-listener.js +2 -2
- package/dist/private/node/session/redirect-listener.js.map +1 -0
- package/dist/{session → private/node/session}/schema.d.ts +1 -1
- package/dist/{session → private/node/session}/schema.js +1 -1
- package/dist/private/node/session/schema.js.map +1 -0
- package/dist/{session → private/node/session}/scopes.d.ts +1 -1
- package/dist/{session → private/node/session}/scopes.js +2 -2
- package/dist/private/node/session/scopes.js.map +1 -0
- package/dist/{session → private/node/session}/store.d.ts +0 -0
- package/dist/{session → private/node/session}/store.js +5 -5
- package/dist/private/node/session/store.js.map +1 -0
- package/dist/{session → private/node/session}/validate.d.ts +0 -0
- package/dist/{session → private/node/session}/validate.js +5 -5
- package/dist/private/node/session/validate.js.map +1 -0
- package/dist/private/node/session.d.ts +56 -0
- package/dist/{session.js → private/node/session.js} +97 -133
- package/dist/private/node/session.js.map +1 -0
- package/dist/private/node/ui/components/Subdued.d.ts +9 -0
- package/dist/private/node/ui/components/Subdued.js +10 -0
- package/dist/private/node/ui/components/Subdued.js.map +1 -0
- package/dist/private/node/ui/components/Subdued.test.d.ts +1 -0
- package/dist/private/node/ui/components/Subdued.test.js +11 -0
- package/dist/private/node/ui/components/Subdued.test.js.map +1 -0
- package/dist/private/node/ui/components/TokenizedText.d.ts +4 -1
- package/dist/private/node/ui/components/TokenizedText.js +4 -0
- package/dist/private/node/ui/components/TokenizedText.js.map +1 -1
- package/dist/private/node/ui/components/TokenizedText.test.js +4 -1
- package/dist/private/node/ui/components/TokenizedText.test.js.map +1 -1
- package/dist/private/node/ui.js +1 -1
- package/dist/private/node/ui.js.map +1 -1
- package/dist/public/common/array.d.ts +4 -0
- package/dist/public/common/array.js +4 -0
- package/dist/public/common/array.js.map +1 -1
- package/dist/public/common/object.d.ts +3 -3
- package/dist/public/common/object.js +5 -7
- package/dist/public/common/object.js.map +1 -1
- package/dist/public/common/url.d.ts +2 -1
- package/dist/public/common/url.js +3 -2
- package/dist/public/common/url.js.map +1 -1
- package/dist/public/node/analytics.js +3 -3
- package/dist/public/node/analytics.js.map +1 -1
- package/dist/public/node/api/admin.d.ts +31 -1
- package/dist/public/node/api/admin.js +28 -0
- package/dist/public/node/api/admin.js.map +1 -1
- package/dist/public/node/api/partners.js +7 -2
- package/dist/public/node/api/partners.js.map +1 -1
- package/dist/public/node/base-command.js +2 -2
- package/dist/public/node/base-command.js.map +1 -1
- package/dist/public/node/cli.d.ts +8 -0
- package/dist/public/node/cli.js +21 -4
- package/dist/public/node/cli.js.map +1 -1
- package/dist/public/node/environment/fqdn.d.ts +26 -0
- package/dist/{environment → public/node/environment}/fqdn.js +15 -31
- package/dist/public/node/environment/fqdn.js.map +1 -0
- package/dist/{environment → public/node/environment}/local.d.ts +62 -16
- package/dist/{environment → public/node/environment}/local.js +66 -24
- package/dist/public/node/environment/local.js.map +1 -0
- package/dist/public/node/environment/spin.d.ts +43 -0
- package/dist/{environment → public/node/environment}/spin.js +28 -35
- package/dist/public/node/environment/spin.js.map +1 -0
- package/dist/public/node/node-package-manager.js +1 -1
- package/dist/public/node/node-package-manager.js.map +1 -1
- package/dist/public/node/ruby.d.ts +1 -1
- package/dist/public/node/ruby.js +12 -13
- package/dist/public/node/ruby.js.map +1 -1
- package/dist/public/node/session.d.ts +53 -0
- package/dist/public/node/session.js +95 -0
- package/dist/public/node/session.js.map +1 -0
- package/dist/public/node/system.d.ts +44 -0
- package/dist/{system.js → public/node/system.js} +34 -54
- package/dist/public/node/system.js.map +1 -0
- package/dist/public/node/tcp.js +1 -1
- package/dist/public/node/tcp.js.map +1 -1
- package/dist/public/node/ui.d.ts +1 -1
- package/dist/public/node/ui.js.map +1 -1
- package/dist/testing/ui.js +1 -1
- package/dist/testing/ui.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui.js +1 -1
- package/dist/ui.js.map +1 -1
- package/package.json +9 -7
- package/dist/api/graphql/all_app_extension_registrations.d.ts +0 -20
- package/dist/api/graphql/all_app_extension_registrations.js +0 -20
- package/dist/api/graphql/all_app_extension_registrations.js.map +0 -1
- package/dist/api/graphql/all_dev_stores_by_org.d.ts +0 -18
- package/dist/api/graphql/all_dev_stores_by_org.js +0 -21
- package/dist/api/graphql/all_dev_stores_by_org.js.map +0 -1
- package/dist/api/graphql/all_orgs.d.ts +0 -12
- package/dist/api/graphql/all_orgs.js +0 -14
- package/dist/api/graphql/all_orgs.js.map +0 -1
- package/dist/api/graphql/convert_dev_to_test_store.d.ts +0 -16
- package/dist/api/graphql/convert_dev_to_test_store.js +0 -13
- package/dist/api/graphql/convert_dev_to_test_store.js.map +0 -1
- package/dist/api/graphql/create_app.d.ts +0 -29
- package/dist/api/graphql/create_app.js +0 -33
- package/dist/api/graphql/create_app.js.map +0 -1
- package/dist/api/graphql/create_deployment.d.ts +0 -33
- package/dist/api/graphql/create_deployment.js +0 -25
- package/dist/api/graphql/create_deployment.js.map +0 -1
- package/dist/api/graphql/extension_create.d.ts +0 -30
- package/dist/api/graphql/extension_create.js +0 -26
- package/dist/api/graphql/extension_create.js.map +0 -1
- package/dist/api/graphql/extension_specifications.d.ts +0 -27
- package/dist/api/graphql/extension_specifications.js +0 -22
- package/dist/api/graphql/extension_specifications.js.map +0 -1
- package/dist/api/graphql/find_app.d.ts +0 -14
- package/dist/api/graphql/find_app.js +0 -17
- package/dist/api/graphql/find_app.js.map +0 -1
- package/dist/api/graphql/find_org.d.ts +0 -18
- package/dist/api/graphql/find_org.js +0 -21
- package/dist/api/graphql/find_org.js.map +0 -1
- package/dist/api/graphql/find_org_basic.d.ts +0 -11
- package/dist/api/graphql/find_org_basic.js +0 -14
- package/dist/api/graphql/find_org_basic.js.map +0 -1
- package/dist/api/graphql/find_store_by_domain.d.ts +0 -21
- package/dist/api/graphql/find_store_by_domain.js +0 -24
- package/dist/api/graphql/find_store_by_domain.js.map +0 -1
- package/dist/api/graphql/functions/api_schema_definition.d.ts +0 -9
- package/dist/api/graphql/functions/api_schema_definition.js +0 -7
- package/dist/api/graphql/functions/api_schema_definition.js.map +0 -1
- package/dist/api/graphql/functions/app_function_set.d.ts +0 -30
- package/dist/api/graphql/functions/app_function_set.js +0 -38
- package/dist/api/graphql/functions/app_function_set.js.map +0 -1
- package/dist/api/graphql/functions/function_service_proxy.d.ts +0 -4
- package/dist/api/graphql/functions/function_service_proxy.js +0 -7
- package/dist/api/graphql/functions/function_service_proxy.js.map +0 -1
- package/dist/api/graphql/functions/upload_url_generate.d.ts +0 -12
- package/dist/api/graphql/functions/upload_url_generate.js +0 -11
- package/dist/api/graphql/functions/upload_url_generate.js.map +0 -1
- package/dist/api/graphql/generate_signed_upload_url.d.ts +0 -15
- package/dist/api/graphql/generate_signed_upload_url.js +0 -15
- package/dist/api/graphql/generate_signed_upload_url.js.map +0 -1
- package/dist/api/graphql/get_urls.d.ts +0 -10
- package/dist/api/graphql/get_urls.js +0 -10
- package/dist/api/graphql/get_urls.js.map +0 -1
- package/dist/api/graphql/get_variant_id.d.ts +0 -17
- package/dist/api/graphql/get_variant_id.js +0 -20
- package/dist/api/graphql/get_variant_id.js.map +0 -1
- package/dist/api/graphql/index.d.ts +0 -21
- package/dist/api/graphql/index.js +0 -22
- package/dist/api/graphql/index.js.map +0 -1
- package/dist/api/graphql/update_draft.d.ts +0 -33
- package/dist/api/graphql/update_draft.js +0 -24
- package/dist/api/graphql/update_draft.js.map +0 -1
- package/dist/api/graphql/update_urls.d.ts +0 -14
- package/dist/api/graphql/update_urls.js +0 -12
- package/dist/api/graphql/update_urls.js.map +0 -1
- package/dist/api.d.ts +0 -3
- package/dist/api.js +0 -4
- package/dist/api.js.map +0 -1
- package/dist/cli.d.ts +0 -8
- package/dist/cli.js +0 -18
- package/dist/cli.js.map +0 -1
- package/dist/environment/fqdn.d.ts +0 -29
- package/dist/environment/fqdn.js.map +0 -1
- package/dist/environment/local.js.map +0 -1
- package/dist/environment/service.d.ts +0 -4
- package/dist/environment/service.js +0 -19
- package/dist/environment/service.js.map +0 -1
- package/dist/environment/spin-cache.js.map +0 -1
- package/dist/environment/spin.d.ts +0 -50
- package/dist/environment/spin.js.map +0 -1
- package/dist/environment/utilities.js.map +0 -1
- package/dist/environment.d.ts +0 -7
- package/dist/environment.js +0 -8
- package/dist/environment.js.map +0 -1
- package/dist/network/service.d.ts +0 -14
- package/dist/network/service.js +0 -11
- package/dist/network/service.js.map +0 -1
- package/dist/public/node/checksum.d.ts +0 -20
- package/dist/public/node/checksum.js +0 -32
- package/dist/public/node/checksum.js.map +0 -1
- package/dist/session/authorize.js.map +0 -1
- package/dist/session/device-authorization.js.map +0 -1
- package/dist/session/exchange.js.map +0 -1
- package/dist/session/identity-token-validation.js.map +0 -1
- package/dist/session/identity.js.map +0 -1
- package/dist/session/post-auth.js.map +0 -1
- package/dist/session/redirect-listener.js.map +0 -1
- package/dist/session/schema.js.map +0 -1
- package/dist/session/scopes.js.map +0 -1
- package/dist/session/store.js.map +0 -1
- package/dist/session/token.d.ts +0 -40
- package/dist/session/token.js +0 -22
- package/dist/session/token.js.map +0 -1
- package/dist/session/validate.js.map +0 -1
- package/dist/session.d.ts +0 -96
- package/dist/session.js.map +0 -1
- package/dist/system.d.ts +0 -51
- package/dist/system.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find_org_basic.js","sourceRoot":"","sources":["../../../src/api/graphql/find_org_basic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,CAAA;;;;;;;;;;;CAW5C,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const FindOrganizationBasicQuery = gql`\n query FindOrganization($id: ID!) {\n organizations(id: $id, first: 1) {\n nodes {\n id\n businessName\n website\n appsNext\n }\n }\n }\n`\n\nexport interface FindOrganizationBasicQuerySchema {\n organizations: {\n nodes: {\n id: string\n businessName: string\n website: string\n appsNext: boolean\n }[]\n }\n}\n"]}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export declare const FindStoreByDomainQuery: string;
|
|
2
|
-
export interface FindStoreByDomainSchema {
|
|
3
|
-
organizations: {
|
|
4
|
-
nodes: {
|
|
5
|
-
id: string;
|
|
6
|
-
businessName: string;
|
|
7
|
-
website: string;
|
|
8
|
-
appsNext: boolean;
|
|
9
|
-
stores: {
|
|
10
|
-
nodes: {
|
|
11
|
-
shopId: string;
|
|
12
|
-
link: string;
|
|
13
|
-
shopDomain: string;
|
|
14
|
-
shopName: string;
|
|
15
|
-
transferDisabled: boolean;
|
|
16
|
-
convertableToPartnerTest: boolean;
|
|
17
|
-
}[];
|
|
18
|
-
};
|
|
19
|
-
}[];
|
|
20
|
-
};
|
|
21
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { gql } from 'graphql-request';
|
|
2
|
-
export const FindStoreByDomainQuery = gql `
|
|
3
|
-
query FindOrganization($id: ID!, $shopDomain: String) {
|
|
4
|
-
organizations(id: $id, first: 1) {
|
|
5
|
-
nodes {
|
|
6
|
-
id
|
|
7
|
-
businessName
|
|
8
|
-
website
|
|
9
|
-
appsNext
|
|
10
|
-
stores(shopDomain: $shopDomain, first: 1, archived: false) {
|
|
11
|
-
nodes {
|
|
12
|
-
shopId
|
|
13
|
-
link
|
|
14
|
-
shopDomain
|
|
15
|
-
shopName
|
|
16
|
-
transferDisabled
|
|
17
|
-
convertableToPartnerTest
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
`;
|
|
24
|
-
//# sourceMappingURL=find_store_by_domain.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find_store_by_domain.js","sourceRoot":"","sources":["../../../src/api/graphql/find_store_by_domain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;CAqBxC,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const FindStoreByDomainQuery = gql`\n query FindOrganization($id: ID!, $shopDomain: String) {\n organizations(id: $id, first: 1) {\n nodes {\n id\n businessName\n website\n appsNext\n stores(shopDomain: $shopDomain, first: 1, archived: false) {\n nodes {\n shopId\n link\n shopDomain\n shopName\n transferDisabled\n convertableToPartnerTest\n }\n }\n }\n }\n }\n`\n\nexport interface FindStoreByDomainSchema {\n organizations: {\n nodes: {\n id: string\n businessName: string\n website: string\n appsNext: boolean\n stores: {\n nodes: {\n shopId: string\n link: string\n shopDomain: string\n shopName: string\n transferDisabled: boolean\n convertableToPartnerTest: boolean\n }[]\n }\n }[]\n }\n}\n"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { gql } from 'graphql-request';
|
|
2
|
-
export const ApiSchemaDefinitionQuery = gql `
|
|
3
|
-
query ApiSchemaDefinitionQuery($apiKey: String!, $version: String!, $type: String!) {
|
|
4
|
-
definition: functionApiSchemaDefinition(apiKey: $apiKey, version: $version, type: $type)
|
|
5
|
-
}
|
|
6
|
-
`;
|
|
7
|
-
//# sourceMappingURL=api_schema_definition.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api_schema_definition.js","sourceRoot":"","sources":["../../../../src/api/graphql/functions/api_schema_definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,CAAA;;;;CAI1C,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const ApiSchemaDefinitionQuery = gql`\n query ApiSchemaDefinitionQuery($apiKey: String!, $version: String!, $type: String!) {\n definition: functionApiSchemaDefinition(apiKey: $apiKey, version: $version, type: $type)\n }\n`\n\nexport interface ApiSchemaDefinitionQuerySchema {\n definition: string | null\n}\n\nexport interface ApiSchemaDefinitionQueryVariables {\n apiKey: string\n version: string\n type: string\n}\n"]}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export declare const AppFunctionSetMutation: string;
|
|
2
|
-
export interface AppFunctionSetMutationSchema {
|
|
3
|
-
data: {
|
|
4
|
-
functionSet: {
|
|
5
|
-
userErrors: {
|
|
6
|
-
field: string;
|
|
7
|
-
message: string;
|
|
8
|
-
tag: string;
|
|
9
|
-
}[];
|
|
10
|
-
function?: {
|
|
11
|
-
id: string;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
export interface AppFunctionSetVariables {
|
|
17
|
-
id?: string;
|
|
18
|
-
legacyUuid?: string;
|
|
19
|
-
title: string;
|
|
20
|
-
description?: string;
|
|
21
|
-
apiType: string;
|
|
22
|
-
apiVersion?: string;
|
|
23
|
-
inputQuery?: string;
|
|
24
|
-
appBridge?: {
|
|
25
|
-
createPath?: string;
|
|
26
|
-
detailsPath?: string;
|
|
27
|
-
};
|
|
28
|
-
enableCreationUi: boolean;
|
|
29
|
-
moduleUploadUrl: string;
|
|
30
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { gql } from 'graphql-request';
|
|
2
|
-
export const AppFunctionSetMutation = gql `
|
|
3
|
-
mutation FunctionSet(
|
|
4
|
-
$id: FunctionId
|
|
5
|
-
$legacyUuid: String
|
|
6
|
-
$title: String!
|
|
7
|
-
$description: String
|
|
8
|
-
$apiType: String!
|
|
9
|
-
$apiVersion: String!
|
|
10
|
-
$inputQuery: String
|
|
11
|
-
$appBridge: AppBridgeInput
|
|
12
|
-
$enableCreationUi: Boolean
|
|
13
|
-
$moduleUploadUrl: String!
|
|
14
|
-
) {
|
|
15
|
-
functionSet(
|
|
16
|
-
id: $id
|
|
17
|
-
legacyUuid: $legacyUuid
|
|
18
|
-
title: $title
|
|
19
|
-
description: $description
|
|
20
|
-
apiType: $apiType
|
|
21
|
-
apiVersion: $apiVersion
|
|
22
|
-
inputQuery: $inputQuery
|
|
23
|
-
appBridge: $appBridge
|
|
24
|
-
enableCreationUi: $enableCreationUi
|
|
25
|
-
moduleUploadUrl: $moduleUploadUrl
|
|
26
|
-
) {
|
|
27
|
-
userErrors {
|
|
28
|
-
field
|
|
29
|
-
message
|
|
30
|
-
tag
|
|
31
|
-
}
|
|
32
|
-
function {
|
|
33
|
-
id
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
`;
|
|
38
|
-
//# sourceMappingURL=app_function_set.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app_function_set.js","sourceRoot":"","sources":["../../../../src/api/graphql/functions/app_function_set.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCxC,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const AppFunctionSetMutation = gql`\n mutation FunctionSet(\n $id: FunctionId\n $legacyUuid: String\n $title: String!\n $description: String\n $apiType: String!\n $apiVersion: String!\n $inputQuery: String\n $appBridge: AppBridgeInput\n $enableCreationUi: Boolean\n $moduleUploadUrl: String!\n ) {\n functionSet(\n id: $id\n legacyUuid: $legacyUuid\n title: $title\n description: $description\n apiType: $apiType\n apiVersion: $apiVersion\n inputQuery: $inputQuery\n appBridge: $appBridge\n enableCreationUi: $enableCreationUi\n moduleUploadUrl: $moduleUploadUrl\n ) {\n userErrors {\n field\n message\n tag\n }\n function {\n id\n }\n }\n }\n`\n\nexport interface AppFunctionSetMutationSchema {\n data: {\n functionSet: {\n userErrors: {\n field: string\n message: string\n tag: string\n }[]\n function?: {\n id: string\n }\n }\n }\n}\n\nexport interface AppFunctionSetVariables {\n id?: string\n legacyUuid?: string\n title: string\n description?: string\n apiType: string\n apiVersion?: string\n inputQuery?: string\n appBridge?: {\n createPath?: string\n detailsPath?: string\n }\n enableCreationUi: boolean\n moduleUploadUrl: string\n}\n"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { gql } from 'graphql-request';
|
|
2
|
-
export const ScriptServiceProxyQuery = gql `
|
|
3
|
-
query ProxyRequest($api_key: String, $query: String!, $variables: String) {
|
|
4
|
-
scriptServiceProxy(apiKey: $api_key, query: $query, variables: $variables)
|
|
5
|
-
}
|
|
6
|
-
`;
|
|
7
|
-
//# sourceMappingURL=function_service_proxy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"function_service_proxy.js","sourceRoot":"","sources":["../../../../src/api/graphql/functions/function_service_proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAA;;;;CAIzC,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const ScriptServiceProxyQuery = gql`\n query ProxyRequest($api_key: String, $query: String!, $variables: String) {\n scriptServiceProxy(apiKey: $api_key, query: $query, variables: $variables)\n }\n`\n\nexport interface ScriptServiceProxyQuerySchema {\n scriptServiceProxy: unknown\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"upload_url_generate.js","sourceRoot":"","sources":["../../../../src/api/graphql/functions/upload_url_generate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,CAAA;;;;;;;;CAQ3C,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const UploadUrlGenerateMutation = gql`\n mutation uploadUrlGenerate {\n uploadUrlGenerate {\n url\n headers\n maxSize\n }\n }\n`\n\nexport interface UploadUrlGenerateMutationSchema {\n data: {\n uploadUrlGenerate: {\n url: string\n headers: {[key: string]: string}\n maxSize: string\n }\n }\n}\n"]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare const GenerateSignedUploadUrl: string;
|
|
2
|
-
export interface GenerateSignedUploadUrlVariables {
|
|
3
|
-
apiKey: string;
|
|
4
|
-
deploymentUuid: string;
|
|
5
|
-
bundleFormat: number;
|
|
6
|
-
}
|
|
7
|
-
export interface GenerateSignedUploadUrlSchema {
|
|
8
|
-
deploymentGenerateSignedUploadUrl: {
|
|
9
|
-
signedUploadUrl: string;
|
|
10
|
-
userErrors: {
|
|
11
|
-
field: string[];
|
|
12
|
-
message: string;
|
|
13
|
-
}[];
|
|
14
|
-
};
|
|
15
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { gql } from 'graphql-request';
|
|
2
|
-
export const GenerateSignedUploadUrl = gql `
|
|
3
|
-
mutation GenerateSignedUploadUrl($apiKey: String!, $deploymentUuid: String!, $bundleFormat: Int!) {
|
|
4
|
-
deploymentGenerateSignedUploadUrl(
|
|
5
|
-
input: {apiKey: $apiKey, deploymentUuid: $deploymentUuid, bundleFormat: $bundleFormat}
|
|
6
|
-
) {
|
|
7
|
-
signedUploadUrl
|
|
8
|
-
userErrors {
|
|
9
|
-
field
|
|
10
|
-
message
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
`;
|
|
15
|
-
//# sourceMappingURL=generate_signed_upload_url.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generate_signed_upload_url.js","sourceRoot":"","sources":["../../../src/api/graphql/generate_signed_upload_url.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAA;;;;;;;;;;;;CAYzC,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const GenerateSignedUploadUrl = gql`\n mutation GenerateSignedUploadUrl($apiKey: String!, $deploymentUuid: String!, $bundleFormat: Int!) {\n deploymentGenerateSignedUploadUrl(\n input: {apiKey: $apiKey, deploymentUuid: $deploymentUuid, bundleFormat: $bundleFormat}\n ) {\n signedUploadUrl\n userErrors {\n field\n message\n }\n }\n }\n`\n\nexport interface GenerateSignedUploadUrlVariables {\n apiKey: string\n deploymentUuid: string\n bundleFormat: number\n}\n\nexport interface GenerateSignedUploadUrlSchema {\n deploymentGenerateSignedUploadUrl: {\n signedUploadUrl: string\n userErrors: {\n field: string[]\n message: string\n }[]\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get_urls.js","sourceRoot":"","sources":["../../../src/api/graphql/get_urls.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAA;;;;;;;CAO9B,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const GetURLsQuery = gql`\n query getApp($apiKey: String!) {\n app(apiKey: $apiKey) {\n applicationUrl\n redirectUrlWhitelist\n }\n }\n`\n\nexport interface GetURLsQueryVariables {\n apiKey: string\n}\n\nexport interface GetURLsQuerySchema {\n app: {\n applicationUrl: string\n redirectUrlWhitelist: string[]\n }\n}\n"]}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { gql } from 'graphql-request';
|
|
2
|
-
export const FindProductVariantQuery = gql `
|
|
3
|
-
query {
|
|
4
|
-
products(first: 1) {
|
|
5
|
-
edges {
|
|
6
|
-
node {
|
|
7
|
-
id
|
|
8
|
-
variants(first: 1) {
|
|
9
|
-
edges {
|
|
10
|
-
node {
|
|
11
|
-
id
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
`;
|
|
20
|
-
//# sourceMappingURL=get_variant_id.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get_variant_id.js","sourceRoot":"","sources":["../../../src/api/graphql/get_variant_id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;CAiBzC,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const FindProductVariantQuery = gql`\n query {\n products(first: 1) {\n edges {\n node {\n id\n variants(first: 1) {\n edges {\n node {\n id\n }\n }\n }\n }\n }\n }\n }\n`\n\nexport interface FindProductVariantSchema {\n products: {\n edges: {\n node: {\n id: string\n variants: {\n edges: {\n node: {\n id: string\n }\n }[]\n }\n }\n }[]\n }\n}\n"]}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export * from './all_app_extension_registrations.js';
|
|
2
|
-
export * from './all_orgs.js';
|
|
3
|
-
export * from './all_dev_stores_by_org.js';
|
|
4
|
-
export * from './convert_dev_to_test_store.js';
|
|
5
|
-
export * from './create_app.js';
|
|
6
|
-
export * from './create_deployment.js';
|
|
7
|
-
export * from './extension_create.js';
|
|
8
|
-
export * from './extension_specifications.js';
|
|
9
|
-
export * from './find_app.js';
|
|
10
|
-
export * from './find_org_basic.js';
|
|
11
|
-
export * from './find_org.js';
|
|
12
|
-
export * from './find_store_by_domain.js';
|
|
13
|
-
export * from './functions/app_function_set.js';
|
|
14
|
-
export * from './functions/api_schema_definition.js';
|
|
15
|
-
export * from './functions/function_service_proxy.js';
|
|
16
|
-
export * from './functions/upload_url_generate.js';
|
|
17
|
-
export * from './generate_signed_upload_url.js';
|
|
18
|
-
export * from './get_urls.js';
|
|
19
|
-
export * from './get_variant_id.js';
|
|
20
|
-
export * from './update_draft.js';
|
|
21
|
-
export * from './update_urls.js';
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export * from './all_app_extension_registrations.js';
|
|
2
|
-
export * from './all_orgs.js';
|
|
3
|
-
export * from './all_dev_stores_by_org.js';
|
|
4
|
-
export * from './convert_dev_to_test_store.js';
|
|
5
|
-
export * from './create_app.js';
|
|
6
|
-
export * from './create_deployment.js';
|
|
7
|
-
export * from './extension_create.js';
|
|
8
|
-
export * from './extension_specifications.js';
|
|
9
|
-
export * from './find_app.js';
|
|
10
|
-
export * from './find_org_basic.js';
|
|
11
|
-
export * from './find_org.js';
|
|
12
|
-
export * from './find_store_by_domain.js';
|
|
13
|
-
export * from './functions/app_function_set.js';
|
|
14
|
-
export * from './functions/api_schema_definition.js';
|
|
15
|
-
export * from './functions/function_service_proxy.js';
|
|
16
|
-
export * from './functions/upload_url_generate.js';
|
|
17
|
-
export * from './generate_signed_upload_url.js';
|
|
18
|
-
export * from './get_urls.js';
|
|
19
|
-
export * from './get_variant_id.js';
|
|
20
|
-
export * from './update_draft.js';
|
|
21
|
-
export * from './update_urls.js';
|
|
22
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/graphql/index.ts"],"names":[],"mappings":"AAAA,cAAc,sCAAsC,CAAA;AACpD,cAAc,eAAe,CAAA;AAC7B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,eAAe,CAAA;AAC7B,cAAc,qBAAqB,CAAA;AACnC,cAAc,eAAe,CAAA;AAC7B,cAAc,2BAA2B,CAAA;AACzC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,sCAAsC,CAAA;AACpD,cAAc,uCAAuC,CAAA;AACrD,cAAc,oCAAoC,CAAA;AAClD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,eAAe,CAAA;AAC7B,cAAc,qBAAqB,CAAA;AACnC,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA","sourcesContent":["export * from './all_app_extension_registrations.js'\nexport * from './all_orgs.js'\nexport * from './all_dev_stores_by_org.js'\nexport * from './convert_dev_to_test_store.js'\nexport * from './create_app.js'\nexport * from './create_deployment.js'\nexport * from './extension_create.js'\nexport * from './extension_specifications.js'\nexport * from './find_app.js'\nexport * from './find_org_basic.js'\nexport * from './find_org.js'\nexport * from './find_store_by_domain.js'\nexport * from './functions/app_function_set.js'\nexport * from './functions/api_schema_definition.js'\nexport * from './functions/function_service_proxy.js'\nexport * from './functions/upload_url_generate.js'\nexport * from './generate_signed_upload_url.js'\nexport * from './get_urls.js'\nexport * from './get_variant_id.js'\nexport * from './update_draft.js'\nexport * from './update_urls.js'\n"]}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export declare const ExtensionUpdateDraftMutation: string;
|
|
2
|
-
export interface ExtensionUpdateDraftInput {
|
|
3
|
-
apiKey: string;
|
|
4
|
-
config: string;
|
|
5
|
-
context: string | undefined;
|
|
6
|
-
registrationId: string;
|
|
7
|
-
}
|
|
8
|
-
export interface ExtensionUpdateDraftPayload {
|
|
9
|
-
clientMutationId: string;
|
|
10
|
-
extensionVersion: ExtensionVersion;
|
|
11
|
-
userErrors: {
|
|
12
|
-
field: string[];
|
|
13
|
-
message: string;
|
|
14
|
-
}[];
|
|
15
|
-
}
|
|
16
|
-
export interface ExtensionVersion {
|
|
17
|
-
config: string;
|
|
18
|
-
context: string;
|
|
19
|
-
id: string;
|
|
20
|
-
lastUserInteractionAt: string;
|
|
21
|
-
location: string;
|
|
22
|
-
registrationId: string;
|
|
23
|
-
registrationUuid: string;
|
|
24
|
-
uuid: string;
|
|
25
|
-
validationErrors: {
|
|
26
|
-
field: string[];
|
|
27
|
-
message: string;
|
|
28
|
-
}[];
|
|
29
|
-
versionTag: string;
|
|
30
|
-
}
|
|
31
|
-
export interface ExtensionUpdateSchema {
|
|
32
|
-
extensionUpdateDraft: ExtensionUpdateDraftPayload;
|
|
33
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { gql } from 'graphql-request';
|
|
2
|
-
export const ExtensionUpdateDraftMutation = gql `
|
|
3
|
-
mutation ExtensionUpdateDraft($apiKey: String!, $registrationId: ID!, $config: JSON!, $context: String) {
|
|
4
|
-
extensionUpdateDraft(
|
|
5
|
-
input: {apiKey: $apiKey, registrationId: $registrationId, config: $config, context: $context}
|
|
6
|
-
) {
|
|
7
|
-
extensionVersion {
|
|
8
|
-
registrationId
|
|
9
|
-
context
|
|
10
|
-
lastUserInteractionAt
|
|
11
|
-
location
|
|
12
|
-
validationErrors {
|
|
13
|
-
field
|
|
14
|
-
message
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
userErrors {
|
|
18
|
-
field
|
|
19
|
-
message
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
`;
|
|
24
|
-
//# sourceMappingURL=update_draft.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update_draft.js","sourceRoot":"","sources":["../../../src/api/graphql/update_draft.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;CAqB9C,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const ExtensionUpdateDraftMutation = gql`\n mutation ExtensionUpdateDraft($apiKey: String!, $registrationId: ID!, $config: JSON!, $context: String) {\n extensionUpdateDraft(\n input: {apiKey: $apiKey, registrationId: $registrationId, config: $config, context: $context}\n ) {\n extensionVersion {\n registrationId\n context\n lastUserInteractionAt\n location\n validationErrors {\n field\n message\n }\n }\n userErrors {\n field\n message\n }\n }\n }\n`\n\nexport interface ExtensionUpdateDraftInput {\n apiKey: string\n config: string\n // not all extensions require configs, e.g. subscription\n context: string | undefined\n registrationId: string\n}\n\n// \"\"\"\n// Autogenerated return type of ExtensionUpdateDraft\n// \"\"\"\nexport interface ExtensionUpdateDraftPayload {\n // \"\"\"\n // A unique identifier for the client performing the mutation.\n // \"\"\"\n clientMutationId: string\n extensionVersion: ExtensionVersion\n // userErrors: [UserError]\n userErrors: {\n field: string[]\n message: string\n }[]\n}\n\n// \"\"\"\n// A particular version of an extension belonging to a Shopify Partner App.\n// \"\"\"\nexport interface ExtensionVersion {\n // \"\"\"\n // The serialized JSON config for the extension version\n // \"\"\"\n config: string\n\n // \"\"\"\n // The context of an extension version, indicating where it will be rendered\n // \"\"\"\n context: string\n\n // \"\"\"\n // The unique identifier of the extension version\n // \"\"\"\n // id: ID\n id: string\n\n // \"\"\"\n // The last time a user updated an extension version\n // \"\"\"\n // lastUserInteractionAt: DateTime\n lastUserInteractionAt: string\n\n // \"\"\"\n // The URL to view the app extension version in the Partners Dashboard\n // \"\"\"\n // location: Url\n location: string\n\n // \"\"\"\n // The unique identifier of the extension registration this version belongs to\n // \"\"\"\n // registrationId: ID\n registrationId: string\n\n // \"\"\"\n // The uuid of the extension registration this version belongs to\n // \"\"\"\n registrationUuid: string\n\n // \"\"\"\n // The uuid of the extension version\n // \"\"\"\n uuid: string\n\n // \"\"\"\n // The validation errors for an extension version\n // \"\"\"\n // validationErrors: [ValidationError]\n validationErrors: {\n field: string[]\n message: string\n }[]\n\n // \"\"\"\n // The version tag of the extension version\n // \"\"\"\n versionTag: string\n}\n\nexport interface ExtensionUpdateSchema {\n extensionUpdateDraft: ExtensionUpdateDraftPayload\n}\n"]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare const UpdateURLsQuery: string;
|
|
2
|
-
export interface UpdateURLsQueryVariables {
|
|
3
|
-
apiKey: string;
|
|
4
|
-
applicationUrl: string;
|
|
5
|
-
redirectUrlWhitelist: string[];
|
|
6
|
-
}
|
|
7
|
-
export interface UpdateURLsQuerySchema {
|
|
8
|
-
appUpdate: {
|
|
9
|
-
userErrors: {
|
|
10
|
-
field: string[];
|
|
11
|
-
message: string;
|
|
12
|
-
}[];
|
|
13
|
-
};
|
|
14
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { gql } from 'graphql-request';
|
|
2
|
-
export const UpdateURLsQuery = gql `
|
|
3
|
-
mutation appUpdate($apiKey: String!, $applicationUrl: Url!, $redirectUrlWhitelist: [Url]!) {
|
|
4
|
-
appUpdate(input: {apiKey: $apiKey, applicationUrl: $applicationUrl, redirectUrlWhitelist: $redirectUrlWhitelist}) {
|
|
5
|
-
userErrors {
|
|
6
|
-
message
|
|
7
|
-
field
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
`;
|
|
12
|
-
//# sourceMappingURL=update_urls.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update_urls.js","sourceRoot":"","sources":["../../../src/api/graphql/update_urls.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAA;;;;;;;;;CASjC,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const UpdateURLsQuery = gql`\n mutation appUpdate($apiKey: String!, $applicationUrl: Url!, $redirectUrlWhitelist: [Url]!) {\n appUpdate(input: {apiKey: $apiKey, applicationUrl: $applicationUrl, redirectUrlWhitelist: $redirectUrlWhitelist}) {\n userErrors {\n message\n field\n }\n }\n }\n`\n\nexport interface UpdateURLsQueryVariables {\n apiKey: string\n applicationUrl: string\n redirectUrlWhitelist: string[]\n}\n\nexport interface UpdateURLsQuerySchema {\n appUpdate: {\n userErrors: {\n field: string[]\n message: string\n }[]\n }\n}\n"]}
|
package/dist/api.d.ts
DELETED
package/dist/api.js
DELETED
package/dist/api.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAA;AACjD,OAAO,KAAK,QAAQ,MAAM,wCAAwC,CAAA;AAElE,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAC,CAAA","sourcesContent":["import * as graphql from './api/graphql/index.js'\nimport * as identity from './session/identity-token-validation.js'\n\nexport {graphql, identity}\n"]}
|
package/dist/cli.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* An object that contains the flags that
|
|
3
|
-
* are shared across all the commands.
|
|
4
|
-
*/
|
|
5
|
-
export declare const globalFlags: {
|
|
6
|
-
preset: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
7
|
-
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
|
-
};
|
package/dist/cli.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Flags } from '@oclif/core';
|
|
2
|
-
/**
|
|
3
|
-
* An object that contains the flags that
|
|
4
|
-
* are shared across all the commands.
|
|
5
|
-
*/
|
|
6
|
-
export const globalFlags = {
|
|
7
|
-
preset: Flags.string({
|
|
8
|
-
hidden: true,
|
|
9
|
-
description: 'The preset to apply to the current command.',
|
|
10
|
-
env: 'SHOPIFY_FLAG_PRESET',
|
|
11
|
-
}),
|
|
12
|
-
verbose: Flags.boolean({
|
|
13
|
-
hidden: false,
|
|
14
|
-
description: 'Increase the verbosity of the logs.',
|
|
15
|
-
env: 'SHOPIFY_FLAG_VERBOSE',
|
|
16
|
-
}),
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAA;AAEjC;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC;QACnB,MAAM,EAAE,IAAI;QACZ,WAAW,EAAE,6CAA6C;QAC1D,GAAG,EAAE,qBAAqB;KAC3B,CAAC;IACF,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC;QACrB,MAAM,EAAE,KAAK;QACb,WAAW,EAAE,qCAAqC;QAClD,GAAG,EAAE,sBAAsB;KAC5B,CAAC;CACH,CAAA","sourcesContent":["import {Flags} from '@oclif/core'\n\n/**\n * An object that contains the flags that\n * are shared across all the commands.\n */\nexport const globalFlags = {\n preset: Flags.string({\n hidden: true,\n description: 'The preset to apply to the current command.',\n env: 'SHOPIFY_FLAG_PRESET',\n }),\n verbose: Flags.boolean({\n hidden: false,\n description: 'Increase the verbosity of the logs.',\n env: 'SHOPIFY_FLAG_VERBOSE',\n }),\n}\n"]}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Abort } from '../error.js';
|
|
2
|
-
export declare const CouldntObtainPartnersSpinFQDNError: Abort;
|
|
3
|
-
export declare const CouldntObtainIdentitySpinFQDNError: Abort;
|
|
4
|
-
export declare const CouldntObtainShopifySpinFQDNError: Abort;
|
|
5
|
-
export declare const NotProvidedStoreFQDNError: Abort;
|
|
6
|
-
/**
|
|
7
|
-
* It returns the Partners' API service we should interact with.
|
|
8
|
-
* @returns Fully-qualified domain of the partners service we should interact with.
|
|
9
|
-
*/
|
|
10
|
-
export declare function partners(): Promise<string>;
|
|
11
|
-
/**
|
|
12
|
-
* It returns the Identity service we should interact with.
|
|
13
|
-
* @returns Fully-qualified domain of the Identity service we should interact with.
|
|
14
|
-
*/
|
|
15
|
-
export declare function identity(): Promise<string>;
|
|
16
|
-
/**
|
|
17
|
-
* It returns the Shopify service we should interact with.
|
|
18
|
-
* Note the same fqdn is sued for the Admin and the Storefront Renderer APIs.
|
|
19
|
-
* @returns Fully-qualified domain of the Shopify service we should interact with.
|
|
20
|
-
*/
|
|
21
|
-
export declare function shopify(options?: {
|
|
22
|
-
storeFqdn?: string;
|
|
23
|
-
}): Promise<string>;
|
|
24
|
-
/**
|
|
25
|
-
* Given a store, returns a valid store fqdn removing protocol and adding the proper domain in case is missing
|
|
26
|
-
* @param store - Original store name provided by the user
|
|
27
|
-
* @returns a valid store fqdn
|
|
28
|
-
*/
|
|
29
|
-
export declare function normalizeStoreName(store: string): Promise<string>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fqdn.js","sourceRoot":"","sources":["../../src/environment/fqdn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAE,IAAI,IAAI,QAAQ,EAAC,MAAM,WAAW,CAAA;AAChD,OAAO,EAAC,iBAAiB,EAAE,kBAAkB,EAAC,MAAM,cAAc,CAAA;AAClE,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAA;AAEjC,MAAM,CAAC,MAAM,kCAAkC,GAAG,IAAI,KAAK,CACzD,iGAAiG,CAClG,CAAA;AACD,MAAM,CAAC,MAAM,kCAAkC,GAAG,IAAI,KAAK,CACzD,iGAAiG,CAClG,CAAA;AACD,MAAM,CAAC,MAAM,iCAAiC,GAAG,IAAI,KAAK,CACxD,gGAAgG,CACjG,CAAA;AACD,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,KAAK,CAChD,2EAA2E,CAC5E,CAAA;AAED;;;GAGG;AACH,MAAM,C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AE,CAC5C,iBAAiB,EAAE,CAAC,CAAC,CAAC,GAAG,SAAS,YAAY,MAAM,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,SAAS,gBAAgB,CAAA;IAC7F,MAAM,aAAa,GAAG,CAAC,SAAiB,EAAE,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAA;IACnH,OAAO,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAA;AACpE,CAAC","sourcesContent":["import {fqdn, fqdn as spinFqdn} from './spin.js'\nimport {isSpinEnvironment, serviceEnvironment} from './service.js'\nimport {Abort} from '../error.js'\n\nexport const CouldntObtainPartnersSpinFQDNError = new Abort(\n \"Couldn't obtain the Spin FQDN for Partners when the CLI is not running from a Spin environment.\",\n)\nexport const CouldntObtainIdentitySpinFQDNError = new Abort(\n \"Couldn't obtain the Spin FQDN for Identity when the CLI is not running from a Spin environment.\",\n)\nexport const CouldntObtainShopifySpinFQDNError = new Abort(\n \"Couldn't obtain the Spin FQDN for Shopify when the CLI is not running from a Spin environment.\",\n)\nexport const NotProvidedStoreFQDNError = new Abort(\n \"Couldn't obtain the Shopify FQDN because the store FQDN was not provided.\",\n)\n\n/**\n * It returns the Partners' API service we should interact with.\n * @returns Fully-qualified domain of the partners service we should interact with.\n */\nexport async function partners(): Promise<string> {\n const environment = serviceEnvironment()\n const productionFqdn = 'partners.shopify.com'\n switch (environment) {\n case 'local':\n return 'partners.myshopify.io'\n case 'spin':\n return `partners.${await spinFqdn()}`\n default:\n return productionFqdn\n }\n}\n\n/**\n * It returns the Identity service we should interact with.\n * @returns Fully-qualified domain of the Identity service we should interact with.\n */\nexport async function identity(): Promise<string> {\n const environment = serviceEnvironment()\n const productionFqdn = 'accounts.shopify.com'\n switch (environment) {\n case 'local':\n return 'identity.myshopify.io'\n case 'spin':\n return `identity.${await spinFqdn()}`\n default:\n return productionFqdn\n }\n}\n\n/**\n * It returns the Shopify service we should interact with.\n * Note the same fqdn is sued for the Admin and the Storefront Renderer APIs.\n * @returns Fully-qualified domain of the Shopify service we should interact with.\n */\nexport async function shopify(options: {storeFqdn?: string} = {}): Promise<string> {\n const environment = serviceEnvironment()\n switch (environment) {\n case 'local':\n return 'shopify.myshopify.io'\n case 'spin':\n return `identity.${await spinFqdn()}`\n default:\n if (options.storeFqdn) {\n return options.storeFqdn\n } else {\n throw NotProvidedStoreFQDNError\n }\n }\n}\n\n/**\n * Given a store, returns a valid store fqdn removing protocol and adding the proper domain in case is missing\n * @param store - Original store name provided by the user\n * @returns a valid store fqdn\n */\nexport async function normalizeStoreName(store: string) {\n const storeFqdn = store.replace(/^https?:\\/\\//, '').replace(/\\/$/, '')\n const addDomain = async (storeFqdn: string) =>\n isSpinEnvironment() ? `${storeFqdn}.shopify.${await fqdn()}` : `${storeFqdn}.myshopify.com`\n const containDomain = (storeFqdn: string) => storeFqdn.includes('.myshopify.com') || storeFqdn.includes('spin.dev')\n return containDomain(storeFqdn) ? storeFqdn : addDomain(storeFqdn)\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"local.js","sourceRoot":"","sources":["../../src/environment/local.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAC,MAAM,gBAAgB,CAAA;AAC9C,OAAO,EAAC,MAAM,EAAC,MAAM,WAAW,CAAA;AAChC,OAAO,SAAS,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAC,MAAM,IAAI,UAAU,EAAC,MAAM,YAAY,CAAA;AAC/C,OAAO,EAAC,IAAI,EAAC,MAAM,cAAc,CAAA;AACjC,OAAO,aAAa,MAAM,gBAAgB,CAAA;AAC1C,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAC,OAAO,EAAC,MAAM,IAAI,CAAA;AAE1B;;;GAGG;AAC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AAG,SAAS,CAAA;QACpB,IAAI,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;YAC1B,IAAI,GAAG,UAAU,CAAA;SAClB;aAAM,IAAI,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE;YACnC,IAAI,GAAG,QAAQ,CAAA;SAChB;aAAM,IAAI,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;YAClC,IAAI,GAAG,QAAQ,CAAA;SAChB;QAED,OAAO;YACL,IAAI,EAAE,IAAI;YACV,IAAI;SACL,CAAA;KACF;IACD,OAAO;QACL,IAAI,EAAE,KAAK;KACZ,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU;IACxB,OAAO,UAAU,CAAC,GAAG,EAAE,CAAA;AACzB,CAAC","sourcesContent":["import {isTruthy, isSet} from './utilities.js'\nimport {isSpin} from './spin.js'\nimport constants from '../constants.js'\nimport {exists as fileExists} from '../file.js'\nimport {exec} from '../system.js'\nimport isInteractive from 'is-interactive'\nimport macaddress from 'macaddress'\nimport {homedir} from 'os'\n\n/**\n * It returns true if the terminal is interactive.\n * @returns True if the terminal is interactive.\n */\nexport function isTerminalInteractive(): boolean {\n return isInteractive()\n}\n\n/**\n * Returns the path to the user's home directory.\n * @returns The path to the user's home directory.\n */\nexport function homeDirectory(): string {\n return homedir()\n}\n\n/**\n * Returns true if the CLI is running in debug mode.\n * @param env - The environment variables from the environment of the current process.\n * @returns true if SHOPIFY_ENV is development\n */\nexport function isDevelopment(env = process.env): boolean {\n return env[constants.environmentVariables.env] === 'development'\n}\n\n/**\n * Returns true if the CLI is running in verbose mode.\n * @param env - The environment variables from the environment of the current process.\n * @returns true if SHOPIFY_FLAG_VERBOSE is truthy or the flag --verbose has been passed\n */\nexport function isVerbose(env = process.env): boolean {\n return isTruthy(env[constants.environmentVariables.verbose]) || process.argv.includes('--verbose')\n}\n\n/**\n * Returns true if the environment in which the CLI is running is either\n * a local environment (where dev is present) or a cloud environment (spin).\n * @returns True if the CLI is used in a Shopify environment.\n */\nexport async function isShopify(env = process.env): Promise<boolean> {\n if (Object.prototype.hasOwnProperty.call(env, constants.environmentVariables.runAsUser)) {\n return !isTruthy(env[constants.environmentVariables.runAsUser])\n }\n const devInstalled = await fileExists(constants.paths.executables.dev)\n return devInstalled || isSpin(env)\n}\n\n/**\n * This variable is used when running unit tests to indicate that the CLI's business logic\n * is run as a subject of a unit test. We can use this variable to disable output through\n * the standard streams.\n * @param env - The environment variables from the environment of the current process.\n * @returns True if the SHOPIFY_UNIT_TEST environment variable is truthy.\n */\nexport function isUnitTest(env = process.env): boolean {\n return isTruthy(env[constants.environmentVariables.unitTest])\n}\n\n/**\n * Returns true if reporting analytics is enabled.\n * @param env - The environment variables from the environment of the current process.\n * @returns true unless SHOPIFY_CLI_NO_ANALYTICS is truthy or debug mode is enabled.\n */\nexport function analyticsDisabled(env = process.env): boolean {\n return isTruthy(env[constants.environmentVariables.noAnalytics]) || isDevelopment(env)\n}\n\n/** Returns true if reporting analytics should always happen, regardless of DEBUG mode etc. */\nexport function alwaysLogAnalytics(env = process.env): boolean {\n return isTruthy(env[constants.environmentVariables.alwaysLogAnalytics])\n}\n\nexport function firstPartyDev(env = process.env): boolean {\n return isTruthy(env[constants.environmentVariables.firstPartyDev])\n}\n\nexport function useDeviceAuth(env = process.env): boolean {\n return isTruthy(env[constants.environmentVariables.deviceAuth]) || isCloudEnvironment(env)\n}\n\nexport function useFunctionMatching(env = process.env): boolean {\n return isTruthy(env[constants.environmentVariables.functionMatching])\n}\n\nexport function useThemeBundling(env = process.env): boolean {\n return isTruthy(env[constants.environmentVariables.themeBundling])\n}\n\n// https://www.gitpod.io/docs/environment-variables#default-environment-variables\nexport function gitpodURL(env = process.env): string | undefined {\n return env[constants.environmentVariables.gitpod]\n}\n\n// https://docs.github.com/en/codespaces/developing-in-codespaces/default-environment-variables-for-your-codespace#list-of-default-environment-variables\nexport function codespaceURL(env = process.env): string | undefined {\n return env[constants.environmentVariables.codespaceName]\n}\n\n/**\n * Checks if the CLI is run from a cloud environment\n *\n * @param env - Environment variables used when the cli is launched\n *\n * @returns True in case the CLI is run from a cloud environment\n */\nexport function isCloudEnvironment(env: NodeJS.ProcessEnv = process.env): boolean {\n return cloudEnvironment(env).platform !== 'localhost'\n}\n\n/**\n * Returns the cloud environment platform name and if the platform support online IDE in case the CLI is run from one of\n * them. Platform name 'localhost' is returned otherwise\n *\n * @param env - Environment variables used when the cli is launched\n *\n * @returns Cloud platform information\n */\nexport function cloudEnvironment(env: NodeJS.ProcessEnv = process.env): {\n platform: 'spin' | 'codespaces' | 'gitpod' | 'localhost'\n editor: boolean\n} {\n if (isSet(env[constants.environmentVariables.codespaces])) {\n return {platform: 'codespaces', editor: true}\n }\n if (isSet(env[constants.environmentVariables.gitpod])) {\n return {platform: 'gitpod', editor: true}\n }\n if (isSpin(env)) {\n return {platform: 'spin', editor: false}\n }\n return {platform: 'localhost', editor: false}\n}\n\n/**\n * Returns whether the environment has Git available.\n * @returns A promise that resolves with the value.\n */\nexport async function hasGit(): Promise<boolean> {\n try {\n await exec('git', ['--version'])\n return true\n // eslint-disable-next-line no-catch-all/no-catch-all\n } catch {\n return false\n }\n}\n\n/**\n * Gets info on the CI platform the CLI is running on, if applicable\n */\nexport function ciPlatform(env = process.env): {isCI: true; name: string} | {isCI: false; name?: undefined} {\n if (isTruthy(env.CI)) {\n let name = 'unknown'\n if (isTruthy(env.CIRCLECI)) {\n name = 'circleci'\n } else if (isSet(env.GITHUB_ACTION)) {\n name = 'github'\n } else if (isTruthy(env.GITLAB_CI)) {\n name = 'gitlab'\n }\n\n return {\n isCI: true,\n name,\n }\n }\n return {\n isCI: false,\n }\n}\n\n/**\n * Returns the first mac address found\n *\n * @returns Mac address\n */\nexport function macAddress() {\n return macaddress.one()\n}\n"]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { isSpin } from './spin.js';
|
|
2
|
-
import constants from '../constants.js';
|
|
3
|
-
import { Environment } from '../network/service.js';
|
|
4
|
-
export function serviceEnvironment(env = process.env) {
|
|
5
|
-
const value = env[constants.environmentVariables.serviceEnv];
|
|
6
|
-
if (value === 'local') {
|
|
7
|
-
return Environment.Local;
|
|
8
|
-
}
|
|
9
|
-
else if (value === 'spin' || isSpin(env)) {
|
|
10
|
-
return Environment.Spin;
|
|
11
|
-
}
|
|
12
|
-
else {
|
|
13
|
-
return Environment.Production;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
export function isSpinEnvironment(env = process.env) {
|
|
17
|
-
return serviceEnvironment(env) === Environment.Spin;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../src/environment/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,WAAW,CAAA;AAChC,OAAO,SAAS,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAA;AAEjD,MAAM,UAAU,kBAAkB,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG;IAClD,MAAM,KAAK,GAAG,GAAG,CAAC,SAAS,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAA;IAC5D,IAAI,KAAK,KAAK,OAAO,EAAE;QACrB,OAAO,WAAW,CAAC,KAAK,CAAA;KACzB;SAAM,IAAI,KAAK,KAAK,MAAM,IAAI,MAAM,CAAC,GAAG,CAAC,EAAE;QAC1C,OAAO,WAAW,CAAC,IAAI,CAAA;KACxB;SAAM;QACL,OAAO,WAAW,CAAC,UAAU,CAAA;KAC9B;AACH,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG;IACjD,OAAO,kBAAkB,CAAC,GAAG,CAAC,KAAK,WAAW,CAAC,IAAI,CAAA;AACrD,CAAC","sourcesContent":["import {isSpin} from './spin.js'\nimport constants from '../constants.js'\nimport {Environment} from '../network/service.js'\n\nexport function serviceEnvironment(env = process.env): Environment {\n const value = env[constants.environmentVariables.serviceEnv]\n if (value === 'local') {\n return Environment.Local\n } else if (value === 'spin' || isSpin(env)) {\n return Environment.Spin\n } else {\n return Environment.Production\n }\n}\n\nexport function isSpinEnvironment(env = process.env): boolean {\n return serviceEnvironment(env) === Environment.Spin\n}\n"]}
|