@shopify/cli-kit 3.0.24 → 3.0.25

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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @shopify/cli-kit
2
2
 
3
+ ## 3.0.25
4
+
5
+ ### Patch Changes
6
+
7
+ - a6ea9c8d: Fix shopify upgrade
8
+ - 822d0fd3: Move archiver to @shopify/node/archiver and export it from the package.json
9
+ - bf8137c2: Save session to local storage when secure storage (keychain) is not available
10
+ - e650b499: Add project type to analytics reports
11
+ - 3360289d: Compile function module before deploying function to the registry
12
+ - 2a666db7: Fix the formatting of errors' next steps not respecting the line breaks
13
+
3
14
  ## 3.0.24
4
15
 
5
16
  ## 3.0.23
@@ -0,0 +1,9 @@
1
+ /**
2
+ * It zips a directory.
3
+ * @param inputDirectory {string} The absolute path to the directory to be zipped.
4
+ * @param outputZipPath {string} The absolute path to the output zip file.
5
+ */
6
+ declare function zip(inputDirectory: string, outputZipPath: string): Promise<void>;
7
+
8
+ export { zip };
9
+ //# sourceMappingURL=archiver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"archiver.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/index.d.ts CHANGED
@@ -10,7 +10,7 @@ import * as simple_git from 'simple-git';
10
10
  import nodeFetch, { RequestInfo, RequestInit } from 'node-fetch';
11
11
  import FormData from 'form-data';
12
12
  import { platform } from 'node:process';
13
- import * as pathe from 'pathe';
13
+ import { join, relative, dirname, normalize, resolve, basename, extname, isAbsolute } from 'pathe';
14
14
  import { findUp } from 'find-up';
15
15
  import fastGlob from 'fast-glob';
16
16
  import { pathToFileURL } from 'node:url';
@@ -22,21 +22,6 @@ import { camelCase, paramCase, snakeCase, constantCase } from 'change-case';
22
22
  import * as toml$1 from '@iarna/toml';
23
23
  import { Listr, ListrTaskWrapper, ListrDefaultRenderer, ListrTask } from 'listr2';
24
24
 
25
- function _mergeNamespaces(n, m) {
26
- m.forEach(function (e) {
27
- e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
28
- if (k !== 'default' && !(k in n)) {
29
- var d = Object.getOwnPropertyDescriptor(e, k);
30
- Object.defineProperty(n, k, d.get ? d : {
31
- enumerable: true,
32
- get: function () { return e[k]; }
33
- });
34
- }
35
- });
36
- });
37
- return Object.freeze(n);
38
- }
39
-
40
25
  declare const constants: {
41
26
  environmentVariables: {
42
27
  unitTest: string;
@@ -206,9 +191,11 @@ interface DependencyVersion {
206
191
  * @param dependencies {string[]} List of dependencies to be added.
207
192
  * @param options {AddNPMDependenciesIfNeededOptions} Options for adding dependencies.
208
193
  */
209
- declare function addNPMDependenciesIfNeeded(dependencies: DependencyVersion[], options: AddNPMDependenciesIfNeededOptions): Promise<void>;
194
+ declare function addNPMDependenciesIfNeeded(dependencies: DependencyVersion[], options: AddNPMDependenciesIfNeededOptions, force?: boolean): Promise<void>;
210
195
  declare function addNPMDependenciesWithoutVersionIfNeeded(dependencies: string[], options: AddNPMDependenciesIfNeededOptions): Promise<void>;
211
196
  declare function addLatestNPMDependencies(dependencies: string[], options: AddNPMDependenciesIfNeededOptions): Promise<void>;
197
+ declare type ProjectType = 'node' | 'php' | 'ruby' | undefined;
198
+ declare function getProjectType(directory: string): Promise<ProjectType>;
212
199
 
213
200
  declare const dependency_genericConfigurationFileNames: typeof genericConfigurationFileNames;
214
201
  declare const dependency_dependencyManager: typeof dependencyManager;
@@ -228,6 +215,8 @@ type dependency_DependencyVersion = DependencyVersion;
228
215
  declare const dependency_addNPMDependenciesIfNeeded: typeof addNPMDependenciesIfNeeded;
229
216
  declare const dependency_addNPMDependenciesWithoutVersionIfNeeded: typeof addNPMDependenciesWithoutVersionIfNeeded;
230
217
  declare const dependency_addLatestNPMDependencies: typeof addLatestNPMDependencies;
218
+ type dependency_ProjectType = ProjectType;
219
+ declare const dependency_getProjectType: typeof getProjectType;
231
220
  declare namespace dependency {
232
221
  export {
233
222
  dependency_genericConfigurationFileNames as genericConfigurationFileNames,
@@ -248,6 +237,8 @@ declare namespace dependency {
248
237
  dependency_addNPMDependenciesIfNeeded as addNPMDependenciesIfNeeded,
249
238
  dependency_addNPMDependenciesWithoutVersionIfNeeded as addNPMDependenciesWithoutVersionIfNeeded,
250
239
  dependency_addLatestNPMDependencies as addLatestNPMDependencies,
240
+ dependency_ProjectType as ProjectType,
241
+ dependency_getProjectType as getProjectType,
251
242
  };
252
243
  }
253
244
 
@@ -1017,6 +1008,39 @@ interface AppFunctionSetVariables {
1017
1008
  };
1018
1009
  inputQuery?: string;
1019
1010
  apiVersion?: string;
1011
+ skipCompilationJob: boolean;
1012
+ }
1013
+
1014
+ declare const CompileModuleMutation: string;
1015
+ interface CompileModuleMutationSchema {
1016
+ data: {
1017
+ compileModule: {
1018
+ jobId: string;
1019
+ userErrors: {
1020
+ field: string;
1021
+ message: string;
1022
+ }[];
1023
+ };
1024
+ };
1025
+ }
1026
+ interface CompileModuleMutationVariables {
1027
+ moduleUploadUrl: string;
1028
+ }
1029
+
1030
+ declare const ModuleCompilationStatusQuery: string;
1031
+ interface ModuleCompilationStatusQuerySchema {
1032
+ data: {
1033
+ moduleCompilationStatus: {
1034
+ status: string;
1035
+ userErrors: {
1036
+ field: string;
1037
+ message: string;
1038
+ }[];
1039
+ };
1040
+ };
1041
+ }
1042
+ interface ModuleCompilationQueryVariables {
1043
+ jobId: string;
1020
1044
  }
1021
1045
 
1022
1046
  declare const FindOrganizationBasicQuery: string;
@@ -1080,6 +1104,12 @@ type index_ModuleUploadUrlGenerateMutationSchema = ModuleUploadUrlGenerateMutati
1080
1104
  declare const index_AppFunctionSetMutation: typeof AppFunctionSetMutation;
1081
1105
  type index_AppFunctionSetMutationSchema = AppFunctionSetMutationSchema;
1082
1106
  type index_AppFunctionSetVariables = AppFunctionSetVariables;
1107
+ declare const index_CompileModuleMutation: typeof CompileModuleMutation;
1108
+ type index_CompileModuleMutationSchema = CompileModuleMutationSchema;
1109
+ type index_CompileModuleMutationVariables = CompileModuleMutationVariables;
1110
+ declare const index_ModuleCompilationStatusQuery: typeof ModuleCompilationStatusQuery;
1111
+ type index_ModuleCompilationStatusQuerySchema = ModuleCompilationStatusQuerySchema;
1112
+ type index_ModuleCompilationQueryVariables = ModuleCompilationQueryVariables;
1083
1113
  declare const index_FindOrganizationBasicQuery: typeof FindOrganizationBasicQuery;
1084
1114
  type index_FindOrganizationBasicQuerySchema = FindOrganizationBasicQuerySchema;
1085
1115
  declare namespace index {
@@ -1133,6 +1163,12 @@ declare namespace index {
1133
1163
  index_AppFunctionSetMutation as AppFunctionSetMutation,
1134
1164
  index_AppFunctionSetMutationSchema as AppFunctionSetMutationSchema,
1135
1165
  index_AppFunctionSetVariables as AppFunctionSetVariables,
1166
+ index_CompileModuleMutation as CompileModuleMutation,
1167
+ index_CompileModuleMutationSchema as CompileModuleMutationSchema,
1168
+ index_CompileModuleMutationVariables as CompileModuleMutationVariables,
1169
+ index_ModuleCompilationStatusQuery as ModuleCompilationStatusQuery,
1170
+ index_ModuleCompilationStatusQuerySchema as ModuleCompilationStatusQuerySchema,
1171
+ index_ModuleCompilationQueryVariables as ModuleCompilationQueryVariables,
1136
1172
  index_FindOrganizationBasicQuery as FindOrganizationBasicQuery,
1137
1173
  index_FindOrganizationBasicQuerySchema as FindOrganizationBasicQuerySchema,
1138
1174
  };
@@ -1147,15 +1183,6 @@ declare namespace api {
1147
1183
  };
1148
1184
  }
1149
1185
 
1150
- declare function zip(inputDirectory: string, outputZipPath: string): Promise<void>;
1151
-
1152
- declare const archiver_zip: typeof zip;
1153
- declare namespace archiver {
1154
- export {
1155
- archiver_zip as zip,
1156
- };
1157
- }
1158
-
1159
1186
  declare const InvalidChecksumError: ({ file, expected, got }: {
1160
1187
  file: string;
1161
1188
  expected: string;
@@ -1428,6 +1455,7 @@ declare function readSync(path: string, options?: object): string;
1428
1455
  */
1429
1456
  declare function copy(from: string, to: string): Promise<void>;
1430
1457
  declare function touch(path: string): Promise<void>;
1458
+ declare function touchSync(path: string): Promise<void>;
1431
1459
  declare function write(path: string, data: string): Promise<void>;
1432
1460
  declare function writeSync(path: string, data: string): void;
1433
1461
  declare function append(path: string, data: string): Promise<void>;
@@ -1480,6 +1508,7 @@ declare const file_read: typeof read;
1480
1508
  declare const file_readSync: typeof readSync;
1481
1509
  declare const file_copy: typeof copy;
1482
1510
  declare const file_touch: typeof touch;
1511
+ declare const file_touchSync: typeof touchSync;
1483
1512
  declare const file_write: typeof write;
1484
1513
  declare const file_writeSync: typeof writeSync;
1485
1514
  declare const file_append: typeof append;
@@ -1503,6 +1532,7 @@ declare namespace file {
1503
1532
  file_readSync as readSync,
1504
1533
  file_copy as copy,
1505
1534
  file_touch as touch,
1535
+ file_touchSync as touchSync,
1506
1536
  file_write as write,
1507
1537
  file_writeSync as writeSync,
1508
1538
  file_append as append,
@@ -1725,14 +1755,35 @@ declare function relativize(path: string): string;
1725
1755
  */
1726
1756
  declare function moduleDirectory(moduleURL: string): string;
1727
1757
 
1728
- var path = /*#__PURE__*/_mergeNamespaces({
1729
- __proto__: null,
1730
- relativize: relativize,
1731
- moduleDirectory: moduleDirectory,
1732
- findUp: findUp,
1733
- glob: fastGlob,
1734
- pathToFileURL: pathToFileURL
1735
- }, [pathe]);
1758
+ declare const path_join: typeof join;
1759
+ declare const path_relative: typeof relative;
1760
+ declare const path_dirname: typeof dirname;
1761
+ declare const path_normalize: typeof normalize;
1762
+ declare const path_resolve: typeof resolve;
1763
+ declare const path_basename: typeof basename;
1764
+ declare const path_extname: typeof extname;
1765
+ declare const path_isAbsolute: typeof isAbsolute;
1766
+ declare const path_relativize: typeof relativize;
1767
+ declare const path_moduleDirectory: typeof moduleDirectory;
1768
+ declare const path_findUp: typeof findUp;
1769
+ declare const path_pathToFileURL: typeof pathToFileURL;
1770
+ declare namespace path {
1771
+ export {
1772
+ path_join as join,
1773
+ path_relative as relative,
1774
+ path_dirname as dirname,
1775
+ path_normalize as normalize,
1776
+ path_resolve as resolve,
1777
+ path_basename as basename,
1778
+ path_extname as extname,
1779
+ path_isAbsolute as isAbsolute,
1780
+ path_relativize as relativize,
1781
+ path_moduleDirectory as moduleDirectory,
1782
+ path_findUp as findUp,
1783
+ fastGlob as glob,
1784
+ path_pathToFileURL as pathToFileURL,
1785
+ };
1786
+ }
1736
1787
 
1737
1788
  interface TunnelPlugin {
1738
1789
  start: (options: TunnelStartOptions) => Promise<string>;
@@ -1814,39 +1865,52 @@ interface CachedAppInfo {
1814
1865
  interface ConfSchema {
1815
1866
  appInfo: CachedAppInfo[];
1816
1867
  themeStore: string;
1868
+ session: string;
1817
1869
  }
1818
- declare const cliKit: Conf<ConfSchema>;
1870
+ declare type LocalStore = Conf<ConfSchema>;
1871
+ declare function createConf(projectName?: string): LocalStore;
1819
1872
  declare function remove(): void;
1820
- declare function getAppInfo(directory: string): CachedAppInfo | undefined;
1873
+ declare function getAppInfo(directory: string, localConf?: LocalStore): CachedAppInfo | undefined;
1821
1874
  declare function setAppInfo(options: {
1822
1875
  directory: string;
1823
1876
  appId: string;
1824
1877
  title?: string;
1825
1878
  storeFqdn?: string;
1826
1879
  orgId?: string;
1827
- }): void;
1828
- declare function clearAppInfo(directory: string): void;
1829
- declare function getThemeStore(): string | undefined;
1830
- declare function setThemeStore(store: string): void;
1880
+ }, localConf?: LocalStore): void;
1881
+ declare function clearAppInfo(directory: string, localConf?: LocalStore): void;
1882
+ declare function getTheme(localConf?: LocalStore): string | undefined;
1883
+ declare function setTheme(store: string, localConf?: LocalStore): void;
1884
+ declare function getSession(localConf?: LocalStore): string | undefined;
1885
+ declare function setSession(store: string, localConf?: LocalStore): void;
1886
+ declare function removeSession(localConf?: LocalStore): void;
1831
1887
 
1832
1888
  type store_CachedAppInfo = CachedAppInfo;
1833
- declare const store_cliKit: typeof cliKit;
1889
+ type store_LocalStore = LocalStore;
1890
+ declare const store_createConf: typeof createConf;
1834
1891
  declare const store_remove: typeof remove;
1835
1892
  declare const store_getAppInfo: typeof getAppInfo;
1836
1893
  declare const store_setAppInfo: typeof setAppInfo;
1837
1894
  declare const store_clearAppInfo: typeof clearAppInfo;
1838
- declare const store_getThemeStore: typeof getThemeStore;
1839
- declare const store_setThemeStore: typeof setThemeStore;
1895
+ declare const store_getTheme: typeof getTheme;
1896
+ declare const store_setTheme: typeof setTheme;
1897
+ declare const store_getSession: typeof getSession;
1898
+ declare const store_setSession: typeof setSession;
1899
+ declare const store_removeSession: typeof removeSession;
1840
1900
  declare namespace store {
1841
1901
  export {
1842
1902
  store_CachedAppInfo as CachedAppInfo,
1843
- store_cliKit as cliKit,
1903
+ store_LocalStore as LocalStore,
1904
+ store_createConf as createConf,
1844
1905
  store_remove as remove,
1845
1906
  store_getAppInfo as getAppInfo,
1846
1907
  store_setAppInfo as setAppInfo,
1847
1908
  store_clearAppInfo as clearAppInfo,
1848
- store_getThemeStore as getThemeStore,
1849
- store_setThemeStore as setThemeStore,
1909
+ store_getTheme as getTheme,
1910
+ store_setTheme as setTheme,
1911
+ store_getSession as getSession,
1912
+ store_setSession as setSession,
1913
+ store_removeSession as removeSession,
1850
1914
  };
1851
1915
  }
1852
1916
 
@@ -2111,5 +2175,5 @@ declare namespace yaml {
2111
2175
  };
2112
2176
  }
2113
2177
 
2114
- export { abort, analytics, api, archiver, checksum, cli, constants, dependency, dotEnv as dotenv, environment, error, file, git, github, haiku, http, id, npm, os, output, path, plugins, port, ruby, schema, semver, session, store, string, system, template, temporary, toml, ui, version, vscode, yaml };
2178
+ export { abort, analytics, api, checksum, cli, constants, dependency, dotEnv as dotenv, environment, error, file, git, github, haiku, http, id, npm, os, output, path, plugins, port, ruby, schema, semver, session, store, string, system, template, temporary, toml, ui, version, vscode, yaml };
2115
2179
  //# sourceMappingURL=index.d.ts.map