eas-cli 16.16.0 → 16.17.1
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/README.md +166 -82
- package/build/commands/deploy/alias/delete.d.ts +21 -0
- package/build/commands/deploy/alias/delete.js +98 -0
- package/build/commands/deploy/alias/index.d.ts +21 -0
- package/build/commands/deploy/{alias.js → alias/index.js} +8 -8
- package/build/commands/deploy/{alias.d.ts → delete.d.ts} +4 -4
- package/build/commands/deploy/delete.js +84 -0
- package/build/credentials/ios/IosCredentialsProvider.js +1 -1
- package/build/fetch.d.ts +1 -1
- package/build/fetch.js +4 -2
- package/build/graphql/generated.d.ts +106 -0
- package/build/utils/code-signing.d.ts +1 -0
- package/build/worker/deployment.d.ts +23 -1
- package/build/worker/deployment.js +27 -1
- package/build/worker/mutations.d.ts +12 -1
- package/build/worker/mutations.js +33 -0
- package/build/worker/queries.d.ts +8 -1
- package/build/worker/queries.js +42 -0
- package/oclif.manifest.json +112 -32
- package/package.json +5 -5
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import EasCommand from '../../../commandUtils/EasCommand';
|
|
2
|
+
export default class WorkerAliasDelete extends EasCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static aliases: string[];
|
|
5
|
+
static state: string;
|
|
6
|
+
static args: {
|
|
7
|
+
name: string;
|
|
8
|
+
}[];
|
|
9
|
+
static flags: {
|
|
10
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
};
|
|
13
|
+
static contextDefinition: {
|
|
14
|
+
loggedIn: import("../../../commandUtils/context/LoggedInContextField").default;
|
|
15
|
+
projectDir: import("../../../commandUtils/context/ProjectDirContextField").default;
|
|
16
|
+
getDynamicPublicProjectConfigAsync: import("../../../commandUtils/context/DynamicProjectConfigContextField").DynamicPublicProjectConfigContextField;
|
|
17
|
+
getDynamicPrivateProjectConfigAsync: import("../../../commandUtils/context/DynamicProjectConfigContextField").DynamicPrivateProjectConfigContextField;
|
|
18
|
+
};
|
|
19
|
+
runAsync(): Promise<void>;
|
|
20
|
+
private sanitizeFlags;
|
|
21
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
5
|
+
const EasCommand_1 = tslib_1.__importDefault(require("../../../commandUtils/EasCommand"));
|
|
6
|
+
const flags_1 = require("../../../commandUtils/flags");
|
|
7
|
+
const log_1 = tslib_1.__importDefault(require("../../../log"));
|
|
8
|
+
const ora_1 = require("../../../ora");
|
|
9
|
+
const prompts_1 = require("../../../prompts");
|
|
10
|
+
const json_1 = require("../../../utils/json");
|
|
11
|
+
const deployment_1 = require("../../../worker/deployment");
|
|
12
|
+
class WorkerAliasDelete extends EasCommand_1.default {
|
|
13
|
+
static description = 'Delete deployment aliases.';
|
|
14
|
+
static aliases = ['worker:alias:delete'];
|
|
15
|
+
static state = 'preview';
|
|
16
|
+
static args = [{ name: 'ALIAS_NAME' }];
|
|
17
|
+
static flags = {
|
|
18
|
+
...flags_1.EasNonInteractiveAndJsonFlags,
|
|
19
|
+
};
|
|
20
|
+
static contextDefinition = {
|
|
21
|
+
...this.ContextOptions.DynamicProjectConfig,
|
|
22
|
+
...this.ContextOptions.ProjectDir,
|
|
23
|
+
...this.ContextOptions.LoggedIn,
|
|
24
|
+
};
|
|
25
|
+
async runAsync() {
|
|
26
|
+
const { args: { ALIAS_NAME: aliasNameFromArg }, flags: rawFlags, } = await this.parse(WorkerAliasDelete);
|
|
27
|
+
const flags = this.sanitizeFlags(rawFlags);
|
|
28
|
+
if (flags.json) {
|
|
29
|
+
(0, json_1.enableJsonOutput)();
|
|
30
|
+
}
|
|
31
|
+
log_1.default.warn('EAS Hosting is still in preview and subject to changes.');
|
|
32
|
+
const { getDynamicPrivateProjectConfigAsync, loggedIn: { graphqlClient }, } = await this.getContextAsync(WorkerAliasDelete, {
|
|
33
|
+
nonInteractive: true,
|
|
34
|
+
withServerSideEnvironment: null,
|
|
35
|
+
});
|
|
36
|
+
const { projectId } = await getDynamicPrivateProjectConfigAsync();
|
|
37
|
+
const aliasName = await resolveDeploymentAliasAsync(flags, graphqlClient, projectId, aliasNameFromArg);
|
|
38
|
+
const isProduction = !aliasName;
|
|
39
|
+
if (!flags.nonInteractive) {
|
|
40
|
+
log_1.default.addNewLineIfNone();
|
|
41
|
+
log_1.default.warn(isProduction
|
|
42
|
+
? `You are about to delete your production alias`
|
|
43
|
+
: `You are about to delete alias: "${aliasName}"`);
|
|
44
|
+
log_1.default.newLine();
|
|
45
|
+
const confirmed = await (0, prompts_1.toggleConfirmAsync)({ message: 'Are you sure you wish to proceed?' });
|
|
46
|
+
if (!confirmed) {
|
|
47
|
+
log_1.default.log('Aborted.');
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
let progress = null;
|
|
52
|
+
let deleteResult = null;
|
|
53
|
+
try {
|
|
54
|
+
progress = (0, ora_1.ora)((0, chalk_1.default) `Deleting alias {bold ${aliasName ?? 'production'}}`).start();
|
|
55
|
+
deleteResult = await (0, deployment_1.deleteWorkerDeploymentAliasAsync)({
|
|
56
|
+
graphqlClient,
|
|
57
|
+
appId: projectId,
|
|
58
|
+
aliasName,
|
|
59
|
+
});
|
|
60
|
+
progress.text = (0, chalk_1.default) `Deleted alias {bold ${aliasName ?? 'production'}}`;
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
progress?.fail((0, chalk_1.default) `Failed to delete alias {bold ${aliasName ?? 'production'}}`);
|
|
64
|
+
throw error;
|
|
65
|
+
}
|
|
66
|
+
progress?.succeed((0, chalk_1.default) `Deleted alias {bold ${aliasName ?? 'production'}}`);
|
|
67
|
+
if (flags.json) {
|
|
68
|
+
(0, json_1.printJsonOnlyOutput)({
|
|
69
|
+
aliasName: deleteResult.aliasName,
|
|
70
|
+
id: deleteResult.id,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
sanitizeFlags(flags) {
|
|
75
|
+
return {
|
|
76
|
+
nonInteractive: flags['non-interactive'],
|
|
77
|
+
json: flags['json'],
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
exports.default = WorkerAliasDelete;
|
|
82
|
+
async function resolveDeploymentAliasAsync(flags, graphqlClient, projectId, aliasNameFromArg) {
|
|
83
|
+
if (aliasNameFromArg?.trim()) {
|
|
84
|
+
return aliasNameFromArg.trim().toLowerCase();
|
|
85
|
+
}
|
|
86
|
+
if (flags.nonInteractive) {
|
|
87
|
+
throw new Error('Alias name must be provided in non-interactive mode');
|
|
88
|
+
}
|
|
89
|
+
const alias = await (0, deployment_1.selectWorkerDeploymentAliasOnAppAsync)({
|
|
90
|
+
graphqlClient,
|
|
91
|
+
appId: projectId,
|
|
92
|
+
selectTitle: 'alias to delete',
|
|
93
|
+
});
|
|
94
|
+
if (!alias) {
|
|
95
|
+
throw new Error('No aliases found for this project, create aliases with "eas deploy:alias"');
|
|
96
|
+
}
|
|
97
|
+
return alias.aliasName;
|
|
98
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import EasCommand from '../../../commandUtils/EasCommand';
|
|
2
|
+
export default class WorkerAlias extends EasCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static aliases: string[];
|
|
5
|
+
static state: string;
|
|
6
|
+
static flags: {
|
|
7
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
prod: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
alias: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
11
|
+
id: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
12
|
+
};
|
|
13
|
+
static contextDefinition: {
|
|
14
|
+
loggedIn: import("../../../commandUtils/context/LoggedInContextField").default;
|
|
15
|
+
projectDir: import("../../../commandUtils/context/ProjectDirContextField").default;
|
|
16
|
+
getDynamicPublicProjectConfigAsync: import("../../../commandUtils/context/DynamicProjectConfigContextField").DynamicPublicProjectConfigContextField;
|
|
17
|
+
getDynamicPrivateProjectConfigAsync: import("../../../commandUtils/context/DynamicProjectConfigContextField").DynamicPrivateProjectConfigContextField;
|
|
18
|
+
};
|
|
19
|
+
runAsync(): Promise<void>;
|
|
20
|
+
private sanitizeFlags;
|
|
21
|
+
}
|
|
@@ -3,14 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
5
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
6
|
-
const EasCommand_1 = tslib_1.__importDefault(require("
|
|
7
|
-
const flags_1 = require("
|
|
8
|
-
const log_1 = tslib_1.__importDefault(require("
|
|
9
|
-
const ora_1 = require("
|
|
10
|
-
const prompts_1 = require("
|
|
11
|
-
const json_1 = require("
|
|
12
|
-
const deployment_1 = require("
|
|
13
|
-
const logs_1 = require("
|
|
6
|
+
const EasCommand_1 = tslib_1.__importDefault(require("../../../commandUtils/EasCommand"));
|
|
7
|
+
const flags_1 = require("../../../commandUtils/flags");
|
|
8
|
+
const log_1 = tslib_1.__importDefault(require("../../../log"));
|
|
9
|
+
const ora_1 = require("../../../ora");
|
|
10
|
+
const prompts_1 = require("../../../prompts");
|
|
11
|
+
const json_1 = require("../../../utils/json");
|
|
12
|
+
const deployment_1 = require("../../../worker/deployment");
|
|
13
|
+
const logs_1 = require("../../../worker/utils/logs");
|
|
14
14
|
class WorkerAlias extends EasCommand_1.default {
|
|
15
15
|
static description = 'Assign deployment aliases.';
|
|
16
16
|
static aliases = ['worker:alias', 'deploy:promote'];
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import EasCommand from '../../commandUtils/EasCommand';
|
|
2
|
-
export default class
|
|
2
|
+
export default class WorkerDelete extends EasCommand {
|
|
3
3
|
static description: string;
|
|
4
4
|
static aliases: string[];
|
|
5
5
|
static state: string;
|
|
6
|
+
static args: {
|
|
7
|
+
name: string;
|
|
8
|
+
}[];
|
|
6
9
|
static flags: {
|
|
7
10
|
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
11
|
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
-
prod: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
-
alias: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
11
|
-
id: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
12
12
|
};
|
|
13
13
|
static contextDefinition: {
|
|
14
14
|
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
5
|
+
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
6
|
+
const flags_1 = require("../../commandUtils/flags");
|
|
7
|
+
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
8
|
+
const ora_1 = require("../../ora");
|
|
9
|
+
const prompts_1 = require("../../prompts");
|
|
10
|
+
const json_1 = require("../../utils/json");
|
|
11
|
+
const deployment_1 = require("../../worker/deployment");
|
|
12
|
+
class WorkerDelete extends EasCommand_1.default {
|
|
13
|
+
static description = 'Delete a deployment.';
|
|
14
|
+
static aliases = ['worker:delete'];
|
|
15
|
+
static state = 'preview';
|
|
16
|
+
static args = [{ name: 'DEPLOYMENT_ID' }];
|
|
17
|
+
static flags = {
|
|
18
|
+
...flags_1.EasNonInteractiveAndJsonFlags,
|
|
19
|
+
};
|
|
20
|
+
static contextDefinition = {
|
|
21
|
+
...this.ContextOptions.DynamicProjectConfig,
|
|
22
|
+
...this.ContextOptions.ProjectDir,
|
|
23
|
+
...this.ContextOptions.LoggedIn,
|
|
24
|
+
};
|
|
25
|
+
async runAsync() {
|
|
26
|
+
const { args: { DEPLOYMENT_ID: deploymentIdFromArg }, flags: rawFlags, } = await this.parse(WorkerDelete);
|
|
27
|
+
const flags = this.sanitizeFlags(rawFlags);
|
|
28
|
+
if (flags.json) {
|
|
29
|
+
(0, json_1.enableJsonOutput)();
|
|
30
|
+
}
|
|
31
|
+
log_1.default.warn('EAS Hosting is still in preview and subject to changes.');
|
|
32
|
+
const { getDynamicPrivateProjectConfigAsync, loggedIn: { graphqlClient }, } = await this.getContextAsync(WorkerDelete, {
|
|
33
|
+
nonInteractive: true,
|
|
34
|
+
withServerSideEnvironment: null,
|
|
35
|
+
});
|
|
36
|
+
const { projectId } = await getDynamicPrivateProjectConfigAsync();
|
|
37
|
+
if (!deploymentIdFromArg) {
|
|
38
|
+
if (flags.nonInteractive) {
|
|
39
|
+
throw new Error('Deployment ID must be provided in non-interactive mode');
|
|
40
|
+
}
|
|
41
|
+
throw new Error('Deployment ID is required');
|
|
42
|
+
}
|
|
43
|
+
if (!flags.nonInteractive) {
|
|
44
|
+
log_1.default.addNewLineIfNone();
|
|
45
|
+
log_1.default.warn(`You are about to permanently delete deployment with ID: "${deploymentIdFromArg}"` +
|
|
46
|
+
`\nThis action is irreversible.`);
|
|
47
|
+
log_1.default.newLine();
|
|
48
|
+
const confirmed = await (0, prompts_1.toggleConfirmAsync)({ message: 'Are you sure you wish to proceed?' });
|
|
49
|
+
if (!confirmed) {
|
|
50
|
+
log_1.default.log('Aborted.');
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
let progress = null;
|
|
55
|
+
let deleteResult = null;
|
|
56
|
+
try {
|
|
57
|
+
progress = (0, ora_1.ora)((0, chalk_1.default) `Deleting deployment {bold ${deploymentIdFromArg}}`).start();
|
|
58
|
+
deleteResult = await (0, deployment_1.deleteWorkerDeploymentAsync)({
|
|
59
|
+
graphqlClient,
|
|
60
|
+
appId: projectId,
|
|
61
|
+
deploymentIdentifier: deploymentIdFromArg,
|
|
62
|
+
});
|
|
63
|
+
progress.text = (0, chalk_1.default) `Deleted deployment {bold ${deploymentIdFromArg}}`;
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
progress?.fail((0, chalk_1.default) `Failed to delete deployment {bold ${deploymentIdFromArg}}`);
|
|
67
|
+
throw error;
|
|
68
|
+
}
|
|
69
|
+
progress?.succeed((0, chalk_1.default) `Deleted deployment {bold ${deploymentIdFromArg}}`);
|
|
70
|
+
if (flags.json) {
|
|
71
|
+
(0, json_1.printJsonOnlyOutput)({
|
|
72
|
+
deploymentId: deleteResult.deploymentIdentifier,
|
|
73
|
+
id: deleteResult.id,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
sanitizeFlags(flags) {
|
|
78
|
+
return {
|
|
79
|
+
nonInteractive: flags['non-interactive'],
|
|
80
|
+
json: flags['json'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
exports.default = WorkerDelete;
|
|
@@ -69,7 +69,7 @@ class IosCredentialsProvider {
|
|
|
69
69
|
const setupPushKeyAction = new SetUpPushKey_1.SetUpPushKey(appLookupParams);
|
|
70
70
|
const isPushKeySetup = await setupPushKeyAction.isPushKeySetupAsync(ctx);
|
|
71
71
|
if (isPushKeySetup) {
|
|
72
|
-
log_1.default.succeed(`Push Notifications
|
|
72
|
+
log_1.default.succeed(`Push Notifications are set up`);
|
|
73
73
|
return null;
|
|
74
74
|
}
|
|
75
75
|
if (ctx.easJsonCliConfig?.promptToConfigurePushNotifications === false) {
|
package/build/fetch.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { Agent } from 'https';
|
|
3
3
|
import { RequestInfo, RequestInit, Response } from 'node-fetch';
|
|
4
|
-
export
|
|
4
|
+
export { Headers, RequestInfo, RequestInit, Response } from 'node-fetch';
|
|
5
5
|
export declare class RequestError extends Error {
|
|
6
6
|
readonly response: Response;
|
|
7
7
|
constructor(message: string, response: Response);
|
package/build/fetch.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.httpsProxyAgent = exports.RequestError = void 0;
|
|
3
|
+
exports.httpsProxyAgent = exports.RequestError = exports.Response = exports.Headers = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const https_proxy_agent_1 = tslib_1.__importDefault(require("https-proxy-agent"));
|
|
6
6
|
const node_fetch_1 = tslib_1.__importDefault(require("node-fetch"));
|
|
7
|
-
|
|
7
|
+
var node_fetch_2 = require("node-fetch");
|
|
8
|
+
Object.defineProperty(exports, "Headers", { enumerable: true, get: function () { return node_fetch_2.Headers; } });
|
|
9
|
+
Object.defineProperty(exports, "Response", { enumerable: true, get: function () { return node_fetch_2.Response; } });
|
|
8
10
|
class RequestError extends Error {
|
|
9
11
|
response;
|
|
10
12
|
constructor(message, response) {
|
|
@@ -2934,6 +2934,12 @@ export type ChannelQuery = {
|
|
|
2934
2934
|
export type ChannelQueryByIdArgs = {
|
|
2935
2935
|
channelId: Scalars['ID']['input'];
|
|
2936
2936
|
};
|
|
2937
|
+
export type ChannelRuntimeCumulativeMetricsOverTimeData = {
|
|
2938
|
+
__typename?: 'ChannelRuntimeCumulativeMetricsOverTimeData';
|
|
2939
|
+
data: LineChartData;
|
|
2940
|
+
metricsAtLastTimestamp: Array<LineDatapoint>;
|
|
2941
|
+
mostPopularUpdates: Array<Update>;
|
|
2942
|
+
};
|
|
2937
2943
|
export type ChannelRuntimeEdge = {
|
|
2938
2944
|
__typename?: 'ChannelRuntimeEdge';
|
|
2939
2945
|
cursor: Scalars['String']['output'];
|
|
@@ -3313,6 +3319,7 @@ export type DeploymentBuildCountArgs = {
|
|
|
3313
3319
|
export type DeploymentBuildsArgs = {
|
|
3314
3320
|
after?: InputMaybe<Scalars['String']['input']>;
|
|
3315
3321
|
before?: InputMaybe<Scalars['String']['input']>;
|
|
3322
|
+
filter?: InputMaybe<DeploymentBuildFilterInput>;
|
|
3316
3323
|
first?: InputMaybe<Scalars['Int']['input']>;
|
|
3317
3324
|
last?: InputMaybe<Scalars['Int']['input']>;
|
|
3318
3325
|
};
|
|
@@ -3326,6 +3333,9 @@ export type DeploymentBuildEdge = {
|
|
|
3326
3333
|
cursor: Scalars['String']['output'];
|
|
3327
3334
|
node: Build;
|
|
3328
3335
|
};
|
|
3336
|
+
export type DeploymentBuildFilterInput = {
|
|
3337
|
+
status?: InputMaybe<BuildStatus>;
|
|
3338
|
+
};
|
|
3329
3339
|
/** Represents the connection over the builds edge of a Deployment */
|
|
3330
3340
|
export type DeploymentBuildsConnection = {
|
|
3331
3341
|
__typename?: 'DeploymentBuildsConnection';
|
|
@@ -3404,6 +3414,7 @@ export type DeploymentsMutation = {
|
|
|
3404
3414
|
createSignedDeploymentUrl: DeploymentSignedUrlResult;
|
|
3405
3415
|
deleteAlias: DeleteAliasResult;
|
|
3406
3416
|
deleteWorkerDeployment: DeleteWorkerDeploymentResult;
|
|
3417
|
+
deleteWorkerDeploymentByIdentifier: DeleteWorkerDeploymentResult;
|
|
3407
3418
|
};
|
|
3408
3419
|
export type DeploymentsMutationAssignAliasArgs = {
|
|
3409
3420
|
aliasName?: InputMaybe<Scalars['WorkerDeploymentIdentifier']['input']>;
|
|
@@ -3421,6 +3432,10 @@ export type DeploymentsMutationDeleteAliasArgs = {
|
|
|
3421
3432
|
export type DeploymentsMutationDeleteWorkerDeploymentArgs = {
|
|
3422
3433
|
workerDeploymentId: Scalars['ID']['input'];
|
|
3423
3434
|
};
|
|
3435
|
+
export type DeploymentsMutationDeleteWorkerDeploymentByIdentifierArgs = {
|
|
3436
|
+
appId: Scalars['ID']['input'];
|
|
3437
|
+
deploymentIdentifier: Scalars['ID']['input'];
|
|
3438
|
+
};
|
|
3424
3439
|
export type DiscordUser = {
|
|
3425
3440
|
__typename?: 'DiscordUser';
|
|
3426
3441
|
discordIdentifier: Scalars['String']['output'];
|
|
@@ -6076,6 +6091,7 @@ export type UpdateChannel = {
|
|
|
6076
6091
|
isPaused: Scalars['Boolean']['output'];
|
|
6077
6092
|
latestRuntimes: ChannelRuntimesConnection;
|
|
6078
6093
|
name: Scalars['String']['output'];
|
|
6094
|
+
runtimeInsights: UpdateChannelRuntimeInsights;
|
|
6079
6095
|
updateBranches: Array<UpdateBranch>;
|
|
6080
6096
|
updatedAt: Scalars['DateTime']['output'];
|
|
6081
6097
|
};
|
|
@@ -6130,6 +6146,29 @@ export type UpdateChannelMutationPauseUpdateChannelArgs = {
|
|
|
6130
6146
|
export type UpdateChannelMutationResumeUpdateChannelArgs = {
|
|
6131
6147
|
channelId: Scalars['ID']['input'];
|
|
6132
6148
|
};
|
|
6149
|
+
export type UpdateChannelRuntimeInsights = {
|
|
6150
|
+
__typename?: 'UpdateChannelRuntimeInsights';
|
|
6151
|
+
cumulativeMetricsOverTime: ChannelRuntimeCumulativeMetricsOverTimeData;
|
|
6152
|
+
embeddedUpdateTotalUniqueUsers: Scalars['Int']['output'];
|
|
6153
|
+
id: Scalars['ID']['output'];
|
|
6154
|
+
mostPopularUpdates: Array<Update>;
|
|
6155
|
+
uniqueUsersOverTime: UniqueUsersOverTimeData;
|
|
6156
|
+
};
|
|
6157
|
+
export type UpdateChannelRuntimeInsightsCumulativeMetricsOverTimeArgs = {
|
|
6158
|
+
timespan: InsightsTimespan;
|
|
6159
|
+
};
|
|
6160
|
+
export type UpdateChannelRuntimeInsightsEmbeddedUpdateTotalUniqueUsersArgs = {
|
|
6161
|
+
runtimeVersion: Scalars['String']['input'];
|
|
6162
|
+
timespan: InsightsTimespan;
|
|
6163
|
+
};
|
|
6164
|
+
export type UpdateChannelRuntimeInsightsMostPopularUpdatesArgs = {
|
|
6165
|
+
runtimeVersion: Scalars['String']['input'];
|
|
6166
|
+
timespan: InsightsTimespan;
|
|
6167
|
+
};
|
|
6168
|
+
export type UpdateChannelRuntimeInsightsUniqueUsersOverTimeArgs = {
|
|
6169
|
+
runtimeVersion: Scalars['String']['input'];
|
|
6170
|
+
timespan: InsightsTimespan;
|
|
6171
|
+
};
|
|
6133
6172
|
export type UpdateDeploymentEdge = {
|
|
6134
6173
|
__typename?: 'UpdateDeploymentEdge';
|
|
6135
6174
|
cursor: Scalars['String']['output'];
|
|
@@ -16382,6 +16421,36 @@ export type AssignAliasMutation = {
|
|
|
16382
16421
|
};
|
|
16383
16422
|
};
|
|
16384
16423
|
};
|
|
16424
|
+
export type DeleteAliasMutationVariables = Exact<{
|
|
16425
|
+
appId: Scalars['ID']['input'];
|
|
16426
|
+
aliasName?: InputMaybe<Scalars['WorkerDeploymentIdentifier']['input']>;
|
|
16427
|
+
}>;
|
|
16428
|
+
export type DeleteAliasMutation = {
|
|
16429
|
+
__typename?: 'RootMutation';
|
|
16430
|
+
deployments: {
|
|
16431
|
+
__typename?: 'DeploymentsMutation';
|
|
16432
|
+
deleteAlias: {
|
|
16433
|
+
__typename?: 'DeleteAliasResult';
|
|
16434
|
+
id: string;
|
|
16435
|
+
aliasName?: any | null;
|
|
16436
|
+
};
|
|
16437
|
+
};
|
|
16438
|
+
};
|
|
16439
|
+
export type DeleteDeploymentMutationVariables = Exact<{
|
|
16440
|
+
appId: Scalars['ID']['input'];
|
|
16441
|
+
deploymentIdentifier: Scalars['ID']['input'];
|
|
16442
|
+
}>;
|
|
16443
|
+
export type DeleteDeploymentMutation = {
|
|
16444
|
+
__typename?: 'RootMutation';
|
|
16445
|
+
deployments: {
|
|
16446
|
+
__typename?: 'DeploymentsMutation';
|
|
16447
|
+
deleteWorkerDeploymentByIdentifier: {
|
|
16448
|
+
__typename?: 'DeleteWorkerDeploymentResult';
|
|
16449
|
+
id: string;
|
|
16450
|
+
deploymentIdentifier: any;
|
|
16451
|
+
};
|
|
16452
|
+
};
|
|
16453
|
+
};
|
|
16385
16454
|
export type PaginatedWorkerDeploymentsQueryVariables = Exact<{
|
|
16386
16455
|
appId: Scalars['String']['input'];
|
|
16387
16456
|
first?: InputMaybe<Scalars['Int']['input']>;
|
|
@@ -16435,3 +16504,40 @@ export type SuggestedDevDomainNameQuery = {
|
|
|
16435
16504
|
};
|
|
16436
16505
|
};
|
|
16437
16506
|
};
|
|
16507
|
+
export type PaginatedWorkerDeploymentAliasesQueryVariables = Exact<{
|
|
16508
|
+
appId: Scalars['String']['input'];
|
|
16509
|
+
first?: InputMaybe<Scalars['Int']['input']>;
|
|
16510
|
+
after?: InputMaybe<Scalars['String']['input']>;
|
|
16511
|
+
last?: InputMaybe<Scalars['Int']['input']>;
|
|
16512
|
+
before?: InputMaybe<Scalars['String']['input']>;
|
|
16513
|
+
}>;
|
|
16514
|
+
export type PaginatedWorkerDeploymentAliasesQuery = {
|
|
16515
|
+
__typename?: 'RootQuery';
|
|
16516
|
+
app: {
|
|
16517
|
+
__typename?: 'AppQuery';
|
|
16518
|
+
byId: {
|
|
16519
|
+
__typename?: 'App';
|
|
16520
|
+
id: string;
|
|
16521
|
+
workerDeploymentAliases: {
|
|
16522
|
+
__typename?: 'WorkerDeploymentAliasesConnection';
|
|
16523
|
+
pageInfo: {
|
|
16524
|
+
__typename?: 'PageInfo';
|
|
16525
|
+
hasNextPage: boolean;
|
|
16526
|
+
hasPreviousPage: boolean;
|
|
16527
|
+
startCursor?: string | null;
|
|
16528
|
+
endCursor?: string | null;
|
|
16529
|
+
};
|
|
16530
|
+
edges: Array<{
|
|
16531
|
+
__typename?: 'WorkerDeploymentAliasEdge';
|
|
16532
|
+
cursor: string;
|
|
16533
|
+
node: {
|
|
16534
|
+
__typename?: 'WorkerDeploymentAlias';
|
|
16535
|
+
id: string;
|
|
16536
|
+
aliasName?: any | null;
|
|
16537
|
+
url: string;
|
|
16538
|
+
};
|
|
16539
|
+
}>;
|
|
16540
|
+
};
|
|
16541
|
+
};
|
|
16542
|
+
};
|
|
16543
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DeploymentsMutation } from './mutations';
|
|
2
2
|
import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
|
|
3
|
-
import { WorkerDeploymentFragment } from '../graphql/generated';
|
|
3
|
+
import { WorkerDeploymentAliasFragment, WorkerDeploymentFragment } from '../graphql/generated';
|
|
4
4
|
import { selectPaginatedAsync } from '../utils/relay';
|
|
5
5
|
export declare function getSignedDeploymentUrlAsync(graphqlClient: ExpoGraphqlClient, options: {
|
|
6
6
|
appId: string;
|
|
@@ -37,3 +37,25 @@ export declare function selectWorkerDeploymentOnAppAsync({ graphqlClient, appId,
|
|
|
37
37
|
selectTitle?: string;
|
|
38
38
|
pageSize?: number;
|
|
39
39
|
}): ReturnType<typeof selectPaginatedAsync<WorkerDeploymentFragment>>;
|
|
40
|
+
export declare function deleteWorkerDeploymentAliasAsync({ graphqlClient, appId, aliasName, }: {
|
|
41
|
+
graphqlClient: ExpoGraphqlClient;
|
|
42
|
+
appId: string;
|
|
43
|
+
aliasName: string;
|
|
44
|
+
}): Promise<{
|
|
45
|
+
aliasName?: string;
|
|
46
|
+
id: string;
|
|
47
|
+
}>;
|
|
48
|
+
export declare function selectWorkerDeploymentAliasOnAppAsync({ graphqlClient, appId, selectTitle, pageSize, }: {
|
|
49
|
+
graphqlClient: ExpoGraphqlClient;
|
|
50
|
+
appId: string;
|
|
51
|
+
selectTitle?: string;
|
|
52
|
+
pageSize?: number;
|
|
53
|
+
}): ReturnType<typeof selectPaginatedAsync<WorkerDeploymentAliasFragment>>;
|
|
54
|
+
export declare function deleteWorkerDeploymentAsync({ graphqlClient, appId, deploymentIdentifier, }: {
|
|
55
|
+
graphqlClient: ExpoGraphqlClient;
|
|
56
|
+
appId: string;
|
|
57
|
+
deploymentIdentifier: string;
|
|
58
|
+
}): Promise<{
|
|
59
|
+
deploymentIdentifier: string;
|
|
60
|
+
id: string;
|
|
61
|
+
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.selectWorkerDeploymentOnAppAsync = exports.assignWorkerDeploymentProductionAsync = exports.assignWorkerDeploymentAliasAsync = exports.assignDevDomainNameAsync = exports.getSignedDeploymentUrlAsync = void 0;
|
|
3
|
+
exports.deleteWorkerDeploymentAsync = exports.selectWorkerDeploymentAliasOnAppAsync = exports.deleteWorkerDeploymentAliasAsync = exports.selectWorkerDeploymentOnAppAsync = exports.assignWorkerDeploymentProductionAsync = exports.assignWorkerDeploymentAliasAsync = exports.assignDevDomainNameAsync = exports.getSignedDeploymentUrlAsync = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
6
6
|
const mutations_1 = require("./mutations");
|
|
@@ -157,3 +157,29 @@ async function selectWorkerDeploymentOnAppAsync({ graphqlClient, appId, selectTi
|
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
159
|
exports.selectWorkerDeploymentOnAppAsync = selectWorkerDeploymentOnAppAsync;
|
|
160
|
+
async function deleteWorkerDeploymentAliasAsync({ graphqlClient, appId, aliasName, }) {
|
|
161
|
+
return await mutations_1.DeploymentsMutation.deleteAliasAsync(graphqlClient, {
|
|
162
|
+
appId,
|
|
163
|
+
aliasName,
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
exports.deleteWorkerDeploymentAliasAsync = deleteWorkerDeploymentAliasAsync;
|
|
167
|
+
async function selectWorkerDeploymentAliasOnAppAsync({ graphqlClient, appId, selectTitle, pageSize, }) {
|
|
168
|
+
return await (0, relay_1.selectPaginatedAsync)({
|
|
169
|
+
pageSize: pageSize ?? 25,
|
|
170
|
+
printedType: selectTitle ?? 'worker deployment alias',
|
|
171
|
+
queryAsync: async (queryParams) => await queries_1.DeploymentsQuery.getAllAliasesPaginatedAsync(graphqlClient, {
|
|
172
|
+
...queryParams,
|
|
173
|
+
appId,
|
|
174
|
+
}),
|
|
175
|
+
getTitleAsync: async (alias) => (0, chalk_1.default) `${alias.aliasName ?? 'production'}{dim - ${alias.url}}`,
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
exports.selectWorkerDeploymentAliasOnAppAsync = selectWorkerDeploymentAliasOnAppAsync;
|
|
179
|
+
async function deleteWorkerDeploymentAsync({ graphqlClient, appId, deploymentIdentifier, }) {
|
|
180
|
+
return await mutations_1.DeploymentsMutation.deleteWorkerDeploymentAsync(graphqlClient, {
|
|
181
|
+
appId,
|
|
182
|
+
deploymentIdentifier,
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
exports.deleteWorkerDeploymentAsync = deleteWorkerDeploymentAsync;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
|
-
import { AssignAliasMutation } from '../graphql/generated';
|
|
2
|
+
import { AssignAliasMutation, DeleteAliasResult } from '../graphql/generated';
|
|
3
3
|
export declare const DeploymentsMutation: {
|
|
4
4
|
createSignedDeploymentUrlAsync(graphqlClient: ExpoGraphqlClient, deploymentVariables: {
|
|
5
5
|
appId: string;
|
|
@@ -14,4 +14,15 @@ export declare const DeploymentsMutation: {
|
|
|
14
14
|
deploymentId: string;
|
|
15
15
|
aliasName: string | null;
|
|
16
16
|
}): Promise<AssignAliasMutation['deployments']['assignAlias']>;
|
|
17
|
+
deleteAliasAsync(graphqlClient: ExpoGraphqlClient, deleteAliasVariables: {
|
|
18
|
+
appId: string;
|
|
19
|
+
aliasName: string;
|
|
20
|
+
}): Promise<DeleteAliasResult>;
|
|
21
|
+
deleteWorkerDeploymentAsync(graphqlClient: ExpoGraphqlClient, deleteVariables: {
|
|
22
|
+
appId: string;
|
|
23
|
+
deploymentIdentifier: string;
|
|
24
|
+
}): Promise<{
|
|
25
|
+
deploymentIdentifier: string;
|
|
26
|
+
id: string;
|
|
27
|
+
}>;
|
|
17
28
|
};
|
|
@@ -75,4 +75,37 @@ exports.DeploymentsMutation = {
|
|
|
75
75
|
.toPromise());
|
|
76
76
|
return data.deployments.assignAlias;
|
|
77
77
|
},
|
|
78
|
+
async deleteAliasAsync(graphqlClient, deleteAliasVariables) {
|
|
79
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
80
|
+
.mutation((0, graphql_tag_1.default) `
|
|
81
|
+
mutation DeleteAlias($appId: ID!, $aliasName: WorkerDeploymentIdentifier) {
|
|
82
|
+
deployments {
|
|
83
|
+
deleteAlias(appId: $appId, aliasName: $aliasName) {
|
|
84
|
+
id
|
|
85
|
+
aliasName
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
`, deleteAliasVariables)
|
|
90
|
+
.toPromise());
|
|
91
|
+
return data.deployments.deleteAlias;
|
|
92
|
+
},
|
|
93
|
+
async deleteWorkerDeploymentAsync(graphqlClient, deleteVariables) {
|
|
94
|
+
const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
|
|
95
|
+
.mutation((0, graphql_tag_1.default) `
|
|
96
|
+
mutation DeleteDeployment($appId: ID!, $deploymentIdentifier: ID!) {
|
|
97
|
+
deployments {
|
|
98
|
+
deleteWorkerDeploymentByIdentifier(
|
|
99
|
+
appId: $appId
|
|
100
|
+
deploymentIdentifier: $deploymentIdentifier
|
|
101
|
+
) {
|
|
102
|
+
id
|
|
103
|
+
deploymentIdentifier
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
`, deleteVariables)
|
|
108
|
+
.toPromise());
|
|
109
|
+
return data.deployments.deleteWorkerDeploymentByIdentifier;
|
|
110
|
+
},
|
|
78
111
|
};
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import type { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
|
|
2
|
-
import { type PaginatedWorkerDeploymentsQueryVariables, SuggestedDevDomainNameQueryVariables, type WorkerDeploymentFragment } from '../graphql/generated';
|
|
2
|
+
import { type PaginatedWorkerDeploymentsQueryVariables, SuggestedDevDomainNameQueryVariables, type WorkerDeploymentAliasFragment, type WorkerDeploymentFragment } from '../graphql/generated';
|
|
3
3
|
import type { Connection } from '../utils/relay';
|
|
4
4
|
export declare const DeploymentsQuery: {
|
|
5
5
|
getAllDeploymentsPaginatedAsync(graphqlClient: ExpoGraphqlClient, { appId, first, after, last, before }: PaginatedWorkerDeploymentsQueryVariables): Promise<Connection<WorkerDeploymentFragment>>;
|
|
6
6
|
getSuggestedDevDomainByAppIdAsync(graphqlClient: ExpoGraphqlClient, { appId }: SuggestedDevDomainNameQueryVariables): Promise<string>;
|
|
7
|
+
getAllAliasesPaginatedAsync(graphqlClient: ExpoGraphqlClient, { appId, first, after, last, before, }: {
|
|
8
|
+
appId: string;
|
|
9
|
+
first?: number | undefined;
|
|
10
|
+
after?: string | undefined;
|
|
11
|
+
last?: number | undefined;
|
|
12
|
+
before?: string | undefined;
|
|
13
|
+
}): Promise<Connection<WorkerDeploymentAliasFragment>>;
|
|
7
14
|
};
|