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