@shopify/cli-kit 3.0.23 → 3.0.26
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 +28 -0
- package/assets/auth-error.html +2 -4
- package/assets/empty-url.html +2 -4
- package/assets/missing-code.html +2 -4
- package/assets/missing-state.html +2 -4
- package/assets/style.css +5 -8
- package/assets/success.html +1 -1
- package/dist/abort.d.ts +1 -0
- package/dist/abort.js +2 -0
- package/dist/abort.js.map +1 -0
- package/dist/analytics.d.ts +11 -0
- package/dist/analytics.js +96 -0
- package/dist/analytics.js.map +1 -0
- package/dist/api/admin.d.ts +3 -0
- package/dist/api/admin.js +80 -0
- package/dist/api/admin.js.map +1 -0
- package/dist/api/common.d.ts +11 -0
- package/dist/api/common.js +40 -0
- package/dist/api/common.js.map +1 -0
- package/dist/api/graphql/all_app_extension_registrations.d.ts +14 -0
- package/dist/api/graphql/all_app_extension_registrations.js +14 -0
- package/dist/api/graphql/all_app_extension_registrations.js.map +1 -0
- package/dist/api/graphql/all_orgs.d.ts +12 -0
- package/dist/api/graphql/all_orgs.js +14 -0
- package/dist/api/graphql/all_orgs.js.map +1 -0
- package/dist/api/graphql/all_stores_by_org.d.ts +18 -0
- package/dist/api/graphql/all_stores_by_org.js +21 -0
- package/dist/api/graphql/all_stores_by_org.js.map +1 -0
- package/dist/api/graphql/convert_dev_to_test_store.d.ts +16 -0
- package/dist/api/graphql/convert_dev_to_test_store.js +13 -0
- package/dist/api/graphql/convert_dev_to_test_store.js.map +1 -0
- package/dist/api/graphql/create_app.d.ts +28 -0
- package/dist/api/graphql/create_app.js +32 -0
- package/dist/api/graphql/create_app.js.map +1 -0
- package/dist/api/graphql/create_deployment.d.ts +33 -0
- package/dist/api/graphql/create_deployment.js +25 -0
- package/dist/api/graphql/create_deployment.js.map +1 -0
- package/dist/api/graphql/extension_create.d.ts +30 -0
- package/dist/api/graphql/extension_create.js +26 -0
- package/dist/api/graphql/extension_create.js.map +1 -0
- package/dist/api/graphql/extension_specifications.d.ts +18 -0
- package/dist/api/graphql/extension_specifications.js +18 -0
- package/dist/api/graphql/extension_specifications.js.map +1 -0
- package/dist/api/graphql/find_app.d.ts +13 -0
- package/dist/api/graphql/find_app.js +16 -0
- package/dist/api/graphql/find_app.js.map +1 -0
- package/dist/api/graphql/find_org.d.ts +23 -0
- package/dist/api/graphql/find_org.js +26 -0
- package/dist/api/graphql/find_org.js.map +1 -0
- package/dist/api/graphql/find_org_basic.d.ts +11 -0
- package/dist/api/graphql/find_org_basic.js +14 -0
- package/dist/api/graphql/find_org_basic.js.map +1 -0
- package/dist/api/graphql/functions/app_function_set.d.ts +43 -0
- package/dist/api/graphql/functions/app_function_set.js +52 -0
- package/dist/api/graphql/functions/app_function_set.js.map +1 -0
- package/dist/api/graphql/functions/compile_module.d.ts +15 -0
- package/dist/api/graphql/functions/compile_module.js +13 -0
- package/dist/api/graphql/functions/compile_module.js.map +1 -0
- package/dist/api/graphql/functions/function_service_proxy.d.ts +4 -0
- package/dist/api/graphql/functions/function_service_proxy.js +7 -0
- package/dist/api/graphql/functions/function_service_proxy.js.map +1 -0
- package/dist/api/graphql/functions/get_app_functions.d.ts +1 -0
- package/dist/api/graphql/functions/get_app_functions.js +10 -0
- package/dist/api/graphql/functions/get_app_functions.js.map +1 -0
- package/dist/api/graphql/functions/module_compilation_status.d.ts +15 -0
- package/dist/api/graphql/functions/module_compilation_status.js +13 -0
- package/dist/api/graphql/functions/module_compilation_status.js.map +1 -0
- package/dist/api/graphql/functions/module_upload_url_generate.d.ts +18 -0
- package/dist/api/graphql/functions/module_upload_url_generate.js +17 -0
- package/dist/api/graphql/functions/module_upload_url_generate.js.map +1 -0
- package/dist/api/graphql/generate_signed_upload_url.d.ts +15 -0
- package/dist/api/graphql/generate_signed_upload_url.js +15 -0
- package/dist/api/graphql/generate_signed_upload_url.js.map +1 -0
- package/dist/api/graphql/get_variant_id.d.ts +17 -0
- package/dist/api/graphql/get_variant_id.js +20 -0
- package/dist/api/graphql/get_variant_id.js.map +1 -0
- package/dist/api/graphql/index.d.ts +21 -0
- package/dist/api/graphql/index.js +22 -0
- package/dist/api/graphql/index.js.map +1 -0
- package/dist/api/graphql/update_draft.d.ts +33 -0
- package/dist/api/graphql/update_draft.js +24 -0
- package/dist/api/graphql/update_draft.js.map +1 -0
- package/dist/api/graphql/update_urls.d.ts +14 -0
- package/dist/api/graphql/update_urls.js +12 -0
- package/dist/api/graphql/update_urls.js.map +1 -0
- package/dist/api/identity.d.ts +1 -0
- package/dist/api/identity.js +29 -0
- package/dist/api/identity.js.map +1 -0
- package/dist/api/partners.d.ts +25 -0
- package/dist/api/partners.js +100 -0
- package/dist/api/partners.js.map +1 -0
- package/dist/api.d.ts +5 -0
- package/dist/api.js +6 -0
- package/dist/api.js.map +1 -0
- package/dist/checksum.d.ts +15 -0
- package/dist/checksum.js +27 -0
- package/dist/checksum.js.map +1 -0
- package/dist/cli.d.ts +7 -0
- package/dist/cli.js +13 -0
- package/dist/cli.js.map +1 -0
- package/dist/colors.d.ts +1 -0
- package/dist/colors.js +8 -0
- package/dist/colors.js.map +1 -0
- package/dist/constants.d.ts +43 -0
- package/dist/constants.js +63 -0
- package/dist/constants.js.map +1 -0
- package/dist/dependency.d.ts +128 -0
- package/dist/dependency.js +302 -0
- package/dist/dependency.js.map +1 -0
- package/dist/dot-env.d.ts +28 -0
- package/dist/dot-env.js +31 -0
- package/dist/dot-env.js.map +1 -0
- package/dist/environment/fqdn.d.ts +23 -0
- package/dist/environment/fqdn.js +61 -0
- package/dist/environment/fqdn.js.map +1 -0
- package/dist/environment/local.d.ts +48 -0
- package/dist/environment/local.js +82 -0
- package/dist/environment/local.js.map +1 -0
- package/dist/environment/service.d.ts +17 -0
- package/dist/environment/service.js +41 -0
- package/dist/environment/service.js.map +1 -0
- package/dist/environment/spin.d.ts +47 -0
- package/dist/environment/spin.js +83 -0
- package/dist/environment/spin.js.map +1 -0
- package/dist/environment/utilities.d.ts +6 -0
- package/dist/environment/utilities.js +12 -0
- package/dist/environment/utilities.js.map +1 -0
- package/dist/environment.d.ts +5 -0
- package/dist/environment.js +6 -0
- package/dist/environment.js.map +1 -0
- package/dist/error.d.ts +44 -0
- package/dist/error.js +91 -0
- package/dist/error.js.map +1 -0
- package/dist/file.d.ts +67 -0
- package/dist/file.js +165 -0
- package/dist/file.js.map +1 -0
- package/dist/git.d.ts +15 -0
- package/dist/git.js +48 -0
- package/dist/git.js.map +1 -0
- package/dist/github.d.ts +33 -0
- package/dist/github.js +56 -0
- package/dist/github.js.map +1 -0
- package/dist/haiku.d.ts +1 -0
- package/dist/haiku.js +8 -0
- package/dist/haiku.js.map +1 -0
- package/dist/http/fetch.d.ts +16 -0
- package/dist/http/fetch.js +18 -0
- package/dist/http/fetch.js.map +1 -0
- package/dist/http/formdata.d.ts +3 -0
- package/dist/http/formdata.js +6 -0
- package/dist/http/formdata.js.map +1 -0
- package/dist/http.d.ts +2 -0
- package/dist/http.js +3 -0
- package/dist/http.js.map +1 -0
- package/dist/id.d.ts +6 -0
- package/dist/id.js +18 -0
- package/dist/id.js.map +1 -0
- package/dist/index.d.ts +37 -2115
- package/dist/index.js +38 -46
- package/dist/index.js.map +1 -1
- package/dist/network/api.d.ts +2 -0
- package/dist/network/api.js +2 -0
- package/dist/network/api.js.map +1 -0
- package/dist/network/service.d.ts +16 -0
- package/dist/network/service.js +12 -0
- package/dist/network/service.js.map +1 -0
- package/dist/node/archiver.d.ts +6 -0
- package/dist/node/archiver.js +24 -0
- package/dist/node/archiver.js.map +1 -0
- package/dist/node/cli.d.ts +18 -0
- package/dist/node/cli.js +91 -0
- package/dist/node/cli.js.map +1 -0
- package/dist/npm.d.ts +27 -0
- package/dist/npm.js +20 -0
- package/dist/npm.js.map +1 -0
- package/dist/os.d.ts +10 -0
- package/dist/os.js +70 -0
- package/dist/os.js.map +1 -0
- package/dist/output.d.ts +142 -0
- package/dist/output.js +505 -0
- package/dist/output.js.map +1 -0
- package/dist/path.d.ts +22 -0
- package/dist/path.js +43 -0
- package/dist/path.js.map +1 -0
- package/dist/plugins.d.ts +9 -0
- package/dist/plugins.js +12 -0
- package/dist/plugins.js.map +1 -0
- package/dist/port.d.ts +5 -0
- package/dist/port.js +13 -0
- package/dist/port.js.map +1 -0
- package/dist/ruby.d.ts +21 -0
- package/dist/ruby.js +192 -0
- package/dist/ruby.js.map +1 -0
- package/dist/schema.d.ts +1 -0
- package/dist/schema.js +2 -0
- package/dist/schema.js.map +1 -0
- package/dist/secure-store.d.ts +19 -0
- package/dist/secure-store.js +63 -0
- package/dist/secure-store.js.map +1 -0
- package/dist/semver.d.ts +3 -0
- package/dist/semver.js +6 -0
- package/dist/semver.js.map +1 -0
- package/dist/session/authorize.d.ts +7 -0
- package/dist/session/authorize.js +40 -0
- package/dist/session/authorize.js.map +1 -0
- package/dist/session/exchange.d.ts +42 -0
- package/dist/session/exchange.js +144 -0
- package/dist/session/exchange.js.map +1 -0
- package/dist/session/identity.d.ts +3 -0
- package/dist/session/identity.js +58 -0
- package/dist/session/identity.js.map +1 -0
- package/dist/session/post-auth.d.ts +13 -0
- package/dist/session/post-auth.js +56 -0
- package/dist/session/post-auth.js.map +1 -0
- package/dist/session/redirect-listener.d.ts +34 -0
- package/dist/session/redirect-listener.js +97 -0
- package/dist/session/redirect-listener.js.map +1 -0
- package/dist/session/schema.d.ts +174 -0
- package/dist/session/schema.js +59 -0
- package/dist/session/schema.js.map +1 -0
- package/dist/session/scopes.d.ts +16 -0
- package/dist/session/scopes.js +53 -0
- package/dist/session/scopes.js.map +1 -0
- package/dist/session/store.d.ts +24 -0
- package/dist/session/store.js +88 -0
- package/dist/session/store.js.map +1 -0
- package/dist/session/token.d.ts +40 -0
- package/dist/session/token.js +22 -0
- package/dist/session/token.js.map +1 -0
- package/dist/session/validate.d.ts +17 -0
- package/dist/session/validate.js +75 -0
- package/dist/session/validate.js.map +1 -0
- package/dist/session.d.ts +88 -0
- package/dist/session.js +251 -0
- package/dist/session.js.map +1 -0
- package/dist/store/schema.d.ts +3 -0
- package/dist/store/schema.js +27 -0
- package/dist/store/schema.js.map +1 -0
- package/dist/store.d.ts +32 -0
- package/dist/store.js +102 -0
- package/dist/store.js.map +1 -0
- package/dist/string.d.ts +22 -0
- package/dist/string.js +38 -0
- package/dist/string.js.map +1 -0
- package/dist/system.d.ts +53 -0
- package/dist/system.js +109 -0
- package/dist/system.js.map +1 -0
- package/dist/template.d.ts +11 -0
- package/dist/template.js +50 -0
- package/dist/template.js.map +1 -0
- package/dist/testing/output.d.ts +9 -0
- package/dist/testing/output.js +15 -0
- package/dist/testing/output.js.map +1 -0
- package/dist/testing/store.d.ts +7 -0
- package/dist/testing/store.js +26 -0
- package/dist/testing/store.js.map +1 -0
- package/dist/toml.d.ts +3 -0
- package/dist/toml.js +8 -0
- package/dist/toml.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/ui/autocomplete.d.ts +7 -0
- package/dist/ui/autocomplete.js +43 -0
- package/dist/ui/autocomplete.js.map +1 -0
- package/dist/ui/input.d.ts +7 -0
- package/dist/ui/input.js +48 -0
- package/dist/ui/input.js.map +1 -0
- package/dist/ui/select.d.ts +6 -0
- package/dist/ui/select.js +30 -0
- package/dist/ui/select.js.map +1 -0
- package/dist/ui.d.ts +36 -0
- package/dist/ui.js +124 -0
- package/dist/ui.js.map +1 -0
- package/dist/version.d.ts +19 -0
- package/dist/version.js +34 -0
- package/dist/version.js.map +1 -0
- package/dist/vscode.d.ts +8 -0
- package/dist/vscode.js +36 -0
- package/dist/vscode.js.map +1 -0
- package/dist/yaml.d.ts +2 -0
- package/dist/yaml.js +8 -0
- package/dist/yaml.js.map +1 -0
- package/package.json +32 -21
- package/dist/index-160b2bd2.js +0 -175294
- package/dist/index-160b2bd2.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/multipart-parser-7ce1f707.js +0 -477
- package/dist/multipart-parser-7ce1f707.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,2115 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
declare const constants: {
|
|
41
|
-
environmentVariables: {
|
|
42
|
-
unitTest: string;
|
|
43
|
-
shopifyConfig: string;
|
|
44
|
-
runAsUser: string;
|
|
45
|
-
partnersEnv: string;
|
|
46
|
-
shopifyEnv: string;
|
|
47
|
-
identityEnv: string;
|
|
48
|
-
spin: string;
|
|
49
|
-
spinInstance: string;
|
|
50
|
-
spinWorkspace: string;
|
|
51
|
-
spinNamespace: string;
|
|
52
|
-
spinHost: string;
|
|
53
|
-
partnersToken: string;
|
|
54
|
-
verbose: string;
|
|
55
|
-
noAnalytics: string;
|
|
56
|
-
};
|
|
57
|
-
paths: {
|
|
58
|
-
executables: {
|
|
59
|
-
dev: string;
|
|
60
|
-
};
|
|
61
|
-
directories: {
|
|
62
|
-
cache: {
|
|
63
|
-
path: () => string;
|
|
64
|
-
vendor: {
|
|
65
|
-
path: () => string;
|
|
66
|
-
binaries: () => string;
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
/**
|
|
72
|
-
* Versions are resolved at build time by Rollup's JSON plugin.
|
|
73
|
-
*/
|
|
74
|
-
versions: {
|
|
75
|
-
cliKit: string;
|
|
76
|
-
};
|
|
77
|
-
keychain: {
|
|
78
|
-
service: string;
|
|
79
|
-
};
|
|
80
|
-
session: {
|
|
81
|
-
expirationTimeMarginInMinutes: number;
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
declare namespace abort {
|
|
86
|
-
export {
|
|
87
|
-
AbortController as Controller,
|
|
88
|
-
AbortSignal as Signal,
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
declare const url = "https://monorail-edge.shopifysvc.com/v1/produce";
|
|
93
|
-
declare const reportEvent: (command: string, args: string[]) => Promise<void>;
|
|
94
|
-
|
|
95
|
-
declare const analytics_url: typeof url;
|
|
96
|
-
declare const analytics_reportEvent: typeof reportEvent;
|
|
97
|
-
declare namespace analytics {
|
|
98
|
-
export {
|
|
99
|
-
analytics_url as url,
|
|
100
|
-
analytics_reportEvent as reportEvent,
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
declare const genericConfigurationFileNames: {
|
|
105
|
-
readonly yarn: {
|
|
106
|
-
readonly lockfile: "yarn.lock";
|
|
107
|
-
};
|
|
108
|
-
readonly pnpm: {
|
|
109
|
-
readonly lockfile: "pnpm-lock.yaml";
|
|
110
|
-
};
|
|
111
|
-
};
|
|
112
|
-
declare const dependencyManager: readonly ["yarn", "npm", "pnpm"];
|
|
113
|
-
declare type DependencyManager = typeof dependencyManager[number];
|
|
114
|
-
declare const PackageJsonNotFoundError: (directory: string) => Abort;
|
|
115
|
-
/**
|
|
116
|
-
* Returns the dependency manager used to run the create workflow.
|
|
117
|
-
* @param env {Object} The environment variables of the process in which the CLI runs.
|
|
118
|
-
* @returns The dependency manager
|
|
119
|
-
*/
|
|
120
|
-
declare function dependencyManagerUsedForCreating(env?: NodeJS.ProcessEnv): DependencyManager;
|
|
121
|
-
/**
|
|
122
|
-
* Returns the dependency manager used by an existing project.
|
|
123
|
-
* @param directory {string} The root directory of the project.
|
|
124
|
-
* @returns The dependency manager
|
|
125
|
-
*/
|
|
126
|
-
declare function getDependencyManager(directory: string): Promise<DependencyManager>;
|
|
127
|
-
interface InstallNPMDependenciesRecursivelyOptions {
|
|
128
|
-
/**
|
|
129
|
-
* The dependency manager to use to install the dependencies.
|
|
130
|
-
*/
|
|
131
|
-
dependencyManager: DependencyManager;
|
|
132
|
-
/**
|
|
133
|
-
* The directory from where we'll find package.json's recursively
|
|
134
|
-
*/
|
|
135
|
-
directory: string;
|
|
136
|
-
/**
|
|
137
|
-
* Specifies the maximum depth of the glob search.
|
|
138
|
-
*/
|
|
139
|
-
deep?: number;
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* This function traverses down a directory tree to find directories containing a package.json
|
|
143
|
-
* and installs the dependencies if needed. To know if it's needed, it uses the "check" command
|
|
144
|
-
* provided by dependency managers.
|
|
145
|
-
* @param options {InstallNPMDependenciesRecursivelyOptions} Options to install dependencies recursively.
|
|
146
|
-
*/
|
|
147
|
-
declare function installNPMDependenciesRecursively(options: InstallNPMDependenciesRecursivelyOptions): Promise<void>;
|
|
148
|
-
/**
|
|
149
|
-
* Installs the dependencies in the given directory.
|
|
150
|
-
* @param directory {string} The directory that contains the package.json
|
|
151
|
-
* @param dependencyManager {DependencyManager} The dependency manager to use to install the dependencies.
|
|
152
|
-
* @param stdout {Writable} Standard output stream.
|
|
153
|
-
* @param stderr {Writable} Standard error stream.
|
|
154
|
-
* @param signal {AbortSignal} Abort signal.
|
|
155
|
-
* @returns stderr {Writable} Standard error stream.
|
|
156
|
-
*/
|
|
157
|
-
declare function install(directory: string, dependencyManager: DependencyManager, stdout?: Writable, stderr?: Writable, signal?: AbortSignal): Promise<void>;
|
|
158
|
-
/**
|
|
159
|
-
* Returns the name of the package configured in its package.json
|
|
160
|
-
* @param packageJsonPath {string} Path to the package.json file
|
|
161
|
-
* @returns A promise that resolves with the name.
|
|
162
|
-
*/
|
|
163
|
-
declare function getPackageName(packageJsonPath: string): Promise<string>;
|
|
164
|
-
/**
|
|
165
|
-
* Returns the list of production and dev dependencies of a package.json
|
|
166
|
-
* @param packageJsonPath {string} Path to the package.json file
|
|
167
|
-
* @returns A promise that resolves with the list of dependencies.
|
|
168
|
-
*/
|
|
169
|
-
declare function getDependencies(packageJsonPath: string): Promise<{
|
|
170
|
-
[key: string]: string;
|
|
171
|
-
}>;
|
|
172
|
-
declare function checkForNewVersion(dependency: string, currentVersion: string): Promise<string | undefined>;
|
|
173
|
-
declare function getOutputUpdateCLIReminder(dependencyManager: DependencyManager, version: string): string;
|
|
174
|
-
interface PackageJSONContents {
|
|
175
|
-
name: string;
|
|
176
|
-
version?: string;
|
|
177
|
-
dependencies?: {
|
|
178
|
-
[key: string]: string;
|
|
179
|
-
};
|
|
180
|
-
devDependencies?: {
|
|
181
|
-
[key: string]: string;
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
|
-
declare function packageJSONContents(packageJsonPath: string): Promise<PackageJSONContents>;
|
|
185
|
-
declare type DependencyType = 'dev' | 'prod' | 'peer';
|
|
186
|
-
interface AddNPMDependenciesIfNeededOptions {
|
|
187
|
-
/** How dependencies should be added */
|
|
188
|
-
type: DependencyType;
|
|
189
|
-
/** The dependency manager to use to add dependencies */
|
|
190
|
-
dependencyManager: DependencyManager;
|
|
191
|
-
/** The directory that contains the package.json where dependencies will be added */
|
|
192
|
-
directory: string;
|
|
193
|
-
/** Standard output coming from the underlying installation process */
|
|
194
|
-
stdout?: Writable;
|
|
195
|
-
/** Standard error coming from the underlying installation process */
|
|
196
|
-
stderr?: Writable;
|
|
197
|
-
/** Abort signal to stop the process */
|
|
198
|
-
signal?: AbortSignal;
|
|
199
|
-
}
|
|
200
|
-
interface DependencyVersion {
|
|
201
|
-
name: string;
|
|
202
|
-
version: string | undefined;
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* Adds dependencies to a Node project (i.e. a project that has a package.json)
|
|
206
|
-
* @param dependencies {string[]} List of dependencies to be added.
|
|
207
|
-
* @param options {AddNPMDependenciesIfNeededOptions} Options for adding dependencies.
|
|
208
|
-
*/
|
|
209
|
-
declare function addNPMDependenciesIfNeeded(dependencies: DependencyVersion[], options: AddNPMDependenciesIfNeededOptions): Promise<void>;
|
|
210
|
-
declare function addNPMDependenciesWithoutVersionIfNeeded(dependencies: string[], options: AddNPMDependenciesIfNeededOptions): Promise<void>;
|
|
211
|
-
declare function addLatestNPMDependencies(dependencies: string[], options: AddNPMDependenciesIfNeededOptions): Promise<void>;
|
|
212
|
-
|
|
213
|
-
declare const dependency_genericConfigurationFileNames: typeof genericConfigurationFileNames;
|
|
214
|
-
declare const dependency_dependencyManager: typeof dependencyManager;
|
|
215
|
-
type dependency_DependencyManager = DependencyManager;
|
|
216
|
-
declare const dependency_PackageJsonNotFoundError: typeof PackageJsonNotFoundError;
|
|
217
|
-
declare const dependency_dependencyManagerUsedForCreating: typeof dependencyManagerUsedForCreating;
|
|
218
|
-
declare const dependency_getDependencyManager: typeof getDependencyManager;
|
|
219
|
-
declare const dependency_installNPMDependenciesRecursively: typeof installNPMDependenciesRecursively;
|
|
220
|
-
declare const dependency_install: typeof install;
|
|
221
|
-
declare const dependency_getPackageName: typeof getPackageName;
|
|
222
|
-
declare const dependency_getDependencies: typeof getDependencies;
|
|
223
|
-
declare const dependency_checkForNewVersion: typeof checkForNewVersion;
|
|
224
|
-
declare const dependency_getOutputUpdateCLIReminder: typeof getOutputUpdateCLIReminder;
|
|
225
|
-
declare const dependency_packageJSONContents: typeof packageJSONContents;
|
|
226
|
-
type dependency_DependencyType = DependencyType;
|
|
227
|
-
type dependency_DependencyVersion = DependencyVersion;
|
|
228
|
-
declare const dependency_addNPMDependenciesIfNeeded: typeof addNPMDependenciesIfNeeded;
|
|
229
|
-
declare const dependency_addNPMDependenciesWithoutVersionIfNeeded: typeof addNPMDependenciesWithoutVersionIfNeeded;
|
|
230
|
-
declare const dependency_addLatestNPMDependencies: typeof addLatestNPMDependencies;
|
|
231
|
-
declare namespace dependency {
|
|
232
|
-
export {
|
|
233
|
-
dependency_genericConfigurationFileNames as genericConfigurationFileNames,
|
|
234
|
-
dependency_dependencyManager as dependencyManager,
|
|
235
|
-
dependency_DependencyManager as DependencyManager,
|
|
236
|
-
dependency_PackageJsonNotFoundError as PackageJsonNotFoundError,
|
|
237
|
-
dependency_dependencyManagerUsedForCreating as dependencyManagerUsedForCreating,
|
|
238
|
-
dependency_getDependencyManager as getDependencyManager,
|
|
239
|
-
dependency_installNPMDependenciesRecursively as installNPMDependenciesRecursively,
|
|
240
|
-
dependency_install as install,
|
|
241
|
-
dependency_getPackageName as getPackageName,
|
|
242
|
-
dependency_getDependencies as getDependencies,
|
|
243
|
-
dependency_checkForNewVersion as checkForNewVersion,
|
|
244
|
-
dependency_getOutputUpdateCLIReminder as getOutputUpdateCLIReminder,
|
|
245
|
-
dependency_packageJSONContents as packageJSONContents,
|
|
246
|
-
dependency_DependencyType as DependencyType,
|
|
247
|
-
dependency_DependencyVersion as DependencyVersion,
|
|
248
|
-
dependency_addNPMDependenciesIfNeeded as addNPMDependenciesIfNeeded,
|
|
249
|
-
dependency_addNPMDependenciesWithoutVersionIfNeeded as addNPMDependenciesWithoutVersionIfNeeded,
|
|
250
|
-
dependency_addLatestNPMDependencies as addLatestNPMDependencies,
|
|
251
|
-
};
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
declare function initiateLogging({ logDir, filename, }: {
|
|
255
|
-
logDir?: string;
|
|
256
|
-
filename?: string;
|
|
257
|
-
}): void;
|
|
258
|
-
declare enum ContentTokenType {
|
|
259
|
-
Raw = 0,
|
|
260
|
-
Command = 1,
|
|
261
|
-
Json = 2,
|
|
262
|
-
Path = 3,
|
|
263
|
-
Link = 4,
|
|
264
|
-
Heading = 5,
|
|
265
|
-
SubHeading = 6,
|
|
266
|
-
Italic = 7,
|
|
267
|
-
ErrorText = 8,
|
|
268
|
-
Yellow = 9,
|
|
269
|
-
Cyan = 10,
|
|
270
|
-
Magenta = 11,
|
|
271
|
-
Green = 12
|
|
272
|
-
}
|
|
273
|
-
interface ContentMetadata {
|
|
274
|
-
link?: string;
|
|
275
|
-
}
|
|
276
|
-
declare class ContentToken {
|
|
277
|
-
type: ContentTokenType;
|
|
278
|
-
value: Message;
|
|
279
|
-
metadata: ContentMetadata;
|
|
280
|
-
constructor(value: Message, metadata: ContentMetadata | undefined, type: ContentTokenType);
|
|
281
|
-
}
|
|
282
|
-
declare const token: {
|
|
283
|
-
raw: (value: Message) => ContentToken;
|
|
284
|
-
genericShellCommand: (value: Message) => ContentToken;
|
|
285
|
-
json: (value: any) => ContentToken;
|
|
286
|
-
path: (value: Message) => ContentToken;
|
|
287
|
-
link: (value: Message, link: string) => ContentToken;
|
|
288
|
-
heading: (value: Message) => ContentToken;
|
|
289
|
-
subheading: (value: Message) => ContentToken;
|
|
290
|
-
italic: (value: Message) => ContentToken;
|
|
291
|
-
errorText: (value: Message) => ContentToken;
|
|
292
|
-
cyan: (value: Message) => ContentToken;
|
|
293
|
-
yellow: (value: Message) => ContentToken;
|
|
294
|
-
magenta: (value: Message) => ContentToken;
|
|
295
|
-
green: (value: Message) => ContentToken;
|
|
296
|
-
packagejsonScript: (dependencyManager: DependencyManager, scriptName: string, ...scriptArgs: string[]) => ContentToken;
|
|
297
|
-
successIcon: () => ContentToken;
|
|
298
|
-
failIcon: () => ContentToken;
|
|
299
|
-
};
|
|
300
|
-
declare class TokenizedString {
|
|
301
|
-
value: string;
|
|
302
|
-
constructor(value: string);
|
|
303
|
-
}
|
|
304
|
-
declare type Message = string | TokenizedString;
|
|
305
|
-
declare function content(strings: TemplateStringsArray, ...keys: (ContentToken | string)[]): TokenizedString;
|
|
306
|
-
/** Log levels */
|
|
307
|
-
declare type LogLevel = 'fatal' | 'error' | 'warn' | 'info' | 'debug' | 'trace' | 'silent';
|
|
308
|
-
/**
|
|
309
|
-
*
|
|
310
|
-
* @returns {LogLevel} It returns the log level set by the user.
|
|
311
|
-
*/
|
|
312
|
-
declare const currentLogLevel: () => LogLevel;
|
|
313
|
-
declare const shouldOutput: (logLevel: LogLevel) => boolean;
|
|
314
|
-
/**
|
|
315
|
-
* Ouputs information to the user. This is akin to "console.log"
|
|
316
|
-
* Info messages don't get additional formatting.
|
|
317
|
-
* Note: Info messages are sent through the standard output.
|
|
318
|
-
* @param content {string} The content to be output to the user.
|
|
319
|
-
*/
|
|
320
|
-
declare const info: (content: Message) => void;
|
|
321
|
-
/**
|
|
322
|
-
* Outputs a success message to the user.
|
|
323
|
-
* Success message receive a special formatting to make them stand out in the console.
|
|
324
|
-
* Note: Success messages are sent through the standard output.
|
|
325
|
-
* @param content {string} The content to be output to the user.
|
|
326
|
-
*/
|
|
327
|
-
declare const success: (content: Message) => void;
|
|
328
|
-
/**
|
|
329
|
-
* Outputs a completed message to the user.
|
|
330
|
-
* Completed message receive a special formatting to make them stand out in the console.
|
|
331
|
-
* Note: Completed messages are sent through the standard output.
|
|
332
|
-
* @param content {string} The content to be output to the user.
|
|
333
|
-
*/
|
|
334
|
-
declare const completed: (content: Message) => void;
|
|
335
|
-
/**
|
|
336
|
-
* Ouputs debug information to the user. By default these output is hidden unless the user calls the CLI with --verbose.
|
|
337
|
-
* Debug messages don't get additional formatting.
|
|
338
|
-
* Note: Debug messages are sent through the standard output.
|
|
339
|
-
* @param content {string} The content to be output to the user.
|
|
340
|
-
*/
|
|
341
|
-
declare const debug: (content: Message) => void;
|
|
342
|
-
/**
|
|
343
|
-
* Outputs a warning message to the user.
|
|
344
|
-
* Warning messages receive a special formatting to make them stand out in the console.
|
|
345
|
-
* Note: Warning messages are sent through the standard output.
|
|
346
|
-
* @param content {string} The content to be output to the user.
|
|
347
|
-
*/
|
|
348
|
-
declare const warn: (content: Message) => void;
|
|
349
|
-
/**
|
|
350
|
-
* Prints a new line in the terminal.
|
|
351
|
-
*/
|
|
352
|
-
declare const newline: () => void;
|
|
353
|
-
/**
|
|
354
|
-
* Formats and outputs a fatal error.
|
|
355
|
-
* Note: This API is not intended to be used internally. If you want to
|
|
356
|
-
* abort the execution due to an error, raise a fatal error and let the
|
|
357
|
-
* error handler handle and format it.
|
|
358
|
-
* @param content {Fatal} The fatal error to be output.
|
|
359
|
-
*/
|
|
360
|
-
declare const error$1: (content: Fatal) => Promise<void>;
|
|
361
|
-
declare function stringifyMessage(message: Message): string;
|
|
362
|
-
interface OutputProcess {
|
|
363
|
-
/** The prefix to include in the logs
|
|
364
|
-
* [vite] Output coming from Vite
|
|
365
|
-
*/
|
|
366
|
-
prefix: string;
|
|
367
|
-
/**
|
|
368
|
-
* A callback to invoke the process. stdout and stderr should be used
|
|
369
|
-
* to send standard output and error data that gets formatted with the
|
|
370
|
-
* right prefix.
|
|
371
|
-
*/
|
|
372
|
-
action: (stdout: Writable, stderr: Writable, signal: AbortSignal) => Promise<void>;
|
|
373
|
-
}
|
|
374
|
-
/**
|
|
375
|
-
* Use this function when you have multiple concurrent processes that send data events
|
|
376
|
-
* and we need to output them ensuring that they can visually differenciated by the user.
|
|
377
|
-
*
|
|
378
|
-
* @param processes {OutputProcess[]} A list of processes to run concurrently.
|
|
379
|
-
*/
|
|
380
|
-
declare function concurrent(processes: OutputProcess[], callback?: ((signal: AbortSignal) => void) | undefined): Promise<void>;
|
|
381
|
-
declare function unstyled(message: string): string;
|
|
382
|
-
declare function shouldDisplayColors(): boolean;
|
|
383
|
-
declare function pageLogs(): Promise<void>;
|
|
384
|
-
|
|
385
|
-
declare const output_initiateLogging: typeof initiateLogging;
|
|
386
|
-
declare const output_token: typeof token;
|
|
387
|
-
type output_TokenizedString = TokenizedString;
|
|
388
|
-
declare const output_TokenizedString: typeof TokenizedString;
|
|
389
|
-
type output_Message = Message;
|
|
390
|
-
declare const output_content: typeof content;
|
|
391
|
-
type output_LogLevel = LogLevel;
|
|
392
|
-
declare const output_currentLogLevel: typeof currentLogLevel;
|
|
393
|
-
declare const output_shouldOutput: typeof shouldOutput;
|
|
394
|
-
declare const output_info: typeof info;
|
|
395
|
-
declare const output_success: typeof success;
|
|
396
|
-
declare const output_completed: typeof completed;
|
|
397
|
-
declare const output_debug: typeof debug;
|
|
398
|
-
declare const output_warn: typeof warn;
|
|
399
|
-
declare const output_newline: typeof newline;
|
|
400
|
-
declare const output_stringifyMessage: typeof stringifyMessage;
|
|
401
|
-
type output_OutputProcess = OutputProcess;
|
|
402
|
-
declare const output_concurrent: typeof concurrent;
|
|
403
|
-
declare const output_unstyled: typeof unstyled;
|
|
404
|
-
declare const output_shouldDisplayColors: typeof shouldDisplayColors;
|
|
405
|
-
declare const output_pageLogs: typeof pageLogs;
|
|
406
|
-
declare namespace output {
|
|
407
|
-
export {
|
|
408
|
-
output_initiateLogging as initiateLogging,
|
|
409
|
-
output_token as token,
|
|
410
|
-
output_TokenizedString as TokenizedString,
|
|
411
|
-
output_Message as Message,
|
|
412
|
-
output_content as content,
|
|
413
|
-
output_LogLevel as LogLevel,
|
|
414
|
-
output_currentLogLevel as currentLogLevel,
|
|
415
|
-
output_shouldOutput as shouldOutput,
|
|
416
|
-
output_info as info,
|
|
417
|
-
output_success as success,
|
|
418
|
-
output_completed as completed,
|
|
419
|
-
output_debug as debug,
|
|
420
|
-
output_warn as warn,
|
|
421
|
-
output_newline as newline,
|
|
422
|
-
error$1 as error,
|
|
423
|
-
output_stringifyMessage as stringifyMessage,
|
|
424
|
-
output_OutputProcess as OutputProcess,
|
|
425
|
-
output_concurrent as concurrent,
|
|
426
|
-
output_unstyled as unstyled,
|
|
427
|
-
output_shouldDisplayColors as shouldDisplayColors,
|
|
428
|
-
output_pageLogs as pageLogs,
|
|
429
|
-
};
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
declare enum FatalErrorType {
|
|
433
|
-
Abort = 0,
|
|
434
|
-
AbortSilent = 1,
|
|
435
|
-
Bug = 2
|
|
436
|
-
}
|
|
437
|
-
declare class CancelExecution extends Error {
|
|
438
|
-
}
|
|
439
|
-
/**
|
|
440
|
-
* A fatal error represents an error shouldn't be rescued and that causes the execution to terminate.
|
|
441
|
-
* There shouldn't be code that catches fatal errors.
|
|
442
|
-
*/
|
|
443
|
-
declare abstract class Fatal extends Error {
|
|
444
|
-
tryMessage: string | null;
|
|
445
|
-
type: FatalErrorType;
|
|
446
|
-
constructor(message: Message, type: FatalErrorType, tryMessage?: Message | null);
|
|
447
|
-
}
|
|
448
|
-
/**
|
|
449
|
-
* An abort error is a fatal error that shouldn't be reported as a bug.
|
|
450
|
-
* Those usually represent unexpected scenarios that we can't handle and that usually require some action from the developer
|
|
451
|
-
*/
|
|
452
|
-
declare class Abort extends Fatal {
|
|
453
|
-
constructor(message: Message, tryMessage?: Message | null);
|
|
454
|
-
}
|
|
455
|
-
declare class AbortSilent extends Fatal {
|
|
456
|
-
constructor();
|
|
457
|
-
}
|
|
458
|
-
/**
|
|
459
|
-
* A bug error is an error that represents a bug and therefore should be reported.
|
|
460
|
-
*/
|
|
461
|
-
declare class Bug extends Fatal {
|
|
462
|
-
constructor(message: Message, tryMessage?: string | null);
|
|
463
|
-
}
|
|
464
|
-
/**
|
|
465
|
-
* A function that handles errors that blow up in the CLI.
|
|
466
|
-
* @param error Error to be handled.
|
|
467
|
-
* @returns A promise that resolves with the error passed.
|
|
468
|
-
*/
|
|
469
|
-
declare function handler(error: Error): Promise<Error>;
|
|
470
|
-
declare function mapper(error: Error): Promise<Error>;
|
|
471
|
-
declare function isFatal(error: Error): boolean;
|
|
472
|
-
declare function shouldReport(error: Error): boolean;
|
|
473
|
-
|
|
474
|
-
type error_CancelExecution = CancelExecution;
|
|
475
|
-
declare const error_CancelExecution: typeof CancelExecution;
|
|
476
|
-
type error_Fatal = Fatal;
|
|
477
|
-
declare const error_Fatal: typeof Fatal;
|
|
478
|
-
type error_Abort = Abort;
|
|
479
|
-
declare const error_Abort: typeof Abort;
|
|
480
|
-
type error_AbortSilent = AbortSilent;
|
|
481
|
-
declare const error_AbortSilent: typeof AbortSilent;
|
|
482
|
-
type error_Bug = Bug;
|
|
483
|
-
declare const error_Bug: typeof Bug;
|
|
484
|
-
declare const error_handler: typeof handler;
|
|
485
|
-
declare const error_mapper: typeof mapper;
|
|
486
|
-
declare const error_isFatal: typeof isFatal;
|
|
487
|
-
declare const error_shouldReport: typeof shouldReport;
|
|
488
|
-
declare const error_ExtendableError: typeof ExtendableError;
|
|
489
|
-
declare const error_AbortSignal: typeof AbortSignal;
|
|
490
|
-
declare namespace error {
|
|
491
|
-
export {
|
|
492
|
-
error_CancelExecution as CancelExecution,
|
|
493
|
-
error_Fatal as Fatal,
|
|
494
|
-
error_Abort as Abort,
|
|
495
|
-
error_AbortSilent as AbortSilent,
|
|
496
|
-
error_Bug as Bug,
|
|
497
|
-
error_handler as handler,
|
|
498
|
-
error_mapper as mapper,
|
|
499
|
-
error_isFatal as isFatal,
|
|
500
|
-
error_shouldReport as shouldReport,
|
|
501
|
-
error_ExtendableError as ExtendableError,
|
|
502
|
-
error_AbortSignal as AbortSignal,
|
|
503
|
-
};
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
/**
|
|
507
|
-
* A scope supported by the Shopify Admin API.
|
|
508
|
-
*/
|
|
509
|
-
declare type AdminAPIScope = 'graphql' | 'themes' | 'collaborator' | string;
|
|
510
|
-
/**
|
|
511
|
-
* It represents the options to authenticate against the Shopify Admin API.
|
|
512
|
-
*/
|
|
513
|
-
interface AdminAPIOAuthOptions {
|
|
514
|
-
/** Store to request permissions for */
|
|
515
|
-
storeFqdn: string;
|
|
516
|
-
/** List of scopes to request permissions for */
|
|
517
|
-
scopes: AdminAPIScope[];
|
|
518
|
-
}
|
|
519
|
-
/**
|
|
520
|
-
* A scope supported by the Partners API.
|
|
521
|
-
*/
|
|
522
|
-
declare type PartnersAPIScope = 'cli' | string;
|
|
523
|
-
interface PartnersAPIOAuthOptions {
|
|
524
|
-
/** List of scopes to request permissions for */
|
|
525
|
-
scopes: PartnersAPIScope[];
|
|
526
|
-
}
|
|
527
|
-
/**
|
|
528
|
-
* A scope supported by the Storefront Renderer API.
|
|
529
|
-
*/
|
|
530
|
-
declare type StorefrontRendererScope = 'devtools' | string;
|
|
531
|
-
interface StorefrontRendererAPIOAuthOptions {
|
|
532
|
-
/** List of scopes to request permissions for */
|
|
533
|
-
scopes: StorefrontRendererScope[];
|
|
534
|
-
}
|
|
535
|
-
/**
|
|
536
|
-
* It represents the authentication requirements and
|
|
537
|
-
* is the input necessary to trigger the authentication
|
|
538
|
-
* flow.
|
|
539
|
-
*/
|
|
540
|
-
interface OAuthApplications {
|
|
541
|
-
adminApi?: AdminAPIOAuthOptions;
|
|
542
|
-
storefrontRendererApi?: StorefrontRendererAPIOAuthOptions;
|
|
543
|
-
partnersApi?: PartnersAPIOAuthOptions;
|
|
544
|
-
}
|
|
545
|
-
interface AdminSession {
|
|
546
|
-
token: string;
|
|
547
|
-
storeFqdn: string;
|
|
548
|
-
}
|
|
549
|
-
interface OAuthSession {
|
|
550
|
-
admin?: AdminSession;
|
|
551
|
-
partners?: string;
|
|
552
|
-
storefront?: string;
|
|
553
|
-
}
|
|
554
|
-
declare const PartnerOrganizationNotFoundError: () => Abort;
|
|
555
|
-
/**
|
|
556
|
-
* Ensure that we have a valid session to access the Partners API.
|
|
557
|
-
* If SHOPIFY_CLI_PARTNERS_TOKEN exists, that token will be used to obtain a valid Partners Token
|
|
558
|
-
* If SHOPIFY_CLI_PARTNERS_TOKEN exists, scopes will be ignored
|
|
559
|
-
* @param scopes {string[]} Optional array of extra scopes to authenticate with.
|
|
560
|
-
* @returns {Promise<string>} The access token for the Partners API.
|
|
561
|
-
*/
|
|
562
|
-
declare function ensureAuthenticatedPartners(scopes?: string[], env?: NodeJS.ProcessEnv): Promise<string>;
|
|
563
|
-
/**
|
|
564
|
-
* Ensure that we have a valid session to access the Storefront API.
|
|
565
|
-
* @param scopes {string[]} Optional array of extra scopes to authenticate with.
|
|
566
|
-
* @returns {Promise<string>} The access token for the Storefront API.
|
|
567
|
-
*/
|
|
568
|
-
declare function ensureAuthenticatedStorefront(scopes?: string[]): Promise<string>;
|
|
569
|
-
/**
|
|
570
|
-
* Ensure that we have a valid Admin session for the given store.
|
|
571
|
-
* @param store {string} Store fqdn to request auth for
|
|
572
|
-
* @param scopes {string[]} Optional array of extra scopes to authenticate with.
|
|
573
|
-
* @returns {Promise<string>} The access token for the Admin API
|
|
574
|
-
*/
|
|
575
|
-
declare function ensureAuthenticatedAdmin(store: string, scopes?: string[]): Promise<AdminSession>;
|
|
576
|
-
/**
|
|
577
|
-
* This method ensures that we have a valid session to authenticate against the given applications using the provided scopes.
|
|
578
|
-
* @param applications {OAuthApplications} An object containing the applications we need to be authenticated with.
|
|
579
|
-
* @returns {OAuthSession} An instance with the access tokens organized by application.
|
|
580
|
-
*/
|
|
581
|
-
declare function ensureAuthenticated(applications: OAuthApplications, env?: NodeJS.ProcessEnv): Promise<OAuthSession>;
|
|
582
|
-
declare function hasPartnerAccount(partnersToken: string): Promise<boolean>;
|
|
583
|
-
/**
|
|
584
|
-
* If the user creates an account from the Identity website, the created
|
|
585
|
-
* account won't get a Partner organization created. We need to detect that
|
|
586
|
-
* and take the user to create a partner organization.
|
|
587
|
-
* @param partnersToken {string} Partners token
|
|
588
|
-
*/
|
|
589
|
-
declare function ensureUserHasPartnerAccount(partnersToken: string): Promise<void>;
|
|
590
|
-
declare function logout(): Promise<void>;
|
|
591
|
-
|
|
592
|
-
type session_OAuthApplications = OAuthApplications;
|
|
593
|
-
type session_AdminSession = AdminSession;
|
|
594
|
-
type session_OAuthSession = OAuthSession;
|
|
595
|
-
declare const session_PartnerOrganizationNotFoundError: typeof PartnerOrganizationNotFoundError;
|
|
596
|
-
declare const session_ensureAuthenticatedPartners: typeof ensureAuthenticatedPartners;
|
|
597
|
-
declare const session_ensureAuthenticatedStorefront: typeof ensureAuthenticatedStorefront;
|
|
598
|
-
declare const session_ensureAuthenticatedAdmin: typeof ensureAuthenticatedAdmin;
|
|
599
|
-
declare const session_ensureAuthenticated: typeof ensureAuthenticated;
|
|
600
|
-
declare const session_hasPartnerAccount: typeof hasPartnerAccount;
|
|
601
|
-
declare const session_ensureUserHasPartnerAccount: typeof ensureUserHasPartnerAccount;
|
|
602
|
-
declare const session_logout: typeof logout;
|
|
603
|
-
declare namespace session {
|
|
604
|
-
export {
|
|
605
|
-
session_OAuthApplications as OAuthApplications,
|
|
606
|
-
session_AdminSession as AdminSession,
|
|
607
|
-
session_OAuthSession as OAuthSession,
|
|
608
|
-
session_PartnerOrganizationNotFoundError as PartnerOrganizationNotFoundError,
|
|
609
|
-
session_ensureAuthenticatedPartners as ensureAuthenticatedPartners,
|
|
610
|
-
session_ensureAuthenticatedStorefront as ensureAuthenticatedStorefront,
|
|
611
|
-
session_ensureAuthenticatedAdmin as ensureAuthenticatedAdmin,
|
|
612
|
-
session_ensureAuthenticated as ensureAuthenticated,
|
|
613
|
-
session_hasPartnerAccount as hasPartnerAccount,
|
|
614
|
-
session_ensureUserHasPartnerAccount as ensureUserHasPartnerAccount,
|
|
615
|
-
session_logout as logout,
|
|
616
|
-
};
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
declare function request$1<T>(query: RequestDocument, session: AdminSession, variables?: Variables): Promise<T>;
|
|
620
|
-
|
|
621
|
-
declare namespace admin {
|
|
622
|
-
export {
|
|
623
|
-
request$1 as request,
|
|
624
|
-
};
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
declare class RequestClientError extends ExtendableError {
|
|
628
|
-
statusCode: number;
|
|
629
|
-
constructor(message: string, statusCode: number);
|
|
630
|
-
}
|
|
631
|
-
declare function request<T>(query: RequestDocument, token: string, variables?: Variables): Promise<T>;
|
|
632
|
-
/**
|
|
633
|
-
* Check if the given token is revoked and no longer valid to interact with the Partners API.
|
|
634
|
-
* @param token {string} - The token to check
|
|
635
|
-
* @returns {Promise<boolean>} - True if the token is revoked, false otherwise
|
|
636
|
-
*/
|
|
637
|
-
declare function checkIfTokenIsRevoked(token: string): Promise<boolean>;
|
|
638
|
-
/**
|
|
639
|
-
* Function queries are proxied through the script service proxy.
|
|
640
|
-
* To execute a query, we encapsulate it inside another query (including the variables)
|
|
641
|
-
* This is done automatically, you just need to provide the query and the variables.
|
|
642
|
-
*
|
|
643
|
-
* @param apiKey {string} APIKey of the app where the query will be executed.
|
|
644
|
-
* @param query {any} GraphQL query to execute.
|
|
645
|
-
* @param token {string} Partners token
|
|
646
|
-
* @param variables {any} GraphQL variables to pass to the query.
|
|
647
|
-
* @returns {Promise<T>} The response of the query.
|
|
648
|
-
*/
|
|
649
|
-
declare function functionProxyRequest<T>(apiKey: string, query: unknown, token: string, variables?: unknown): Promise<T>;
|
|
650
|
-
|
|
651
|
-
type partners$2_RequestClientError = RequestClientError;
|
|
652
|
-
declare const partners$2_RequestClientError: typeof RequestClientError;
|
|
653
|
-
declare const partners$2_request: typeof request;
|
|
654
|
-
declare const partners$2_checkIfTokenIsRevoked: typeof checkIfTokenIsRevoked;
|
|
655
|
-
declare const partners$2_functionProxyRequest: typeof functionProxyRequest;
|
|
656
|
-
declare namespace partners$2 {
|
|
657
|
-
export {
|
|
658
|
-
partners$2_RequestClientError as RequestClientError,
|
|
659
|
-
partners$2_request as request,
|
|
660
|
-
partners$2_checkIfTokenIsRevoked as checkIfTokenIsRevoked,
|
|
661
|
-
partners$2_functionProxyRequest as functionProxyRequest,
|
|
662
|
-
};
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
declare const FindOrganizationQuery: string;
|
|
666
|
-
interface FindOrganizationQuerySchema {
|
|
667
|
-
organizations: {
|
|
668
|
-
nodes: {
|
|
669
|
-
id: string;
|
|
670
|
-
businessName: string;
|
|
671
|
-
website: string;
|
|
672
|
-
appsNext: boolean;
|
|
673
|
-
apps: {
|
|
674
|
-
nodes: {
|
|
675
|
-
id: string;
|
|
676
|
-
title: string;
|
|
677
|
-
apiKey: string;
|
|
678
|
-
organizationId: string;
|
|
679
|
-
apiSecretKeys: {
|
|
680
|
-
secret: string;
|
|
681
|
-
}[];
|
|
682
|
-
appType: string;
|
|
683
|
-
}[];
|
|
684
|
-
};
|
|
685
|
-
}[];
|
|
686
|
-
};
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
interface AllOrganizationsQuerySchemaOrganization {
|
|
690
|
-
id: string;
|
|
691
|
-
businessName: string;
|
|
692
|
-
website: string;
|
|
693
|
-
appsNext: boolean;
|
|
694
|
-
}
|
|
695
|
-
interface AllOrganizationsQuerySchema {
|
|
696
|
-
organizations: {
|
|
697
|
-
nodes: AllOrganizationsQuerySchemaOrganization[];
|
|
698
|
-
};
|
|
699
|
-
}
|
|
700
|
-
declare const AllOrganizationsQuery: string;
|
|
701
|
-
|
|
702
|
-
declare const CreateAppQuery: string;
|
|
703
|
-
interface CreateAppQueryVariables {
|
|
704
|
-
org: number;
|
|
705
|
-
title: string;
|
|
706
|
-
appUrl: string;
|
|
707
|
-
redir: string[];
|
|
708
|
-
type: string;
|
|
709
|
-
}
|
|
710
|
-
interface CreateAppQuerySchema {
|
|
711
|
-
appCreate: {
|
|
712
|
-
app: {
|
|
713
|
-
id: string;
|
|
714
|
-
apiKey: string;
|
|
715
|
-
title: string;
|
|
716
|
-
applicationUrl: string;
|
|
717
|
-
redirectUrlWhitelist: string[];
|
|
718
|
-
organizationId: string;
|
|
719
|
-
apiSecretKeys: {
|
|
720
|
-
secret: string;
|
|
721
|
-
}[];
|
|
722
|
-
appType: string;
|
|
723
|
-
};
|
|
724
|
-
userErrors: {
|
|
725
|
-
field: string[];
|
|
726
|
-
message: string;
|
|
727
|
-
}[];
|
|
728
|
-
};
|
|
729
|
-
}
|
|
730
|
-
|
|
731
|
-
declare const UpdateURLsQuery: string;
|
|
732
|
-
interface UpdateURLsQueryVariables {
|
|
733
|
-
apiKey: string;
|
|
734
|
-
appUrl: string;
|
|
735
|
-
redir: string[];
|
|
736
|
-
}
|
|
737
|
-
interface UpdateURLsQuerySchema {
|
|
738
|
-
appUpdate: {
|
|
739
|
-
userErrors: {
|
|
740
|
-
field: string[];
|
|
741
|
-
message: string;
|
|
742
|
-
}[];
|
|
743
|
-
};
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
declare const FindAppQuery: string;
|
|
747
|
-
interface FindAppQuerySchema {
|
|
748
|
-
app: {
|
|
749
|
-
id: string;
|
|
750
|
-
title: string;
|
|
751
|
-
apiKey: string;
|
|
752
|
-
organizationId: string;
|
|
753
|
-
apiSecretKeys: {
|
|
754
|
-
secret: string;
|
|
755
|
-
}[];
|
|
756
|
-
appType: string;
|
|
757
|
-
};
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
declare const ExtensionUpdateDraftMutation: string;
|
|
761
|
-
interface ExtensionUpdateDraftInput {
|
|
762
|
-
apiKey: string;
|
|
763
|
-
config: string;
|
|
764
|
-
context: string | undefined;
|
|
765
|
-
registrationId: string;
|
|
766
|
-
}
|
|
767
|
-
interface ExtensionUpdateDraftPayload {
|
|
768
|
-
clientMutationId: string;
|
|
769
|
-
extensionVersion: ExtensionVersion;
|
|
770
|
-
userErrors: {
|
|
771
|
-
field: string[];
|
|
772
|
-
message: string;
|
|
773
|
-
}[];
|
|
774
|
-
}
|
|
775
|
-
interface ExtensionVersion {
|
|
776
|
-
config: string;
|
|
777
|
-
context: string;
|
|
778
|
-
id: string;
|
|
779
|
-
lastUserInteractionAt: string;
|
|
780
|
-
location: string;
|
|
781
|
-
registrationId: string;
|
|
782
|
-
registrationUuid: string;
|
|
783
|
-
uuid: string;
|
|
784
|
-
validationErrors: {
|
|
785
|
-
field: string[];
|
|
786
|
-
message: string;
|
|
787
|
-
}[];
|
|
788
|
-
versionTag: string;
|
|
789
|
-
}
|
|
790
|
-
interface ExtensionUpdateSchema {
|
|
791
|
-
extensionUpdateDraft: ExtensionUpdateDraftPayload;
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
declare const GenerateSignedUploadUrl: string;
|
|
795
|
-
interface GenerateSignedUploadUrlVariables {
|
|
796
|
-
apiKey: string;
|
|
797
|
-
deploymentUuid: string;
|
|
798
|
-
bundleFormat: number;
|
|
799
|
-
}
|
|
800
|
-
interface GenerateSignedUploadUrlSchema {
|
|
801
|
-
deploymentGenerateSignedUploadUrl: {
|
|
802
|
-
signedUploadUrl: string;
|
|
803
|
-
userErrors: {
|
|
804
|
-
field: string[];
|
|
805
|
-
message: string;
|
|
806
|
-
}[];
|
|
807
|
-
};
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
declare const CreateDeployment: string;
|
|
811
|
-
interface ExtensionSettings {
|
|
812
|
-
uuid: string;
|
|
813
|
-
config: string;
|
|
814
|
-
context: string;
|
|
815
|
-
}
|
|
816
|
-
interface CreateDeploymentVariables {
|
|
817
|
-
apiKey: string;
|
|
818
|
-
uuid: string;
|
|
819
|
-
bundleUrl: string;
|
|
820
|
-
extensions: ExtensionSettings[];
|
|
821
|
-
}
|
|
822
|
-
interface CreateDeploymentSchema {
|
|
823
|
-
deploymentCreate: {
|
|
824
|
-
deployment: {
|
|
825
|
-
uuid: string;
|
|
826
|
-
};
|
|
827
|
-
userErrors: {
|
|
828
|
-
field: string[];
|
|
829
|
-
message: string;
|
|
830
|
-
}[];
|
|
831
|
-
};
|
|
832
|
-
}
|
|
833
|
-
|
|
834
|
-
declare const AllStoresByOrganizationQuery: string;
|
|
835
|
-
interface AllStoresByOrganizationSchema {
|
|
836
|
-
organizations: {
|
|
837
|
-
nodes: {
|
|
838
|
-
id: string;
|
|
839
|
-
stores: {
|
|
840
|
-
nodes: {
|
|
841
|
-
shopId: string;
|
|
842
|
-
link: string;
|
|
843
|
-
shopDomain: string;
|
|
844
|
-
shopName: string;
|
|
845
|
-
transferDisabled: boolean;
|
|
846
|
-
convertableToPartnerTest: boolean;
|
|
847
|
-
}[];
|
|
848
|
-
};
|
|
849
|
-
}[];
|
|
850
|
-
};
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
declare const ConvertDevToTestStoreQuery: string;
|
|
854
|
-
interface ConvertDevToTestStoreVariables {
|
|
855
|
-
input: {
|
|
856
|
-
organizationID: number;
|
|
857
|
-
shopId: string;
|
|
858
|
-
};
|
|
859
|
-
}
|
|
860
|
-
interface ConvertDevToTestStoreSchema {
|
|
861
|
-
convertDevToTestStore: {
|
|
862
|
-
convertedToTestStore: boolean;
|
|
863
|
-
userErrors: {
|
|
864
|
-
field: string[];
|
|
865
|
-
message: string;
|
|
866
|
-
}[];
|
|
867
|
-
};
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
declare const ExtensionCreateQuery: string;
|
|
871
|
-
interface ExtensionCreateVariables {
|
|
872
|
-
apiKey: string;
|
|
873
|
-
type: string;
|
|
874
|
-
title: string;
|
|
875
|
-
config: string;
|
|
876
|
-
context?: string | null;
|
|
877
|
-
}
|
|
878
|
-
interface ExtensionCreateSchema {
|
|
879
|
-
extensionCreate: {
|
|
880
|
-
extensionRegistration: {
|
|
881
|
-
id: string;
|
|
882
|
-
uuid: string;
|
|
883
|
-
type: string;
|
|
884
|
-
title: string;
|
|
885
|
-
draftVersion: {
|
|
886
|
-
registrationId: string;
|
|
887
|
-
lastUserInteractionAt: string;
|
|
888
|
-
validationErrors: {
|
|
889
|
-
field: string[];
|
|
890
|
-
message: string;
|
|
891
|
-
}[];
|
|
892
|
-
};
|
|
893
|
-
};
|
|
894
|
-
userErrors: {
|
|
895
|
-
field: string[];
|
|
896
|
-
message: string;
|
|
897
|
-
}[];
|
|
898
|
-
};
|
|
899
|
-
}
|
|
900
|
-
|
|
901
|
-
declare const ExtensionSpecificationsQuery: string;
|
|
902
|
-
interface ExtensionSpecificationsQueryVariables {
|
|
903
|
-
api_key: string;
|
|
904
|
-
}
|
|
905
|
-
interface ExtensionSpecificationsQuerySchema {
|
|
906
|
-
extensionSpecifications: {
|
|
907
|
-
name: string;
|
|
908
|
-
identifier: string;
|
|
909
|
-
options: {
|
|
910
|
-
managementExperience: 'cli' | 'custom' | 'dashboard';
|
|
911
|
-
}[];
|
|
912
|
-
features?: {
|
|
913
|
-
argo?: {
|
|
914
|
-
surface: string;
|
|
915
|
-
};
|
|
916
|
-
};
|
|
917
|
-
}[];
|
|
918
|
-
}
|
|
919
|
-
|
|
920
|
-
declare const AllAppExtensionRegistrationsQuery: string;
|
|
921
|
-
interface AllAppExtensionRegistrationsQueryVariables {
|
|
922
|
-
apiKey: string;
|
|
923
|
-
}
|
|
924
|
-
interface AllAppExtensionRegistrationsQuerySchema {
|
|
925
|
-
app: {
|
|
926
|
-
extensionRegistrations: {
|
|
927
|
-
id: string;
|
|
928
|
-
uuid: string;
|
|
929
|
-
title: string;
|
|
930
|
-
type: string;
|
|
931
|
-
}[];
|
|
932
|
-
};
|
|
933
|
-
}
|
|
934
|
-
|
|
935
|
-
declare const FindProductVariantQuery: string;
|
|
936
|
-
interface FindProductVariantSchema {
|
|
937
|
-
products: {
|
|
938
|
-
edges: {
|
|
939
|
-
node: {
|
|
940
|
-
id: string;
|
|
941
|
-
variants: {
|
|
942
|
-
edges: {
|
|
943
|
-
node: {
|
|
944
|
-
id: string;
|
|
945
|
-
};
|
|
946
|
-
}[];
|
|
947
|
-
};
|
|
948
|
-
};
|
|
949
|
-
}[];
|
|
950
|
-
};
|
|
951
|
-
}
|
|
952
|
-
|
|
953
|
-
declare const ScriptServiceProxyQuery: string;
|
|
954
|
-
interface ScriptServiceProxyQuerySchema {
|
|
955
|
-
scriptServiceProxy: unknown;
|
|
956
|
-
}
|
|
957
|
-
|
|
958
|
-
declare const GetAppFunctionsQuery: string;
|
|
959
|
-
|
|
960
|
-
declare const ModuleUploadUrlGenerateMutation: string;
|
|
961
|
-
interface ModuleUploadUrlGenerateMutationSchema {
|
|
962
|
-
data: {
|
|
963
|
-
moduleUploadUrlGenerate: {
|
|
964
|
-
details: {
|
|
965
|
-
url: string;
|
|
966
|
-
headers: {
|
|
967
|
-
[key: string]: string;
|
|
968
|
-
};
|
|
969
|
-
humanizedMaxSize: string;
|
|
970
|
-
};
|
|
971
|
-
userErrors: {
|
|
972
|
-
field: string;
|
|
973
|
-
message: string;
|
|
974
|
-
}[];
|
|
975
|
-
};
|
|
976
|
-
};
|
|
977
|
-
}
|
|
978
|
-
|
|
979
|
-
declare const AppFunctionSetMutation: string;
|
|
980
|
-
interface AppFunctionSetMutationSchema {
|
|
981
|
-
data: {
|
|
982
|
-
appScriptSet: {
|
|
983
|
-
userErrors: {
|
|
984
|
-
field: string;
|
|
985
|
-
message: string;
|
|
986
|
-
tag: string;
|
|
987
|
-
}[];
|
|
988
|
-
appScript?: {
|
|
989
|
-
uuid: string;
|
|
990
|
-
appKey: string;
|
|
991
|
-
configSchema: unknown;
|
|
992
|
-
extensionPointName: string;
|
|
993
|
-
title: string;
|
|
994
|
-
};
|
|
995
|
-
};
|
|
996
|
-
};
|
|
997
|
-
}
|
|
998
|
-
interface AppFunctionSetVariables {
|
|
999
|
-
uuid?: string;
|
|
1000
|
-
extensionPointName: string;
|
|
1001
|
-
title: string;
|
|
1002
|
-
description?: string;
|
|
1003
|
-
force?: boolean;
|
|
1004
|
-
schemaMajorVersion?: string;
|
|
1005
|
-
schemaMinorVersion?: string;
|
|
1006
|
-
scriptConfigVersion?: string;
|
|
1007
|
-
configurationUi: boolean;
|
|
1008
|
-
configurationDefinition?: string;
|
|
1009
|
-
moduleUploadUrl: string;
|
|
1010
|
-
library?: {
|
|
1011
|
-
language: string;
|
|
1012
|
-
version: string;
|
|
1013
|
-
};
|
|
1014
|
-
appBridge?: {
|
|
1015
|
-
createPath?: string;
|
|
1016
|
-
detailsPath?: string;
|
|
1017
|
-
};
|
|
1018
|
-
inputQuery?: string;
|
|
1019
|
-
apiVersion?: string;
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
declare const FindOrganizationBasicQuery: string;
|
|
1023
|
-
interface FindOrganizationBasicQuerySchema {
|
|
1024
|
-
organizations: {
|
|
1025
|
-
nodes: {
|
|
1026
|
-
id: string;
|
|
1027
|
-
businessName: string;
|
|
1028
|
-
website: string;
|
|
1029
|
-
appsNext: boolean;
|
|
1030
|
-
}[];
|
|
1031
|
-
};
|
|
1032
|
-
}
|
|
1033
|
-
|
|
1034
|
-
declare const index_FindOrganizationQuery: typeof FindOrganizationQuery;
|
|
1035
|
-
type index_FindOrganizationQuerySchema = FindOrganizationQuerySchema;
|
|
1036
|
-
type index_AllOrganizationsQuerySchemaOrganization = AllOrganizationsQuerySchemaOrganization;
|
|
1037
|
-
type index_AllOrganizationsQuerySchema = AllOrganizationsQuerySchema;
|
|
1038
|
-
declare const index_AllOrganizationsQuery: typeof AllOrganizationsQuery;
|
|
1039
|
-
declare const index_CreateAppQuery: typeof CreateAppQuery;
|
|
1040
|
-
type index_CreateAppQueryVariables = CreateAppQueryVariables;
|
|
1041
|
-
type index_CreateAppQuerySchema = CreateAppQuerySchema;
|
|
1042
|
-
declare const index_UpdateURLsQuery: typeof UpdateURLsQuery;
|
|
1043
|
-
type index_UpdateURLsQueryVariables = UpdateURLsQueryVariables;
|
|
1044
|
-
type index_UpdateURLsQuerySchema = UpdateURLsQuerySchema;
|
|
1045
|
-
declare const index_FindAppQuery: typeof FindAppQuery;
|
|
1046
|
-
type index_FindAppQuerySchema = FindAppQuerySchema;
|
|
1047
|
-
declare const index_ExtensionUpdateDraftMutation: typeof ExtensionUpdateDraftMutation;
|
|
1048
|
-
type index_ExtensionUpdateDraftInput = ExtensionUpdateDraftInput;
|
|
1049
|
-
type index_ExtensionUpdateDraftPayload = ExtensionUpdateDraftPayload;
|
|
1050
|
-
type index_ExtensionVersion = ExtensionVersion;
|
|
1051
|
-
type index_ExtensionUpdateSchema = ExtensionUpdateSchema;
|
|
1052
|
-
declare const index_GenerateSignedUploadUrl: typeof GenerateSignedUploadUrl;
|
|
1053
|
-
type index_GenerateSignedUploadUrlVariables = GenerateSignedUploadUrlVariables;
|
|
1054
|
-
type index_GenerateSignedUploadUrlSchema = GenerateSignedUploadUrlSchema;
|
|
1055
|
-
declare const index_CreateDeployment: typeof CreateDeployment;
|
|
1056
|
-
type index_ExtensionSettings = ExtensionSettings;
|
|
1057
|
-
type index_CreateDeploymentVariables = CreateDeploymentVariables;
|
|
1058
|
-
type index_CreateDeploymentSchema = CreateDeploymentSchema;
|
|
1059
|
-
declare const index_AllStoresByOrganizationQuery: typeof AllStoresByOrganizationQuery;
|
|
1060
|
-
type index_AllStoresByOrganizationSchema = AllStoresByOrganizationSchema;
|
|
1061
|
-
declare const index_ConvertDevToTestStoreQuery: typeof ConvertDevToTestStoreQuery;
|
|
1062
|
-
type index_ConvertDevToTestStoreVariables = ConvertDevToTestStoreVariables;
|
|
1063
|
-
type index_ConvertDevToTestStoreSchema = ConvertDevToTestStoreSchema;
|
|
1064
|
-
declare const index_ExtensionCreateQuery: typeof ExtensionCreateQuery;
|
|
1065
|
-
type index_ExtensionCreateVariables = ExtensionCreateVariables;
|
|
1066
|
-
type index_ExtensionCreateSchema = ExtensionCreateSchema;
|
|
1067
|
-
declare const index_ExtensionSpecificationsQuery: typeof ExtensionSpecificationsQuery;
|
|
1068
|
-
type index_ExtensionSpecificationsQueryVariables = ExtensionSpecificationsQueryVariables;
|
|
1069
|
-
type index_ExtensionSpecificationsQuerySchema = ExtensionSpecificationsQuerySchema;
|
|
1070
|
-
declare const index_AllAppExtensionRegistrationsQuery: typeof AllAppExtensionRegistrationsQuery;
|
|
1071
|
-
type index_AllAppExtensionRegistrationsQueryVariables = AllAppExtensionRegistrationsQueryVariables;
|
|
1072
|
-
type index_AllAppExtensionRegistrationsQuerySchema = AllAppExtensionRegistrationsQuerySchema;
|
|
1073
|
-
declare const index_FindProductVariantQuery: typeof FindProductVariantQuery;
|
|
1074
|
-
type index_FindProductVariantSchema = FindProductVariantSchema;
|
|
1075
|
-
declare const index_ScriptServiceProxyQuery: typeof ScriptServiceProxyQuery;
|
|
1076
|
-
type index_ScriptServiceProxyQuerySchema = ScriptServiceProxyQuerySchema;
|
|
1077
|
-
declare const index_GetAppFunctionsQuery: typeof GetAppFunctionsQuery;
|
|
1078
|
-
declare const index_ModuleUploadUrlGenerateMutation: typeof ModuleUploadUrlGenerateMutation;
|
|
1079
|
-
type index_ModuleUploadUrlGenerateMutationSchema = ModuleUploadUrlGenerateMutationSchema;
|
|
1080
|
-
declare const index_AppFunctionSetMutation: typeof AppFunctionSetMutation;
|
|
1081
|
-
type index_AppFunctionSetMutationSchema = AppFunctionSetMutationSchema;
|
|
1082
|
-
type index_AppFunctionSetVariables = AppFunctionSetVariables;
|
|
1083
|
-
declare const index_FindOrganizationBasicQuery: typeof FindOrganizationBasicQuery;
|
|
1084
|
-
type index_FindOrganizationBasicQuerySchema = FindOrganizationBasicQuerySchema;
|
|
1085
|
-
declare namespace index {
|
|
1086
|
-
export {
|
|
1087
|
-
index_FindOrganizationQuery as FindOrganizationQuery,
|
|
1088
|
-
index_FindOrganizationQuerySchema as FindOrganizationQuerySchema,
|
|
1089
|
-
index_AllOrganizationsQuerySchemaOrganization as AllOrganizationsQuerySchemaOrganization,
|
|
1090
|
-
index_AllOrganizationsQuerySchema as AllOrganizationsQuerySchema,
|
|
1091
|
-
index_AllOrganizationsQuery as AllOrganizationsQuery,
|
|
1092
|
-
index_CreateAppQuery as CreateAppQuery,
|
|
1093
|
-
index_CreateAppQueryVariables as CreateAppQueryVariables,
|
|
1094
|
-
index_CreateAppQuerySchema as CreateAppQuerySchema,
|
|
1095
|
-
index_UpdateURLsQuery as UpdateURLsQuery,
|
|
1096
|
-
index_UpdateURLsQueryVariables as UpdateURLsQueryVariables,
|
|
1097
|
-
index_UpdateURLsQuerySchema as UpdateURLsQuerySchema,
|
|
1098
|
-
index_FindAppQuery as FindAppQuery,
|
|
1099
|
-
index_FindAppQuerySchema as FindAppQuerySchema,
|
|
1100
|
-
index_ExtensionUpdateDraftMutation as ExtensionUpdateDraftMutation,
|
|
1101
|
-
index_ExtensionUpdateDraftInput as ExtensionUpdateDraftInput,
|
|
1102
|
-
index_ExtensionUpdateDraftPayload as ExtensionUpdateDraftPayload,
|
|
1103
|
-
index_ExtensionVersion as ExtensionVersion,
|
|
1104
|
-
index_ExtensionUpdateSchema as ExtensionUpdateSchema,
|
|
1105
|
-
index_GenerateSignedUploadUrl as GenerateSignedUploadUrl,
|
|
1106
|
-
index_GenerateSignedUploadUrlVariables as GenerateSignedUploadUrlVariables,
|
|
1107
|
-
index_GenerateSignedUploadUrlSchema as GenerateSignedUploadUrlSchema,
|
|
1108
|
-
index_CreateDeployment as CreateDeployment,
|
|
1109
|
-
index_ExtensionSettings as ExtensionSettings,
|
|
1110
|
-
index_CreateDeploymentVariables as CreateDeploymentVariables,
|
|
1111
|
-
index_CreateDeploymentSchema as CreateDeploymentSchema,
|
|
1112
|
-
index_AllStoresByOrganizationQuery as AllStoresByOrganizationQuery,
|
|
1113
|
-
index_AllStoresByOrganizationSchema as AllStoresByOrganizationSchema,
|
|
1114
|
-
index_ConvertDevToTestStoreQuery as ConvertDevToTestStoreQuery,
|
|
1115
|
-
index_ConvertDevToTestStoreVariables as ConvertDevToTestStoreVariables,
|
|
1116
|
-
index_ConvertDevToTestStoreSchema as ConvertDevToTestStoreSchema,
|
|
1117
|
-
index_ExtensionCreateQuery as ExtensionCreateQuery,
|
|
1118
|
-
index_ExtensionCreateVariables as ExtensionCreateVariables,
|
|
1119
|
-
index_ExtensionCreateSchema as ExtensionCreateSchema,
|
|
1120
|
-
index_ExtensionSpecificationsQuery as ExtensionSpecificationsQuery,
|
|
1121
|
-
index_ExtensionSpecificationsQueryVariables as ExtensionSpecificationsQueryVariables,
|
|
1122
|
-
index_ExtensionSpecificationsQuerySchema as ExtensionSpecificationsQuerySchema,
|
|
1123
|
-
index_AllAppExtensionRegistrationsQuery as AllAppExtensionRegistrationsQuery,
|
|
1124
|
-
index_AllAppExtensionRegistrationsQueryVariables as AllAppExtensionRegistrationsQueryVariables,
|
|
1125
|
-
index_AllAppExtensionRegistrationsQuerySchema as AllAppExtensionRegistrationsQuerySchema,
|
|
1126
|
-
index_FindProductVariantQuery as FindProductVariantQuery,
|
|
1127
|
-
index_FindProductVariantSchema as FindProductVariantSchema,
|
|
1128
|
-
index_ScriptServiceProxyQuery as ScriptServiceProxyQuery,
|
|
1129
|
-
index_ScriptServiceProxyQuerySchema as ScriptServiceProxyQuerySchema,
|
|
1130
|
-
index_GetAppFunctionsQuery as GetAppFunctionsQuery,
|
|
1131
|
-
index_ModuleUploadUrlGenerateMutation as ModuleUploadUrlGenerateMutation,
|
|
1132
|
-
index_ModuleUploadUrlGenerateMutationSchema as ModuleUploadUrlGenerateMutationSchema,
|
|
1133
|
-
index_AppFunctionSetMutation as AppFunctionSetMutation,
|
|
1134
|
-
index_AppFunctionSetMutationSchema as AppFunctionSetMutationSchema,
|
|
1135
|
-
index_AppFunctionSetVariables as AppFunctionSetVariables,
|
|
1136
|
-
index_FindOrganizationBasicQuery as FindOrganizationBasicQuery,
|
|
1137
|
-
index_FindOrganizationBasicQuerySchema as FindOrganizationBasicQuerySchema,
|
|
1138
|
-
};
|
|
1139
|
-
}
|
|
1140
|
-
|
|
1141
|
-
declare const api_admin: typeof admin;
|
|
1142
|
-
declare namespace api {
|
|
1143
|
-
export {
|
|
1144
|
-
api_admin as admin,
|
|
1145
|
-
partners$2 as partners,
|
|
1146
|
-
index as graphql,
|
|
1147
|
-
};
|
|
1148
|
-
}
|
|
1149
|
-
|
|
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
|
-
declare const InvalidChecksumError: ({ file, expected, got }: {
|
|
1160
|
-
file: string;
|
|
1161
|
-
expected: string;
|
|
1162
|
-
got: string;
|
|
1163
|
-
}) => Abort;
|
|
1164
|
-
/**
|
|
1165
|
-
* Given a local file and a URL pointing to a remote file representing the MD5 of a local file,
|
|
1166
|
-
* it validates the authenticity of the binary using an MD5 checksum.
|
|
1167
|
-
* @param options: The file to validate and the URL that points to the file containing the MD5.
|
|
1168
|
-
*/
|
|
1169
|
-
declare function validateMD5({ file, md5FileURL }: {
|
|
1170
|
-
file: string;
|
|
1171
|
-
md5FileURL: string;
|
|
1172
|
-
}): Promise<void>;
|
|
1173
|
-
|
|
1174
|
-
declare const checksum_InvalidChecksumError: typeof InvalidChecksumError;
|
|
1175
|
-
declare const checksum_validateMD5: typeof validateMD5;
|
|
1176
|
-
declare namespace checksum {
|
|
1177
|
-
export {
|
|
1178
|
-
checksum_InvalidChecksumError as InvalidChecksumError,
|
|
1179
|
-
checksum_validateMD5 as validateMD5,
|
|
1180
|
-
};
|
|
1181
|
-
}
|
|
1182
|
-
|
|
1183
|
-
/**
|
|
1184
|
-
* An object that contains the flags that
|
|
1185
|
-
* are shared across all the commands.
|
|
1186
|
-
*/
|
|
1187
|
-
declare const globalFlags: {
|
|
1188
|
-
verbose: _oclif_core_lib_interfaces.BooleanFlag<boolean>;
|
|
1189
|
-
};
|
|
1190
|
-
|
|
1191
|
-
declare const cli_globalFlags: typeof globalFlags;
|
|
1192
|
-
declare namespace cli {
|
|
1193
|
-
export {
|
|
1194
|
-
cli_globalFlags as globalFlags,
|
|
1195
|
-
};
|
|
1196
|
-
}
|
|
1197
|
-
|
|
1198
|
-
/**
|
|
1199
|
-
* Error that's thrown when the .env is not found.
|
|
1200
|
-
* @param path {string} Path to the .env file.
|
|
1201
|
-
* @returns {Abort} An abort error.
|
|
1202
|
-
*/
|
|
1203
|
-
declare const DotEnvNotFoundError: (path: string) => Abort;
|
|
1204
|
-
/**
|
|
1205
|
-
* This interface represents a .env file.
|
|
1206
|
-
*/
|
|
1207
|
-
interface DotEnvFile {
|
|
1208
|
-
/**
|
|
1209
|
-
* Path to the .env file.
|
|
1210
|
-
*/
|
|
1211
|
-
path: string;
|
|
1212
|
-
/**
|
|
1213
|
-
* Variables of the .env file.
|
|
1214
|
-
*/
|
|
1215
|
-
variables: {
|
|
1216
|
-
[name: string]: string;
|
|
1217
|
-
};
|
|
1218
|
-
}
|
|
1219
|
-
declare function read$1(path: string): Promise<DotEnvFile>;
|
|
1220
|
-
/**
|
|
1221
|
-
* Writes a .env file to disk.
|
|
1222
|
-
* @param file {DotEnvFile} .env file to be written.
|
|
1223
|
-
*/
|
|
1224
|
-
declare function write$1(file: DotEnvFile): Promise<void>;
|
|
1225
|
-
|
|
1226
|
-
declare const dotEnv_DotEnvNotFoundError: typeof DotEnvNotFoundError;
|
|
1227
|
-
type dotEnv_DotEnvFile = DotEnvFile;
|
|
1228
|
-
declare namespace dotEnv {
|
|
1229
|
-
export {
|
|
1230
|
-
dotEnv_DotEnvNotFoundError as DotEnvNotFoundError,
|
|
1231
|
-
dotEnv_DotEnvFile as DotEnvFile,
|
|
1232
|
-
read$1 as read,
|
|
1233
|
-
write$1 as write,
|
|
1234
|
-
};
|
|
1235
|
-
}
|
|
1236
|
-
|
|
1237
|
-
/**
|
|
1238
|
-
* It returns true if the terminal is interactive.
|
|
1239
|
-
* @returns {boolean} True if the terminal is interactive.
|
|
1240
|
-
*/
|
|
1241
|
-
declare function isTerminalInteractive(): boolean;
|
|
1242
|
-
/**
|
|
1243
|
-
* Returns the path to the user's home directory.
|
|
1244
|
-
* @returns {string} The path to the user's home directory.
|
|
1245
|
-
*/
|
|
1246
|
-
declare function homeDirectory(): string;
|
|
1247
|
-
/**
|
|
1248
|
-
* Returns true if the CLI is running in debug mode.
|
|
1249
|
-
* @param env The environment variables from the environment of the current process.
|
|
1250
|
-
* @returns true if SHOPIFY_CONFIG is debug
|
|
1251
|
-
*/
|
|
1252
|
-
declare function isDebug(env?: NodeJS.ProcessEnv): boolean;
|
|
1253
|
-
/**
|
|
1254
|
-
* Returns true if the CLI is running in verbose mode.
|
|
1255
|
-
* @param env The environment variables from the environment of the current process.
|
|
1256
|
-
* @returns true if SHOPIFY_FLAG_VERBOSE is truthy or the flag --verbose has been passed
|
|
1257
|
-
*/
|
|
1258
|
-
declare function isVerbose(env?: NodeJS.ProcessEnv): boolean;
|
|
1259
|
-
/**
|
|
1260
|
-
* Returns true if the environment in which the CLI is running is either
|
|
1261
|
-
* a local environment (where dev is present) or a cloud environment (spin).
|
|
1262
|
-
* @returns {boolean} True if the CLI is used in a Shopify environment.
|
|
1263
|
-
*/
|
|
1264
|
-
declare function isShopify(env?: NodeJS.ProcessEnv): Promise<boolean>;
|
|
1265
|
-
/**
|
|
1266
|
-
* This variable is used when running unit tests to indicate that the CLI's business logic
|
|
1267
|
-
* is run as a subject of a unit test. We can use this variable to disable output through
|
|
1268
|
-
* the standard streams.
|
|
1269
|
-
* @param env The environment variables from the environment of the current process.
|
|
1270
|
-
* @returns True if the SHOPIFY_UNIT_TEST environment variable is truthy.
|
|
1271
|
-
*/
|
|
1272
|
-
declare function isUnitTest(env?: NodeJS.ProcessEnv): boolean;
|
|
1273
|
-
/**
|
|
1274
|
-
* Returns true if reporting analytics is enabled.
|
|
1275
|
-
* @param env The environment variables from the environment of the current process.
|
|
1276
|
-
* @returns true unless SHOPIFY_CLI_NO_ANALYTICS is truthy.
|
|
1277
|
-
*/
|
|
1278
|
-
declare function analyticsDisabled(env?: NodeJS.ProcessEnv): boolean;
|
|
1279
|
-
/**
|
|
1280
|
-
* Returns whether the environment has Git available.
|
|
1281
|
-
* @returns {Promise<boolean>} A promise that resolves with the value.
|
|
1282
|
-
*/
|
|
1283
|
-
declare function hasGit(): Promise<boolean>;
|
|
1284
|
-
|
|
1285
|
-
declare const local_isTerminalInteractive: typeof isTerminalInteractive;
|
|
1286
|
-
declare const local_homeDirectory: typeof homeDirectory;
|
|
1287
|
-
declare const local_isDebug: typeof isDebug;
|
|
1288
|
-
declare const local_isVerbose: typeof isVerbose;
|
|
1289
|
-
declare const local_isShopify: typeof isShopify;
|
|
1290
|
-
declare const local_isUnitTest: typeof isUnitTest;
|
|
1291
|
-
declare const local_analyticsDisabled: typeof analyticsDisabled;
|
|
1292
|
-
declare const local_hasGit: typeof hasGit;
|
|
1293
|
-
declare namespace local {
|
|
1294
|
-
export {
|
|
1295
|
-
local_isTerminalInteractive as isTerminalInteractive,
|
|
1296
|
-
local_homeDirectory as homeDirectory,
|
|
1297
|
-
local_isDebug as isDebug,
|
|
1298
|
-
local_isVerbose as isVerbose,
|
|
1299
|
-
local_isShopify as isShopify,
|
|
1300
|
-
local_isUnitTest as isUnitTest,
|
|
1301
|
-
local_analyticsDisabled as analyticsDisabled,
|
|
1302
|
-
local_hasGit as hasGit,
|
|
1303
|
-
};
|
|
1304
|
-
}
|
|
1305
|
-
|
|
1306
|
-
/**
|
|
1307
|
-
* Enum that represents the environment to use for a given service.
|
|
1308
|
-
* @readonly
|
|
1309
|
-
* @enum {number}
|
|
1310
|
-
*/
|
|
1311
|
-
declare enum Environment {
|
|
1312
|
-
Local = "local",
|
|
1313
|
-
Production = "production",
|
|
1314
|
-
Spin = "spin"
|
|
1315
|
-
}
|
|
1316
|
-
|
|
1317
|
-
/**
|
|
1318
|
-
* Returns the environment to be used for the interactions with the partners' CLI API.
|
|
1319
|
-
* @param env The environment variables from the environment of the current process.
|
|
1320
|
-
*/
|
|
1321
|
-
declare function partners$1(env?: NodeJS.ProcessEnv): Environment;
|
|
1322
|
-
/**
|
|
1323
|
-
* Returns the environment to be used for the interactions with the admin API.
|
|
1324
|
-
* @param env The environment variables from the environment of the current process.
|
|
1325
|
-
*/
|
|
1326
|
-
declare function shopify$1(env?: NodeJS.ProcessEnv): Environment;
|
|
1327
|
-
/**
|
|
1328
|
-
* Returns the environment to be used for the interactions with identity.
|
|
1329
|
-
* @param env The environment variables from the environment of the current process.
|
|
1330
|
-
*/
|
|
1331
|
-
declare function identity$1(env?: NodeJS.ProcessEnv): Environment;
|
|
1332
|
-
|
|
1333
|
-
declare namespace service {
|
|
1334
|
-
export {
|
|
1335
|
-
partners$1 as partners,
|
|
1336
|
-
shopify$1 as shopify,
|
|
1337
|
-
identity$1 as identity,
|
|
1338
|
-
};
|
|
1339
|
-
}
|
|
1340
|
-
|
|
1341
|
-
declare const CouldntObtainPartnersSpinFQDNError: Abort;
|
|
1342
|
-
declare const CouldntObtainIdentitySpinFQDNError: Abort;
|
|
1343
|
-
declare const CouldntObtainShopifySpinFQDNError: Abort;
|
|
1344
|
-
declare const NotProvidedStoreFQDNError: Abort;
|
|
1345
|
-
/**
|
|
1346
|
-
* It returns the Partners' API service we should interact with.
|
|
1347
|
-
* @returns {string} Fully-qualified domain of the partners service we should interact with.
|
|
1348
|
-
*/
|
|
1349
|
-
declare function partners(): Promise<string>;
|
|
1350
|
-
/**
|
|
1351
|
-
* It returns the Identity service we should interact with.
|
|
1352
|
-
* @returns {string} Fully-qualified domain of the Identity service we should interact with.
|
|
1353
|
-
*/
|
|
1354
|
-
declare function identity(): Promise<string>;
|
|
1355
|
-
/**
|
|
1356
|
-
* It returns the Shopify service we should interact with.
|
|
1357
|
-
* Note the same fqdn is sued for the Admin and the Storefront Renderer APIs.
|
|
1358
|
-
* @returns {string} Fully-qualified domain of the Shopify service we should interact with.
|
|
1359
|
-
*/
|
|
1360
|
-
declare function shopify(options?: {
|
|
1361
|
-
storeFqdn?: string;
|
|
1362
|
-
}): Promise<string>;
|
|
1363
|
-
|
|
1364
|
-
declare const fqdn_CouldntObtainPartnersSpinFQDNError: typeof CouldntObtainPartnersSpinFQDNError;
|
|
1365
|
-
declare const fqdn_CouldntObtainIdentitySpinFQDNError: typeof CouldntObtainIdentitySpinFQDNError;
|
|
1366
|
-
declare const fqdn_CouldntObtainShopifySpinFQDNError: typeof CouldntObtainShopifySpinFQDNError;
|
|
1367
|
-
declare const fqdn_NotProvidedStoreFQDNError: typeof NotProvidedStoreFQDNError;
|
|
1368
|
-
declare const fqdn_partners: typeof partners;
|
|
1369
|
-
declare const fqdn_identity: typeof identity;
|
|
1370
|
-
declare const fqdn_shopify: typeof shopify;
|
|
1371
|
-
declare namespace fqdn {
|
|
1372
|
-
export {
|
|
1373
|
-
fqdn_CouldntObtainPartnersSpinFQDNError as CouldntObtainPartnersSpinFQDNError,
|
|
1374
|
-
fqdn_CouldntObtainIdentitySpinFQDNError as CouldntObtainIdentitySpinFQDNError,
|
|
1375
|
-
fqdn_CouldntObtainShopifySpinFQDNError as CouldntObtainShopifySpinFQDNError,
|
|
1376
|
-
fqdn_NotProvidedStoreFQDNError as NotProvidedStoreFQDNError,
|
|
1377
|
-
fqdn_partners as partners,
|
|
1378
|
-
fqdn_identity as identity,
|
|
1379
|
-
fqdn_shopify as shopify,
|
|
1380
|
-
};
|
|
1381
|
-
}
|
|
1382
|
-
|
|
1383
|
-
/**
|
|
1384
|
-
* Returns whether an environment variable value represents a truthy value.
|
|
1385
|
-
* @param variable {string | undefined} Given a environment variable value, it returns true if it represents a truthy value.
|
|
1386
|
-
* @returns {boolean}
|
|
1387
|
-
*/
|
|
1388
|
-
declare function isTruthy(variable: string | undefined): boolean;
|
|
1389
|
-
|
|
1390
|
-
declare const utilities_isTruthy: typeof isTruthy;
|
|
1391
|
-
declare namespace utilities {
|
|
1392
|
-
export {
|
|
1393
|
-
utilities_isTruthy as isTruthy,
|
|
1394
|
-
};
|
|
1395
|
-
}
|
|
1396
|
-
|
|
1397
|
-
declare const environment_local: typeof local;
|
|
1398
|
-
declare const environment_service: typeof service;
|
|
1399
|
-
declare const environment_fqdn: typeof fqdn;
|
|
1400
|
-
declare const environment_utilities: typeof utilities;
|
|
1401
|
-
declare namespace environment {
|
|
1402
|
-
export {
|
|
1403
|
-
environment_local as local,
|
|
1404
|
-
environment_service as service,
|
|
1405
|
-
environment_fqdn as fqdn,
|
|
1406
|
-
environment_utilities as utilities,
|
|
1407
|
-
};
|
|
1408
|
-
}
|
|
1409
|
-
|
|
1410
|
-
declare function stripUp(path: string, strip: number): string;
|
|
1411
|
-
/**
|
|
1412
|
-
* Creates a temporary directory and ties its lifecycle ot the lifecycle of the callback.
|
|
1413
|
-
* @param callback - The callback that receives the temporary directory.
|
|
1414
|
-
*/
|
|
1415
|
-
declare function inTemporaryDirectory<T>(callback: (tmpDir: string) => T | Promise<T>): Promise<T>;
|
|
1416
|
-
/**
|
|
1417
|
-
* It reads a file and returns its content as a string using the
|
|
1418
|
-
* utf-8 encoding
|
|
1419
|
-
* @param path {string} Path to the file to read.
|
|
1420
|
-
* @returns {Promise<string>} A promise that resolves with the content of the file.
|
|
1421
|
-
*/
|
|
1422
|
-
declare function read(path: string, options?: object): Promise<string>;
|
|
1423
|
-
declare function readSync(path: string, options?: object): string;
|
|
1424
|
-
/**
|
|
1425
|
-
* Copies a file
|
|
1426
|
-
* @param from {string} Path to the directory or file to be copied.
|
|
1427
|
-
* @param to {string} Destination path.
|
|
1428
|
-
*/
|
|
1429
|
-
declare function copy(from: string, to: string): Promise<void>;
|
|
1430
|
-
declare function touch(path: string): Promise<void>;
|
|
1431
|
-
declare function write(path: string, data: string): Promise<void>;
|
|
1432
|
-
declare function writeSync(path: string, data: string): void;
|
|
1433
|
-
declare function append(path: string, data: string): Promise<void>;
|
|
1434
|
-
declare function mkdir(path: string): Promise<void>;
|
|
1435
|
-
declare function mkdirSync(path: string): void;
|
|
1436
|
-
declare function remove$1(path: string): Promise<void>;
|
|
1437
|
-
declare function rmdir(path: string, { force }?: {
|
|
1438
|
-
force?: boolean;
|
|
1439
|
-
}): Promise<void>;
|
|
1440
|
-
declare function mkTmpDir(): Promise<string>;
|
|
1441
|
-
declare function isDirectory(path: string): Promise<boolean>;
|
|
1442
|
-
declare function size(path: string): Promise<number>;
|
|
1443
|
-
declare function sizeSync(path: string): number;
|
|
1444
|
-
/**
|
|
1445
|
-
* Moves a file.
|
|
1446
|
-
* @param src {string} File to be moved.
|
|
1447
|
-
* @param dest {string} Path to be moved to.
|
|
1448
|
-
* @param options {object} Moving options.
|
|
1449
|
-
*/
|
|
1450
|
-
declare function move(src: string, dest: string, options?: {
|
|
1451
|
-
overwrite?: boolean;
|
|
1452
|
-
}): Promise<void>;
|
|
1453
|
-
/**
|
|
1454
|
-
* Changes the permissions of a directory or file.
|
|
1455
|
-
* @param path {string} Path to the file or directory whose permissions will be modified.
|
|
1456
|
-
* @param mode {string | numbers} Permissions to set to the file or directory.
|
|
1457
|
-
*/
|
|
1458
|
-
declare function chmod(path: string, mode: number | string): Promise<void>;
|
|
1459
|
-
/**
|
|
1460
|
-
* Checks if a file has executable permissions.
|
|
1461
|
-
* @param path {string} Path to the file whose permissions will be checked.
|
|
1462
|
-
*/
|
|
1463
|
-
declare function hasExecutablePermissions(path: string): Promise<boolean>;
|
|
1464
|
-
/**
|
|
1465
|
-
* Returns true if a file or directory exists
|
|
1466
|
-
* @param path {string} Path to the directory or file.
|
|
1467
|
-
* @returns {boolean} True if it exists.
|
|
1468
|
-
*/
|
|
1469
|
-
declare function exists(path: string): Promise<boolean>;
|
|
1470
|
-
/**
|
|
1471
|
-
* Format a string using prettier. Return the formatted content.
|
|
1472
|
-
*/
|
|
1473
|
-
declare function format(content: string, options: {
|
|
1474
|
-
path: string;
|
|
1475
|
-
}): Promise<string>;
|
|
1476
|
-
|
|
1477
|
-
declare const file_stripUp: typeof stripUp;
|
|
1478
|
-
declare const file_inTemporaryDirectory: typeof inTemporaryDirectory;
|
|
1479
|
-
declare const file_read: typeof read;
|
|
1480
|
-
declare const file_readSync: typeof readSync;
|
|
1481
|
-
declare const file_copy: typeof copy;
|
|
1482
|
-
declare const file_touch: typeof touch;
|
|
1483
|
-
declare const file_write: typeof write;
|
|
1484
|
-
declare const file_writeSync: typeof writeSync;
|
|
1485
|
-
declare const file_append: typeof append;
|
|
1486
|
-
declare const file_mkdir: typeof mkdir;
|
|
1487
|
-
declare const file_mkdirSync: typeof mkdirSync;
|
|
1488
|
-
declare const file_rmdir: typeof rmdir;
|
|
1489
|
-
declare const file_mkTmpDir: typeof mkTmpDir;
|
|
1490
|
-
declare const file_isDirectory: typeof isDirectory;
|
|
1491
|
-
declare const file_size: typeof size;
|
|
1492
|
-
declare const file_sizeSync: typeof sizeSync;
|
|
1493
|
-
declare const file_move: typeof move;
|
|
1494
|
-
declare const file_chmod: typeof chmod;
|
|
1495
|
-
declare const file_hasExecutablePermissions: typeof hasExecutablePermissions;
|
|
1496
|
-
declare const file_exists: typeof exists;
|
|
1497
|
-
declare const file_format: typeof format;
|
|
1498
|
-
declare namespace file {
|
|
1499
|
-
export {
|
|
1500
|
-
file_stripUp as stripUp,
|
|
1501
|
-
file_inTemporaryDirectory as inTemporaryDirectory,
|
|
1502
|
-
file_read as read,
|
|
1503
|
-
file_readSync as readSync,
|
|
1504
|
-
file_copy as copy,
|
|
1505
|
-
file_touch as touch,
|
|
1506
|
-
file_write as write,
|
|
1507
|
-
file_writeSync as writeSync,
|
|
1508
|
-
file_append as append,
|
|
1509
|
-
file_mkdir as mkdir,
|
|
1510
|
-
file_mkdirSync as mkdirSync,
|
|
1511
|
-
remove$1 as remove,
|
|
1512
|
-
file_rmdir as rmdir,
|
|
1513
|
-
file_mkTmpDir as mkTmpDir,
|
|
1514
|
-
file_isDirectory as isDirectory,
|
|
1515
|
-
file_size as size,
|
|
1516
|
-
file_sizeSync as sizeSync,
|
|
1517
|
-
file_move as move,
|
|
1518
|
-
file_chmod as chmod,
|
|
1519
|
-
file_hasExecutablePermissions as hasExecutablePermissions,
|
|
1520
|
-
file_exists as exists,
|
|
1521
|
-
file_format as format,
|
|
1522
|
-
};
|
|
1523
|
-
}
|
|
1524
|
-
|
|
1525
|
-
declare const factory: simple_git.SimpleGitFactory;
|
|
1526
|
-
declare const GitNotPresentError: () => Abort;
|
|
1527
|
-
declare function initializeRepository(directory: string): Promise<void>;
|
|
1528
|
-
declare function downloadRepository({ repoUrl, destination, progressUpdater, shallow, }: {
|
|
1529
|
-
repoUrl: string;
|
|
1530
|
-
destination: string;
|
|
1531
|
-
progressUpdater?: (statusString: string) => void;
|
|
1532
|
-
shallow?: boolean;
|
|
1533
|
-
}): Promise<void>;
|
|
1534
|
-
/**
|
|
1535
|
-
* If "git" is not present in the environment it throws
|
|
1536
|
-
* an abort error.
|
|
1537
|
-
*/
|
|
1538
|
-
declare function ensurePresentOrAbort(): Promise<void>;
|
|
1539
|
-
|
|
1540
|
-
declare const git_factory: typeof factory;
|
|
1541
|
-
declare const git_GitNotPresentError: typeof GitNotPresentError;
|
|
1542
|
-
declare const git_initializeRepository: typeof initializeRepository;
|
|
1543
|
-
declare const git_downloadRepository: typeof downloadRepository;
|
|
1544
|
-
declare const git_ensurePresentOrAbort: typeof ensurePresentOrAbort;
|
|
1545
|
-
declare namespace git {
|
|
1546
|
-
export {
|
|
1547
|
-
git_factory as factory,
|
|
1548
|
-
git_GitNotPresentError as GitNotPresentError,
|
|
1549
|
-
git_initializeRepository as initializeRepository,
|
|
1550
|
-
git_downloadRepository as downloadRepository,
|
|
1551
|
-
git_ensurePresentOrAbort as ensurePresentOrAbort,
|
|
1552
|
-
};
|
|
1553
|
-
}
|
|
1554
|
-
|
|
1555
|
-
interface GithubRelease {
|
|
1556
|
-
id: number;
|
|
1557
|
-
url: string;
|
|
1558
|
-
tag_name: string;
|
|
1559
|
-
name: string;
|
|
1560
|
-
body: string;
|
|
1561
|
-
draft: boolean;
|
|
1562
|
-
prerelease: boolean;
|
|
1563
|
-
created_at: string;
|
|
1564
|
-
published_at: string;
|
|
1565
|
-
tarball_url: string;
|
|
1566
|
-
}
|
|
1567
|
-
interface Options {
|
|
1568
|
-
filter: (release: GithubRelease) => boolean;
|
|
1569
|
-
}
|
|
1570
|
-
declare function getLatestRelease(user: string, repo: string, { filter }?: Options): Promise<GithubRelease>;
|
|
1571
|
-
declare function parseRepoUrl(src: string): {
|
|
1572
|
-
full: string;
|
|
1573
|
-
site: string;
|
|
1574
|
-
user: string;
|
|
1575
|
-
name: string;
|
|
1576
|
-
ref: string;
|
|
1577
|
-
subDirectory: string;
|
|
1578
|
-
ssh: string;
|
|
1579
|
-
http: string;
|
|
1580
|
-
};
|
|
1581
|
-
interface GithubRepoReference {
|
|
1582
|
-
repoBaseUrl: string;
|
|
1583
|
-
branch?: string;
|
|
1584
|
-
filePath?: string;
|
|
1585
|
-
}
|
|
1586
|
-
declare function parseGithubRepoReference(src: string): GithubRepoReference;
|
|
1587
|
-
|
|
1588
|
-
type github_GithubRelease = GithubRelease;
|
|
1589
|
-
declare const github_getLatestRelease: typeof getLatestRelease;
|
|
1590
|
-
declare const github_parseRepoUrl: typeof parseRepoUrl;
|
|
1591
|
-
type github_GithubRepoReference = GithubRepoReference;
|
|
1592
|
-
declare const github_parseGithubRepoReference: typeof parseGithubRepoReference;
|
|
1593
|
-
declare namespace github {
|
|
1594
|
-
export {
|
|
1595
|
-
github_GithubRelease as GithubRelease,
|
|
1596
|
-
github_getLatestRelease as getLatestRelease,
|
|
1597
|
-
github_parseRepoUrl as parseRepoUrl,
|
|
1598
|
-
github_GithubRepoReference as GithubRepoReference,
|
|
1599
|
-
github_parseGithubRepoReference as parseGithubRepoReference,
|
|
1600
|
-
};
|
|
1601
|
-
}
|
|
1602
|
-
|
|
1603
|
-
declare function generate(suffix: string): string;
|
|
1604
|
-
|
|
1605
|
-
declare const haiku_generate: typeof generate;
|
|
1606
|
-
declare namespace haiku {
|
|
1607
|
-
export {
|
|
1608
|
-
haiku_generate as generate,
|
|
1609
|
-
};
|
|
1610
|
-
}
|
|
1611
|
-
|
|
1612
|
-
declare type Response = ReturnType<typeof nodeFetch>;
|
|
1613
|
-
/**
|
|
1614
|
-
* An interface that abstracts way node-fetch. When Node has built-in
|
|
1615
|
-
* support for "fetch" in the standard library, we can drop the node-fetch
|
|
1616
|
-
* dependency from here.
|
|
1617
|
-
* Note that we are exposing types from "node-fetch". The reason being is that
|
|
1618
|
-
* they are consistent with the Web API so if we drop node-fetch in the future
|
|
1619
|
-
* it won't require changes from the callers.
|
|
1620
|
-
* @param url {RequestInfo} This defines the resource that you wish to fetch.
|
|
1621
|
-
* @param init {RequestInit} An object containing any custom settings that you want to apply to the request
|
|
1622
|
-
* @returns A promise that resolves with the response.
|
|
1623
|
-
*/
|
|
1624
|
-
declare function fetch(url: RequestInfo, init?: RequestInit): Response;
|
|
1625
|
-
|
|
1626
|
-
declare function formData(): FormData;
|
|
1627
|
-
|
|
1628
|
-
declare const http_fetch: typeof fetch;
|
|
1629
|
-
declare const http_formData: typeof formData;
|
|
1630
|
-
declare namespace http {
|
|
1631
|
-
export {
|
|
1632
|
-
http_fetch as fetch,
|
|
1633
|
-
http_formData as formData,
|
|
1634
|
-
};
|
|
1635
|
-
}
|
|
1636
|
-
|
|
1637
|
-
/**
|
|
1638
|
-
* Generates and returns a random UUID.
|
|
1639
|
-
* @returns {string} The random UUID generated.
|
|
1640
|
-
*/
|
|
1641
|
-
declare const generateRandomUUID: () => string;
|
|
1642
|
-
declare const generateShortId: () => string;
|
|
1643
|
-
|
|
1644
|
-
declare const id_generateRandomUUID: typeof generateRandomUUID;
|
|
1645
|
-
declare const id_generateShortId: typeof generateShortId;
|
|
1646
|
-
declare namespace id {
|
|
1647
|
-
export {
|
|
1648
|
-
id_generateRandomUUID as generateRandomUUID,
|
|
1649
|
-
id_generateShortId as generateShortId,
|
|
1650
|
-
};
|
|
1651
|
-
}
|
|
1652
|
-
|
|
1653
|
-
interface JSON {
|
|
1654
|
-
[key: string]: JSONValue;
|
|
1655
|
-
}
|
|
1656
|
-
declare type JSONValue = string | number | boolean | JSON | JSONValue[];
|
|
1657
|
-
interface PackageJSON extends JSON {
|
|
1658
|
-
name: string;
|
|
1659
|
-
author: string;
|
|
1660
|
-
dependencies: {
|
|
1661
|
-
[key: string]: string;
|
|
1662
|
-
};
|
|
1663
|
-
devDependencies: {
|
|
1664
|
-
[key: string]: string;
|
|
1665
|
-
};
|
|
1666
|
-
resolutions: {
|
|
1667
|
-
[key: string]: string;
|
|
1668
|
-
};
|
|
1669
|
-
overrides: {
|
|
1670
|
-
[key: string]: string;
|
|
1671
|
-
};
|
|
1672
|
-
scripts: {
|
|
1673
|
-
[key: string]: string;
|
|
1674
|
-
};
|
|
1675
|
-
}
|
|
1676
|
-
declare function readPackageJSON(directory: string): Promise<PackageJSON>;
|
|
1677
|
-
declare function writePackageJSON(directory: string, packageJSON: JSON): Promise<void>;
|
|
1678
|
-
declare function updateAppData(packageJSON: JSON, name: string): Promise<void>;
|
|
1679
|
-
|
|
1680
|
-
type npm_PackageJSON = PackageJSON;
|
|
1681
|
-
declare const npm_readPackageJSON: typeof readPackageJSON;
|
|
1682
|
-
declare const npm_writePackageJSON: typeof writePackageJSON;
|
|
1683
|
-
declare const npm_updateAppData: typeof updateAppData;
|
|
1684
|
-
declare namespace npm {
|
|
1685
|
-
export {
|
|
1686
|
-
npm_PackageJSON as PackageJSON,
|
|
1687
|
-
npm_readPackageJSON as readPackageJSON,
|
|
1688
|
-
npm_writePackageJSON as writePackageJSON,
|
|
1689
|
-
npm_updateAppData as updateAppData,
|
|
1690
|
-
};
|
|
1691
|
-
}
|
|
1692
|
-
|
|
1693
|
-
declare const username: (platform?: typeof platform) => Promise<string | null>;
|
|
1694
|
-
/**
|
|
1695
|
-
* Returns the platform and architecture.
|
|
1696
|
-
* @returns {{platform: string, arch: string}} Returns the current platform and architecture.
|
|
1697
|
-
*/
|
|
1698
|
-
declare const platformAndArch: (platform?: typeof platform) => {
|
|
1699
|
-
platform: string;
|
|
1700
|
-
arch: string;
|
|
1701
|
-
};
|
|
1702
|
-
|
|
1703
|
-
declare const os_username: typeof username;
|
|
1704
|
-
declare const os_platformAndArch: typeof platformAndArch;
|
|
1705
|
-
declare namespace os {
|
|
1706
|
-
export {
|
|
1707
|
-
os_username as username,
|
|
1708
|
-
os_platformAndArch as platformAndArch,
|
|
1709
|
-
};
|
|
1710
|
-
}
|
|
1711
|
-
|
|
1712
|
-
/**
|
|
1713
|
-
* Given an absolute filesystem path, it makes it relative to
|
|
1714
|
-
* the current working directory. This is useful when logging paths
|
|
1715
|
-
* to allow the users to click on the file and let the OS open it
|
|
1716
|
-
* in the editor of choice.
|
|
1717
|
-
* @param path {string} Path to relativize
|
|
1718
|
-
* @returns {string} Relativized path.
|
|
1719
|
-
*/
|
|
1720
|
-
declare function relativize(path: string): string;
|
|
1721
|
-
/**
|
|
1722
|
-
* Given a module's import.meta.url it returns the directory containing the module.
|
|
1723
|
-
* @param moduleURL {string} The value of import.meta.url in the context of the caller module.
|
|
1724
|
-
* @returns {string} The path to the directory containing the caller module.
|
|
1725
|
-
*/
|
|
1726
|
-
declare function moduleDirectory(moduleURL: string): string;
|
|
1727
|
-
|
|
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]);
|
|
1736
|
-
|
|
1737
|
-
interface TunnelPlugin {
|
|
1738
|
-
start: (options: TunnelStartOptions) => Promise<string>;
|
|
1739
|
-
}
|
|
1740
|
-
interface TunnelStartOptions {
|
|
1741
|
-
port: number;
|
|
1742
|
-
}
|
|
1743
|
-
declare function lookupTunnelPlugin(plugins: Plugin[]): Promise<TunnelPlugin | undefined>;
|
|
1744
|
-
|
|
1745
|
-
declare const plugins_lookupTunnelPlugin: typeof lookupTunnelPlugin;
|
|
1746
|
-
declare namespace plugins {
|
|
1747
|
-
export {
|
|
1748
|
-
plugins_lookupTunnelPlugin as lookupTunnelPlugin,
|
|
1749
|
-
};
|
|
1750
|
-
}
|
|
1751
|
-
|
|
1752
|
-
/**
|
|
1753
|
-
* Returns an available port in the current environment.
|
|
1754
|
-
* @returns {Promise<number>} A promise that resolves with an availabe port.
|
|
1755
|
-
*/
|
|
1756
|
-
declare function getRandomPort(): Promise<number>;
|
|
1757
|
-
|
|
1758
|
-
declare const port_getRandomPort: typeof getRandomPort;
|
|
1759
|
-
declare namespace port {
|
|
1760
|
-
export {
|
|
1761
|
-
port_getRandomPort as getRandomPort,
|
|
1762
|
-
};
|
|
1763
|
-
}
|
|
1764
|
-
|
|
1765
|
-
/**
|
|
1766
|
-
* Execute CLI 2.0 commands.
|
|
1767
|
-
* Installs a version of RubyCLI as a vendor dependency in a hidden folder in the system.
|
|
1768
|
-
* User must have a valid ruby+bundler environment to run any command.
|
|
1769
|
-
*
|
|
1770
|
-
* @param args {string[]} List of argumets to execute. (ex: ['theme', 'pull'])
|
|
1771
|
-
* @param adminSession {AdminSession} Contains token and store to pass to CLI 2.0, which will be set as environment variables
|
|
1772
|
-
*/
|
|
1773
|
-
declare function execCLI(args: string[], adminSession?: AdminSession): Promise<void>;
|
|
1774
|
-
interface ExecThemeCheckCLIOptions {
|
|
1775
|
-
directories: string[];
|
|
1776
|
-
args?: string[];
|
|
1777
|
-
stdout: Writable;
|
|
1778
|
-
stderr: Writable;
|
|
1779
|
-
}
|
|
1780
|
-
declare function execThemeCheckCLI({ directories, args, stdout, stderr, }: ExecThemeCheckCLIOptions): Promise<void[]>;
|
|
1781
|
-
declare function version$1(): Promise<string | undefined>;
|
|
1782
|
-
|
|
1783
|
-
declare const ruby_execCLI: typeof execCLI;
|
|
1784
|
-
declare const ruby_execThemeCheckCLI: typeof execThemeCheckCLI;
|
|
1785
|
-
declare namespace ruby {
|
|
1786
|
-
export {
|
|
1787
|
-
ruby_execCLI as execCLI,
|
|
1788
|
-
ruby_execThemeCheckCLI as execThemeCheckCLI,
|
|
1789
|
-
version$1 as version,
|
|
1790
|
-
};
|
|
1791
|
-
}
|
|
1792
|
-
|
|
1793
|
-
declare namespace schema {
|
|
1794
|
-
export {
|
|
1795
|
-
z as define,
|
|
1796
|
-
};
|
|
1797
|
-
}
|
|
1798
|
-
|
|
1799
|
-
declare const semver_coerce: typeof coerce;
|
|
1800
|
-
declare namespace semver {
|
|
1801
|
-
export {
|
|
1802
|
-
semver$1 as Version,
|
|
1803
|
-
semver_coerce as coerce,
|
|
1804
|
-
};
|
|
1805
|
-
}
|
|
1806
|
-
|
|
1807
|
-
interface CachedAppInfo {
|
|
1808
|
-
directory: string;
|
|
1809
|
-
appId: string;
|
|
1810
|
-
title?: string;
|
|
1811
|
-
orgId?: string;
|
|
1812
|
-
storeFqdn?: string;
|
|
1813
|
-
}
|
|
1814
|
-
interface ConfSchema {
|
|
1815
|
-
appInfo: CachedAppInfo[];
|
|
1816
|
-
themeStore: string;
|
|
1817
|
-
}
|
|
1818
|
-
declare const cliKit: Conf<ConfSchema>;
|
|
1819
|
-
declare function remove(): void;
|
|
1820
|
-
declare function getAppInfo(directory: string): CachedAppInfo | undefined;
|
|
1821
|
-
declare function setAppInfo(options: {
|
|
1822
|
-
directory: string;
|
|
1823
|
-
appId: string;
|
|
1824
|
-
title?: string;
|
|
1825
|
-
storeFqdn?: string;
|
|
1826
|
-
orgId?: string;
|
|
1827
|
-
}): void;
|
|
1828
|
-
declare function clearAppInfo(directory: string): void;
|
|
1829
|
-
declare function getThemeStore(): string | undefined;
|
|
1830
|
-
declare function setThemeStore(store: string): void;
|
|
1831
|
-
|
|
1832
|
-
type store_CachedAppInfo = CachedAppInfo;
|
|
1833
|
-
declare const store_cliKit: typeof cliKit;
|
|
1834
|
-
declare const store_remove: typeof remove;
|
|
1835
|
-
declare const store_getAppInfo: typeof getAppInfo;
|
|
1836
|
-
declare const store_setAppInfo: typeof setAppInfo;
|
|
1837
|
-
declare const store_clearAppInfo: typeof clearAppInfo;
|
|
1838
|
-
declare const store_getThemeStore: typeof getThemeStore;
|
|
1839
|
-
declare const store_setThemeStore: typeof setThemeStore;
|
|
1840
|
-
declare namespace store {
|
|
1841
|
-
export {
|
|
1842
|
-
store_CachedAppInfo as CachedAppInfo,
|
|
1843
|
-
store_cliKit as cliKit,
|
|
1844
|
-
store_remove as remove,
|
|
1845
|
-
store_getAppInfo as getAppInfo,
|
|
1846
|
-
store_setAppInfo as setAppInfo,
|
|
1847
|
-
store_clearAppInfo as clearAppInfo,
|
|
1848
|
-
store_getThemeStore as getThemeStore,
|
|
1849
|
-
store_setThemeStore as setThemeStore,
|
|
1850
|
-
};
|
|
1851
|
-
}
|
|
1852
|
-
|
|
1853
|
-
/** Returns a random string */
|
|
1854
|
-
declare function randomHex(size: number): string;
|
|
1855
|
-
declare function generateRandomChallengePair(): {
|
|
1856
|
-
codeVerifier: string;
|
|
1857
|
-
codeChallenge: string;
|
|
1858
|
-
};
|
|
1859
|
-
/**
|
|
1860
|
-
* Given a string, it returns it with the first letter capitalized.
|
|
1861
|
-
* @param string {string} String whose first letter will be caplitalized.
|
|
1862
|
-
* @returns The given string with its first letter capitalized.
|
|
1863
|
-
*/
|
|
1864
|
-
declare function capitalize(string: string): string;
|
|
1865
|
-
/**
|
|
1866
|
-
* Given a store, returns a valid store fqdn removing protocol and adding .myshopify.com domain
|
|
1867
|
-
* @param store Original store name provided by the user
|
|
1868
|
-
* @returns a valid store fqdn
|
|
1869
|
-
*/
|
|
1870
|
-
declare function normalizeStoreName(store: string): string;
|
|
1871
|
-
|
|
1872
|
-
declare const string_randomHex: typeof randomHex;
|
|
1873
|
-
declare const string_generateRandomChallengePair: typeof generateRandomChallengePair;
|
|
1874
|
-
declare const string_capitalize: typeof capitalize;
|
|
1875
|
-
declare const string_normalizeStoreName: typeof normalizeStoreName;
|
|
1876
|
-
declare namespace string {
|
|
1877
|
-
export {
|
|
1878
|
-
string_randomHex as randomHex,
|
|
1879
|
-
string_generateRandomChallengePair as generateRandomChallengePair,
|
|
1880
|
-
string_capitalize as capitalize,
|
|
1881
|
-
string_normalizeStoreName as normalizeStoreName,
|
|
1882
|
-
camelCase as camelize,
|
|
1883
|
-
paramCase as hyphenize,
|
|
1884
|
-
snakeCase as underscore,
|
|
1885
|
-
constantCase as constantize,
|
|
1886
|
-
};
|
|
1887
|
-
}
|
|
1888
|
-
|
|
1889
|
-
interface ExecOptions {
|
|
1890
|
-
cwd?: string;
|
|
1891
|
-
env?: {
|
|
1892
|
-
[key: string]: string | undefined;
|
|
1893
|
-
};
|
|
1894
|
-
stdout?: Writable | 'inherit';
|
|
1895
|
-
stderr?: Writable;
|
|
1896
|
-
stdio?: Readable | 'inherit';
|
|
1897
|
-
stdin?: string;
|
|
1898
|
-
signal?: AbortSignal;
|
|
1899
|
-
}
|
|
1900
|
-
declare type WritableExecOptions = Omit<ExecOptions, 'stdout'> & {
|
|
1901
|
-
stdout?: Writable;
|
|
1902
|
-
};
|
|
1903
|
-
declare const open: (url: string) => Promise<void>;
|
|
1904
|
-
/**
|
|
1905
|
-
* Runs a command asynchronously, aggregates the stdout data, and returns it.
|
|
1906
|
-
* @param command {string} Command to be executed.
|
|
1907
|
-
* @param args {string[]} Arguments to pass to the command.
|
|
1908
|
-
* @returns A promise that resolves with the aggregatted stdout of the command.
|
|
1909
|
-
*/
|
|
1910
|
-
declare const captureOutput: (command: string, args: string[], options?: ExecOptions) => Promise<string>;
|
|
1911
|
-
declare const exec: (command: string, args: string[], options?: ExecOptions) => Promise<void>;
|
|
1912
|
-
interface ConcurrentExecCommand {
|
|
1913
|
-
prefix: string;
|
|
1914
|
-
executable: string;
|
|
1915
|
-
args: string[];
|
|
1916
|
-
cwd: string;
|
|
1917
|
-
}
|
|
1918
|
-
/**
|
|
1919
|
-
* Runs commands concurrently and combines the standard output and error data
|
|
1920
|
-
* into a single stream that differenciates the sources using a colored prefix:
|
|
1921
|
-
*
|
|
1922
|
-
* Example:
|
|
1923
|
-
* [my-extension] Log coming from my-extension
|
|
1924
|
-
* [my-script] Log coming from my script
|
|
1925
|
-
*
|
|
1926
|
-
* If one of the processes fails, it aborts the running ones and exits with that error.
|
|
1927
|
-
* @param commands {ConcurrentExecCommand[]} Commands to execute.
|
|
1928
|
-
*/
|
|
1929
|
-
declare const concurrentExec: (commands: ConcurrentExecCommand[]) => Promise<void>;
|
|
1930
|
-
/**
|
|
1931
|
-
* Displays a large file using the terminal pager set by the user, or a
|
|
1932
|
-
* reasonable default for the user's OS:
|
|
1933
|
-
*
|
|
1934
|
-
* @param filename string The path to the file to be displayed.
|
|
1935
|
-
*/
|
|
1936
|
-
declare function page(filename: string): Promise<void>;
|
|
1937
|
-
declare function sleep(seconds: number): Promise<unknown>;
|
|
1938
|
-
|
|
1939
|
-
type system_ExecOptions = ExecOptions;
|
|
1940
|
-
type system_WritableExecOptions = WritableExecOptions;
|
|
1941
|
-
declare const system_open: typeof open;
|
|
1942
|
-
declare const system_captureOutput: typeof captureOutput;
|
|
1943
|
-
declare const system_exec: typeof exec;
|
|
1944
|
-
declare const system_concurrentExec: typeof concurrentExec;
|
|
1945
|
-
declare const system_page: typeof page;
|
|
1946
|
-
declare const system_sleep: typeof sleep;
|
|
1947
|
-
declare namespace system {
|
|
1948
|
-
export {
|
|
1949
|
-
system_ExecOptions as ExecOptions,
|
|
1950
|
-
system_WritableExecOptions as WritableExecOptions,
|
|
1951
|
-
system_open as open,
|
|
1952
|
-
system_captureOutput as captureOutput,
|
|
1953
|
-
system_exec as exec,
|
|
1954
|
-
system_concurrentExec as concurrentExec,
|
|
1955
|
-
system_page as page,
|
|
1956
|
-
system_sleep as sleep,
|
|
1957
|
-
};
|
|
1958
|
-
}
|
|
1959
|
-
|
|
1960
|
-
declare function create(templateContent: string): (data: object) => Promise<string>;
|
|
1961
|
-
/**
|
|
1962
|
-
* Given a directory, it traverses the files and directories recursively
|
|
1963
|
-
* and replaces variables in directory and file names, and files' content
|
|
1964
|
-
* using the Liquid template engine.
|
|
1965
|
-
* Files indicate that they are liquid template by using the .liquid extension.
|
|
1966
|
-
* @param from {string} Directory that contains the template.
|
|
1967
|
-
* @param to {string} Output directory.
|
|
1968
|
-
* @param data {string} Data to feed the template engine.
|
|
1969
|
-
*/
|
|
1970
|
-
declare function recursiveDirectoryCopy(from: string, to: string, data: object): Promise<void>;
|
|
1971
|
-
|
|
1972
|
-
declare const template_create: typeof create;
|
|
1973
|
-
declare const template_recursiveDirectoryCopy: typeof recursiveDirectoryCopy;
|
|
1974
|
-
declare namespace template {
|
|
1975
|
-
export {
|
|
1976
|
-
template_create as create,
|
|
1977
|
-
template_recursiveDirectoryCopy as recursiveDirectoryCopy,
|
|
1978
|
-
};
|
|
1979
|
-
}
|
|
1980
|
-
|
|
1981
|
-
/**
|
|
1982
|
-
* Creates a temporary directory and ties its lifeclcycle to the lifecycle of the callback.
|
|
1983
|
-
* @param callback {(string) => void} Callback to execute. When the callback exits, the temporary directory is destroyed.
|
|
1984
|
-
* @returns {Promise<T>} Promise that resolves with the value returned by the callback.
|
|
1985
|
-
*/
|
|
1986
|
-
declare function directory<T>(callback: (directory: string) => Promise<T>): Promise<T>;
|
|
1987
|
-
|
|
1988
|
-
declare const temporary_directory: typeof directory;
|
|
1989
|
-
declare namespace temporary {
|
|
1990
|
-
export {
|
|
1991
|
-
temporary_directory as directory,
|
|
1992
|
-
};
|
|
1993
|
-
}
|
|
1994
|
-
|
|
1995
|
-
declare function decode$1(input: string): object;
|
|
1996
|
-
declare function encode$1(content: toml$1.JsonMap): string;
|
|
1997
|
-
|
|
1998
|
-
declare namespace toml {
|
|
1999
|
-
export {
|
|
2000
|
-
decode$1 as decode,
|
|
2001
|
-
encode$1 as encode,
|
|
2002
|
-
};
|
|
2003
|
-
}
|
|
2004
|
-
|
|
2005
|
-
interface BaseQuestion<TName extends string> {
|
|
2006
|
-
name: TName;
|
|
2007
|
-
message: string;
|
|
2008
|
-
preface?: string;
|
|
2009
|
-
validate?: (value: string) => string | true;
|
|
2010
|
-
default?: string;
|
|
2011
|
-
result?: (value: string) => string | boolean;
|
|
2012
|
-
}
|
|
2013
|
-
declare type InputQuestion<TName extends string> = BaseQuestion<TName> & {
|
|
2014
|
-
type: 'input';
|
|
2015
|
-
};
|
|
2016
|
-
declare type SelectQuestion<TName extends string> = BaseQuestion<TName> & {
|
|
2017
|
-
type: 'select';
|
|
2018
|
-
choices: string[] | {
|
|
2019
|
-
name: string;
|
|
2020
|
-
value: string;
|
|
2021
|
-
}[];
|
|
2022
|
-
};
|
|
2023
|
-
declare type AutocompleteQuestion<TName extends string> = BaseQuestion<TName> & {
|
|
2024
|
-
type: 'autocomplete';
|
|
2025
|
-
choices: string[] | {
|
|
2026
|
-
name: string;
|
|
2027
|
-
value: string;
|
|
2028
|
-
}[];
|
|
2029
|
-
};
|
|
2030
|
-
declare type PasswordQuestion<TName extends string> = BaseQuestion<TName> & {
|
|
2031
|
-
type: 'password';
|
|
2032
|
-
};
|
|
2033
|
-
declare type Question<TName extends string = string> = InputQuestion<TName> | SelectQuestion<TName> | AutocompleteQuestion<TName> | PasswordQuestion<TName>;
|
|
2034
|
-
declare const prompt: <TName extends string & keyof TAnswers, TAnswers extends { [key in TName]: string; } = { [key_1 in TName]: string; }>(questions: readonly Question<TName>[], debugForceInquirer?: boolean) => Promise<TAnswers>;
|
|
2035
|
-
declare function nonEmptyDirectoryPrompt(directory: string): Promise<void>;
|
|
2036
|
-
declare const keypress: () => Promise<void>;
|
|
2037
|
-
|
|
2038
|
-
type ui_InputQuestion<TName extends string> = InputQuestion<TName>;
|
|
2039
|
-
type ui_SelectQuestion<TName extends string> = SelectQuestion<TName>;
|
|
2040
|
-
type ui_AutocompleteQuestion<TName extends string> = AutocompleteQuestion<TName>;
|
|
2041
|
-
type ui_PasswordQuestion<TName extends string> = PasswordQuestion<TName>;
|
|
2042
|
-
type ui_Question<TName extends string = string> = Question<TName>;
|
|
2043
|
-
declare const ui_prompt: typeof prompt;
|
|
2044
|
-
declare const ui_nonEmptyDirectoryPrompt: typeof nonEmptyDirectoryPrompt;
|
|
2045
|
-
declare const ui_keypress: typeof keypress;
|
|
2046
|
-
declare const ui_Listr: typeof Listr;
|
|
2047
|
-
declare const ui_ListrTaskWrapper: typeof ListrTaskWrapper;
|
|
2048
|
-
declare const ui_ListrDefaultRenderer: typeof ListrDefaultRenderer;
|
|
2049
|
-
declare const ui_ListrTask: typeof ListrTask;
|
|
2050
|
-
declare namespace ui {
|
|
2051
|
-
export {
|
|
2052
|
-
ui_InputQuestion as InputQuestion,
|
|
2053
|
-
ui_SelectQuestion as SelectQuestion,
|
|
2054
|
-
ui_AutocompleteQuestion as AutocompleteQuestion,
|
|
2055
|
-
ui_PasswordQuestion as PasswordQuestion,
|
|
2056
|
-
ui_Question as Question,
|
|
2057
|
-
ui_prompt as prompt,
|
|
2058
|
-
ui_nonEmptyDirectoryPrompt as nonEmptyDirectoryPrompt,
|
|
2059
|
-
ui_keypress as keypress,
|
|
2060
|
-
ui_Listr as Listr,
|
|
2061
|
-
ui_ListrTaskWrapper as ListrTaskWrapper,
|
|
2062
|
-
ui_ListrDefaultRenderer as ListrDefaultRenderer,
|
|
2063
|
-
ui_ListrTask as ListrTask,
|
|
2064
|
-
};
|
|
2065
|
-
}
|
|
2066
|
-
|
|
2067
|
-
/**
|
|
2068
|
-
* Returns the latest available version of an NPM package.
|
|
2069
|
-
* @param name {string} The name of the NPM package.
|
|
2070
|
-
* @returns A promise to get the latest available version of a package.
|
|
2071
|
-
*/
|
|
2072
|
-
declare function latestNpmPackageVersion(name: string): Promise<string>;
|
|
2073
|
-
declare function cliVersion(): string;
|
|
2074
|
-
|
|
2075
|
-
declare const version_latestNpmPackageVersion: typeof latestNpmPackageVersion;
|
|
2076
|
-
declare const version_cliVersion: typeof cliVersion;
|
|
2077
|
-
declare namespace version {
|
|
2078
|
-
export {
|
|
2079
|
-
version_latestNpmPackageVersion as latestNpmPackageVersion,
|
|
2080
|
-
version_cliVersion as cliVersion,
|
|
2081
|
-
};
|
|
2082
|
-
}
|
|
2083
|
-
|
|
2084
|
-
/**
|
|
2085
|
-
* Check if user editor is VS Code
|
|
2086
|
-
*/
|
|
2087
|
-
declare const isVSCode: (root?: string) => Promise<boolean>;
|
|
2088
|
-
/**
|
|
2089
|
-
* Add VSCode extension recommendations
|
|
2090
|
-
*/
|
|
2091
|
-
declare function addRecommendedExtensions(directory: string, recommendations: string[]): Promise<void>;
|
|
2092
|
-
|
|
2093
|
-
declare const vscode_isVSCode: typeof isVSCode;
|
|
2094
|
-
declare const vscode_addRecommendedExtensions: typeof addRecommendedExtensions;
|
|
2095
|
-
declare namespace vscode {
|
|
2096
|
-
export {
|
|
2097
|
-
vscode_isVSCode as isVSCode,
|
|
2098
|
-
vscode_addRecommendedExtensions as addRecommendedExtensions,
|
|
2099
|
-
};
|
|
2100
|
-
}
|
|
2101
|
-
|
|
2102
|
-
declare function decode(input: string): unknown;
|
|
2103
|
-
declare function encode(content: unknown): string;
|
|
2104
|
-
|
|
2105
|
-
declare const yaml_decode: typeof decode;
|
|
2106
|
-
declare const yaml_encode: typeof encode;
|
|
2107
|
-
declare namespace yaml {
|
|
2108
|
-
export {
|
|
2109
|
-
yaml_decode as decode,
|
|
2110
|
-
yaml_encode as encode,
|
|
2111
|
-
};
|
|
2112
|
-
}
|
|
2113
|
-
|
|
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 };
|
|
2115
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export { default as constants } from './constants.js';
|
|
2
|
+
export * as abort from './abort.js';
|
|
3
|
+
export * as analytics from './analytics.js';
|
|
4
|
+
export * as api from './api.js';
|
|
5
|
+
export * as checksum from './checksum.js';
|
|
6
|
+
export * as cli from './cli.js';
|
|
7
|
+
export * as dependency from './dependency.js';
|
|
8
|
+
export * as dotenv from './dot-env.js';
|
|
9
|
+
export * as environment from './environment.js';
|
|
10
|
+
export * as error from './error.js';
|
|
11
|
+
export * as fastify from 'fastify';
|
|
12
|
+
export * as file from './file.js';
|
|
13
|
+
export * as git from './git.js';
|
|
14
|
+
export * as github from './github.js';
|
|
15
|
+
export * as haiku from './haiku.js';
|
|
16
|
+
export * as http from './http.js';
|
|
17
|
+
export * as id from './id.js';
|
|
18
|
+
export * as npm from './npm.js';
|
|
19
|
+
export * as os from './os.js';
|
|
20
|
+
export * as output from './output.js';
|
|
21
|
+
export * as path from './path.js';
|
|
22
|
+
export * as plugins from './plugins.js';
|
|
23
|
+
export * as port from './port.js';
|
|
24
|
+
export * as ruby from './ruby.js';
|
|
25
|
+
export * as schema from './schema.js';
|
|
26
|
+
export * as semver from './semver.js';
|
|
27
|
+
export * as session from './session.js';
|
|
28
|
+
export * as store from './store.js';
|
|
29
|
+
export * as string from './string.js';
|
|
30
|
+
export * as system from './system.js';
|
|
31
|
+
export * as template from './template.js';
|
|
32
|
+
export * as toml from './toml.js';
|
|
33
|
+
export * as ui from './ui.js';
|
|
34
|
+
export * as version from './version.js';
|
|
35
|
+
export * as vscode from './vscode.js';
|
|
36
|
+
export * as yaml from './yaml.js';
|
|
37
|
+
export * as outputMocker from './testing/output.js';
|