@shopify/cli-kit 3.55.3 → 3.56.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/assets/cli-ruby/bin/shopify +6 -0
- package/assets/cli-ruby/lib/project_types/theme/commands/token.rb +3 -0
- package/dist/private/node/ui/components/TextInput.js +10 -11
- package/dist/private/node/ui/components/TextInput.js.map +1 -1
- package/dist/private/node/ui/components/TextInput.test.js +12 -0
- package/dist/private/node/ui/components/TextInput.test.js.map +1 -1
- package/dist/public/common/string.d.ts +9 -0
- package/dist/public/common/string.js +17 -0
- package/dist/public/common/string.js.map +1 -1
- package/dist/public/common/version.d.ts +1 -1
- package/dist/public/common/version.js +1 -1
- package/dist/public/common/version.js.map +1 -1
- package/dist/public/node/session.d.ts +4 -3
- package/dist/public/node/session.js +6 -2
- package/dist/public/node/session.js.map +1 -1
- package/dist/public/node/themes/api.d.ts +4 -1
- package/dist/public/node/themes/api.js +15 -9
- package/dist/public/node/themes/api.js.map +1 -1
- package/dist/public/node/themes/factories.d.ts +14 -6
- package/dist/public/node/themes/factories.js +16 -6
- package/dist/public/node/themes/factories.js.map +1 -1
- package/dist/public/node/themes/types.d.ts +23 -0
- package/dist/public/node/themes/types.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,18 +1,26 @@
|
|
|
1
|
-
import { Checksum, Theme, ThemeAsset } from '@shopify/cli-kit/node/themes/types';
|
|
2
|
-
interface
|
|
1
|
+
import { BulkUploadResult, Checksum, Theme, ThemeAsset } from '@shopify/cli-kit/node/themes/types';
|
|
2
|
+
interface RemoteThemeResponse {
|
|
3
3
|
id: number;
|
|
4
4
|
name: string;
|
|
5
5
|
role: string;
|
|
6
6
|
createdAtRuntime?: boolean;
|
|
7
7
|
processing?: boolean;
|
|
8
8
|
}
|
|
9
|
-
interface
|
|
9
|
+
interface RemoteAssetResponse {
|
|
10
10
|
key: string;
|
|
11
11
|
checksum: string;
|
|
12
12
|
attachment: string;
|
|
13
13
|
value: string;
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
interface RemoteBulkUploadResponse {
|
|
16
|
+
body: {
|
|
17
|
+
asset: RemoteAssetResponse;
|
|
18
|
+
};
|
|
19
|
+
code: number;
|
|
20
|
+
errors?: string[];
|
|
21
|
+
}
|
|
22
|
+
export declare function buildTheme(themeJson?: RemoteThemeResponse): Theme | undefined;
|
|
23
|
+
export declare function buildChecksum(asset?: RemoteAssetResponse): Checksum | undefined;
|
|
24
|
+
export declare function buildThemeAsset(asset?: RemoteAssetResponse): ThemeAsset | undefined;
|
|
25
|
+
export declare function buildBulkUploadResults(bulkUpload?: RemoteBulkUploadResponse): BulkUploadResult | undefined;
|
|
18
26
|
export {};
|
|
@@ -12,16 +12,26 @@ export function buildTheme(themeJson) {
|
|
|
12
12
|
role: role === 'main' ? 'live' : role,
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
export function buildChecksum(
|
|
16
|
-
if (!
|
|
15
|
+
export function buildChecksum(asset) {
|
|
16
|
+
if (!asset)
|
|
17
17
|
return;
|
|
18
|
-
const { key, checksum } =
|
|
18
|
+
const { key, checksum } = asset;
|
|
19
19
|
return { key, checksum };
|
|
20
20
|
}
|
|
21
|
-
export function buildThemeAsset(
|
|
22
|
-
if (!
|
|
21
|
+
export function buildThemeAsset(asset) {
|
|
22
|
+
if (!asset)
|
|
23
23
|
return;
|
|
24
|
-
const { key, checksum, attachment, value } =
|
|
24
|
+
const { key, checksum, attachment, value } = asset;
|
|
25
25
|
return { key, checksum, attachment, value };
|
|
26
26
|
}
|
|
27
|
+
export function buildBulkUploadResults(bulkUpload) {
|
|
28
|
+
if (!bulkUpload)
|
|
29
|
+
return;
|
|
30
|
+
return {
|
|
31
|
+
key: bulkUpload.body.asset.key,
|
|
32
|
+
success: bulkUpload.code === 200,
|
|
33
|
+
errors: bulkUpload.errors || [],
|
|
34
|
+
asset: bulkUpload.body.asset || {},
|
|
35
|
+
};
|
|
36
|
+
}
|
|
27
37
|
//# sourceMappingURL=factories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factories.js","sourceRoot":"","sources":["../../../../src/public/node/themes/factories.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"factories.js","sourceRoot":"","sources":["../../../../src/public/node/themes/factories.ts"],"names":[],"mappings":"AAuBA,MAAM,UAAU,UAAU,CAAC,SAA+B;IACxD,IAAI,CAAC,SAAS;QAAE,OAAM;IAEtB,SAAS,CAAC,UAAU,KAApB,SAAS,CAAC,UAAU,GAAK,KAAK,EAAA;IAC9B,SAAS,CAAC,gBAAgB,KAA1B,SAAS,CAAC,gBAAgB,GAAK,KAAK,EAAA;IAEpC,MAAM,EAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,gBAAgB,EAAC,GAAG,SAAS,CAAA;IAEhE,OAAO;QACL,EAAE;QACF,IAAI;QACJ,UAAU;QACV,gBAAgB;QAChB,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI;KACtC,CAAA;AACH,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,KAA2B;IACvD,IAAI,CAAC,KAAK;QAAE,OAAM;IAElB,MAAM,EAAC,GAAG,EAAE,QAAQ,EAAC,GAAG,KAAK,CAAA;IAC7B,OAAO,EAAC,GAAG,EAAE,QAAQ,EAAC,CAAA;AACxB,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAA2B;IACzD,IAAI,CAAC,KAAK;QAAE,OAAM;IAElB,MAAM,EAAC,GAAG,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAC,GAAG,KAAK,CAAA;IAChD,OAAO,EAAC,GAAG,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAC,CAAA;AAC3C,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,UAAqC;IAC1E,IAAI,CAAC,UAAU;QAAE,OAAM;IAEvB,OAAO;QACL,GAAG,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG;QAC9B,OAAO,EAAE,UAAU,CAAC,IAAI,KAAK,GAAG;QAChC,MAAM,EAAE,UAAU,CAAC,MAAM,IAAI,EAAE;QAC/B,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE;KACnC,CAAA;AACH,CAAC","sourcesContent":["import {BulkUploadResult, Checksum, Theme, ThemeAsset} from '@shopify/cli-kit/node/themes/types'\n\ninterface RemoteThemeResponse {\n id: number\n name: string\n role: string\n createdAtRuntime?: boolean\n processing?: boolean\n}\n\ninterface RemoteAssetResponse {\n key: string\n checksum: string\n attachment: string\n value: string\n}\n\ninterface RemoteBulkUploadResponse {\n body: {asset: RemoteAssetResponse}\n code: number\n errors?: string[]\n}\n\nexport function buildTheme(themeJson?: RemoteThemeResponse): Theme | undefined {\n if (!themeJson) return\n\n themeJson.processing ??= false\n themeJson.createdAtRuntime ??= false\n\n const {id, name, role, processing, createdAtRuntime} = themeJson\n\n return {\n id,\n name,\n processing,\n createdAtRuntime,\n role: role === 'main' ? 'live' : role,\n }\n}\n\nexport function buildChecksum(asset?: RemoteAssetResponse): Checksum | undefined {\n if (!asset) return\n\n const {key, checksum} = asset\n return {key, checksum}\n}\n\nexport function buildThemeAsset(asset?: RemoteAssetResponse): ThemeAsset | undefined {\n if (!asset) return\n\n const {key, checksum, attachment, value} = asset\n return {key, checksum, attachment, value}\n}\n\nexport function buildBulkUploadResults(bulkUpload?: RemoteBulkUploadResponse): BulkUploadResult | undefined {\n if (!bulkUpload) return\n\n return {\n key: bulkUpload.body.asset.key,\n success: bulkUpload.code === 200,\n errors: bulkUpload.errors || [],\n asset: bulkUpload.body.asset || {},\n }\n}\n"]}
|
|
@@ -66,3 +66,26 @@ export interface ThemeAsset extends Checksum {
|
|
|
66
66
|
*/
|
|
67
67
|
value?: string;
|
|
68
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* Represents a single result returned within the response of a bulk upload operation.
|
|
71
|
+
* Each result includes the unique identifier for the file being uploaded,
|
|
72
|
+
* the status of the upload operation, any errors that occurred, and the asset that was uploaded.
|
|
73
|
+
*/
|
|
74
|
+
export interface BulkUploadResult {
|
|
75
|
+
/**
|
|
76
|
+
* The unique identifier for the file being uploaded.
|
|
77
|
+
*/
|
|
78
|
+
key: string;
|
|
79
|
+
/**
|
|
80
|
+
* Indicates whether the upload operation for this file was successful.
|
|
81
|
+
*/
|
|
82
|
+
success: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* An array of error messages that were generated during the upload operation for this file.
|
|
85
|
+
*/
|
|
86
|
+
errors?: string[];
|
|
87
|
+
/**
|
|
88
|
+
* The asset that was uploaded as part of the upload operation for this file.
|
|
89
|
+
*/
|
|
90
|
+
asset: ThemeAsset;
|
|
91
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/public/node/themes/types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * {@link Key} represents the unique identifier of a file in a theme.\n */\nexport type Key = string\n\n/**\n * Represents a theme on the file system.\n */\nexport interface ThemeFileSystem {\n /**\n * The root path of the theme.\n */\n root: string\n\n /**\n * Local theme files.\n */\n files: Map<Key, ThemeAsset>\n}\n\n/**\n * Represents a theme.\n */\nexport interface Theme {\n /**\n * The remote ID of the theme.\n */\n id: number\n\n /**\n * The remote name of the theme.\n */\n name: string\n\n /**\n * A boolean determining whether or not the theme was created at runtime.\n */\n createdAtRuntime: boolean\n\n /**\n * A boolean determining if the theme is processing at the theme library.\n */\n processing: boolean\n\n /**\n * The remote role of the theme.\n */\n role: string\n}\n\n/**\n * Represents the remote checksum for a file in a theme.\n */\nexport interface Checksum {\n /**\n * Identifier of the theme file.\n */\n key: Key\n\n /**\n * Reresents the checksum value of the theme file.\n */\n checksum: string\n}\n\n/**\n * Represents a file in a theme.\n */\nexport interface ThemeAsset extends Checksum {\n /**\n * A base64-encoded image.\n */\n attachment?: string\n\n /**\n * The text content of the asset, such as the HTML and Liquid markup of a template file.\n */\n value?: string\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/public/node/themes/types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * {@link Key} represents the unique identifier of a file in a theme.\n */\nexport type Key = string\n\n/**\n * Represents a theme on the file system.\n */\nexport interface ThemeFileSystem {\n /**\n * The root path of the theme.\n */\n root: string\n\n /**\n * Local theme files.\n */\n files: Map<Key, ThemeAsset>\n}\n\n/**\n * Represents a theme.\n */\nexport interface Theme {\n /**\n * The remote ID of the theme.\n */\n id: number\n\n /**\n * The remote name of the theme.\n */\n name: string\n\n /**\n * A boolean determining whether or not the theme was created at runtime.\n */\n createdAtRuntime: boolean\n\n /**\n * A boolean determining if the theme is processing at the theme library.\n */\n processing: boolean\n\n /**\n * The remote role of the theme.\n */\n role: string\n}\n\n/**\n * Represents the remote checksum for a file in a theme.\n */\nexport interface Checksum {\n /**\n * Identifier of the theme file.\n */\n key: Key\n\n /**\n * Reresents the checksum value of the theme file.\n */\n checksum: string\n}\n\n/**\n * Represents a file in a theme.\n */\nexport interface ThemeAsset extends Checksum {\n /**\n * A base64-encoded image.\n */\n attachment?: string\n\n /**\n * The text content of the asset, such as the HTML and Liquid markup of a template file.\n */\n value?: string\n}\n\n/**\n * Represents a single result returned within the response of a bulk upload operation.\n * Each result includes the unique identifier for the file being uploaded,\n * the status of the upload operation, any errors that occurred, and the asset that was uploaded.\n */\nexport interface BulkUploadResult {\n /**\n * The unique identifier for the file being uploaded.\n */\n key: string\n\n /**\n * Indicates whether the upload operation for this file was successful.\n */\n success: boolean\n\n /**\n * An array of error messages that were generated during the upload operation for this file.\n */\n errors?: string[]\n\n /**\n * The asset that was uploaded as part of the upload operation for this file.\n */\n asset: ThemeAsset\n}\n"]}
|