hotcodepush 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/app/create.js +1 -1
- package/dist/commands/app/delete.js +2 -2
- package/dist/commands/app/get.js +1 -1
- package/dist/commands/app/list.js +1 -1
- package/dist/commands/app/transfer.js +1 -1
- package/dist/commands/app/update.js +1 -1
- package/dist/commands/audience/get.js +2 -2
- package/dist/commands/audit-log/list.js +2 -2
- package/dist/commands/binary/create.js +11 -9
- package/dist/commands/binary/get.js +1 -1
- package/dist/commands/binary/list.js +2 -2
- package/dist/commands/bundle/delete.js +2 -2
- package/dist/commands/bundle/get.js +1 -1
- package/dist/commands/bundle/list.js +2 -2
- package/dist/commands/bundle/upload.js +7 -6
- package/dist/commands/channel/create.js +1 -1
- package/dist/commands/channel/delete.js +3 -3
- package/dist/commands/channel/get.js +1 -1
- package/dist/commands/channel/list.js +1 -1
- package/dist/commands/channel/pause.js +1 -1
- package/dist/commands/channel/resume.js +1 -1
- package/dist/commands/channel/update.js +1 -1
- package/dist/commands/checkout/create.js +1 -1
- package/dist/commands/completion.js +2 -1
- package/dist/commands/customer-portal-session/create.js +1 -1
- package/dist/commands/device/delete.js +2 -2
- package/dist/commands/device/get.js +1 -1
- package/dist/commands/device/list.js +3 -3
- package/dist/commands/device/probe.js +3 -3
- package/dist/commands/doctor.js +2 -1
- package/dist/commands/fingerprint/diff.js +3 -2
- package/dist/commands/fingerprint.js +3 -2
- package/dist/commands/init.js +4 -3
- package/dist/commands/invitation/accept.js +1 -1
- package/dist/commands/invitation/create.js +2 -2
- package/dist/commands/invitation/delete.js +2 -2
- package/dist/commands/invitation/list.js +1 -1
- package/dist/commands/limit/list.js +1 -1
- package/dist/commands/login.js +4 -153
- package/dist/commands/logout.js +7 -5
- package/dist/commands/member/delete.js +2 -2
- package/dist/commands/member/get.js +1 -1
- package/dist/commands/member/list.js +1 -1
- package/dist/commands/member/update.js +2 -2
- package/dist/commands/open.js +1 -1
- package/dist/commands/organization/create.js +1 -1
- package/dist/commands/organization/delete.js +2 -2
- package/dist/commands/organization/get.js +1 -1
- package/dist/commands/organization/list.js +1 -1
- package/dist/commands/organization/update.js +1 -1
- package/dist/commands/release/create.js +5 -5
- package/dist/commands/release/get.js +1 -1
- package/dist/commands/release/list.js +1 -1
- package/dist/commands/release/pause.js +1 -1
- package/dist/commands/release/resume.js +1 -1
- package/dist/commands/release/revoke.js +5 -4
- package/dist/commands/release/rollback.js +3 -3
- package/dist/commands/release/rollout.js +4 -4
- package/dist/commands/release/update.js +2 -2
- package/dist/commands/resource-file/write.js +8 -6
- package/dist/commands/signing-key/add.js +2 -2
- package/dist/commands/signing-key/create.js +2 -2
- package/dist/commands/signing-key/delete.js +1 -1
- package/dist/commands/signing-key/list.js +2 -2
- package/dist/commands/sso-provider/delete.js +1 -1
- package/dist/commands/sso-provider/get.js +1 -1
- package/dist/commands/sso-provider/set.js +2 -2
- package/dist/commands/sso-provider/verify.js +2 -2
- package/dist/commands/statistics/get.js +5 -5
- package/dist/commands/usage/get.js +1 -1
- package/dist/commands/usage/list.js +1 -1
- package/dist/commands/webhook/create.js +3 -3
- package/dist/commands/webhook/delete.js +1 -1
- package/dist/commands/webhook/get.js +2 -2
- package/dist/commands/webhook/list.js +1 -1
- package/dist/commands/webhook/test.js +1 -1
- package/dist/commands/webhook/update.js +3 -3
- package/dist/commands/webhook-delivery/list.js +2 -2
- package/dist/commands/webhook-delivery/redeliver.js +2 -2
- package/dist/commands/whoami.js +1 -1
- package/dist/completion/hotcodepush.fish +75 -75
- package/dist/completion/hotcodepush.zsh +75 -75
- package/dist/utils/audience.js +1 -1
- package/dist/utils/authentication.js +60 -0
- package/dist/utils/build-step.js +1 -1
- package/dist/utils/channel-fields.js +3 -3
- package/dist/utils/cli.js +5 -0
- package/dist/utils/command.js +4 -0
- package/dist/utils/diagnostics.js +20 -0
- package/dist/utils/error-mapping.js +10 -14
- package/dist/utils/login.js +153 -0
- package/dist/utils/output.js +2 -1
- package/dist/utils/release-conditions.js +3 -4
- package/dist/utils/release-output.js +1 -1
- package/dist/utils/resource-resolution.js +1 -1
- package/dist/utils/telemetry.js +3 -2
- package/dist/utils/update-notice.js +2 -1
- package/dist/utils/usage-month.js +1 -1
- package/dist/utils/user-config.js +8 -0
- package/dist/utils/webhook-resolution.js +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { defineCommand } from 'zodline';
|
|
3
2
|
import { createApiClient } from '../../utils/api-client.js';
|
|
3
|
+
import { defineCommand } from '../../utils/command.js';
|
|
4
4
|
import { defineCommandOptions } from '../../utils/global-options.js';
|
|
5
5
|
import { printJson } from '../../utils/output.js';
|
|
6
6
|
import { promptSelect, promptText } from '../../utils/prompts.js';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineCommand } from 'zodline';
|
|
2
1
|
import { createApiClient } from '../../utils/api-client.js';
|
|
2
|
+
import { defineCommand } from '../../utils/command.js';
|
|
3
3
|
import { defineCommandOptions } from '../../utils/global-options.js';
|
|
4
4
|
import { printJson, resolveQuantityText } from '../../utils/output.js';
|
|
5
5
|
import { readProjectConfig } from '../../utils/project-config.js';
|
|
6
6
|
import { confirmConsequence } from '../../utils/prompts.js';
|
|
7
7
|
import { fetchAppId, fetchChannels } from '../../utils/resource-resolution.js';
|
|
8
8
|
export default defineCommand({
|
|
9
|
-
description: 'Delete an app with its channels, bundles and releases
|
|
9
|
+
description: 'Delete an app with its channels, bundles and releases. Support can restore it for seven days.',
|
|
10
10
|
examples: [
|
|
11
11
|
'hotcodepush app delete --app "My App"',
|
|
12
12
|
'hotcodepush app delete --app 7c9e6679-7425-40de-944b-e07fc1f90ae7 --yes --json',
|
package/dist/commands/app/get.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineCommand } from 'zodline';
|
|
2
1
|
import { createApiClient } from '../../utils/api-client.js';
|
|
2
|
+
import { defineCommand } from '../../utils/command.js';
|
|
3
3
|
import { defineCommandOptions } from '../../utils/global-options.js';
|
|
4
4
|
import { printDetails, printJson } from '../../utils/output.js';
|
|
5
5
|
import { readProjectConfig } from '../../utils/project-config.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineCommand } from 'zodline';
|
|
2
1
|
import { createApiClient } from '../../utils/api-client.js';
|
|
2
|
+
import { defineCommand } from '../../utils/command.js';
|
|
3
3
|
import { defineCommandOptions } from '../../utils/global-options.js';
|
|
4
4
|
import { printJson, printTable, resolveDate } from '../../utils/output.js';
|
|
5
5
|
import { paginationShape, resolveNextOffset } from '../../utils/pagination.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { defineCommand } from 'zodline';
|
|
3
2
|
import { createApiClient } from '../../utils/api-client.js';
|
|
3
|
+
import { defineCommand } from '../../utils/command.js';
|
|
4
4
|
import { defineCommandOptions } from '../../utils/global-options.js';
|
|
5
5
|
import { printJson } from '../../utils/output.js';
|
|
6
6
|
import { readProjectConfig } from '../../utils/project-config.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { defineCommand } from 'zodline';
|
|
3
2
|
import { createApiClient } from '../../utils/api-client.js';
|
|
3
|
+
import { defineCommand } from '../../utils/command.js';
|
|
4
4
|
import { defineCommandOptions } from '../../utils/global-options.js';
|
|
5
5
|
import { printJson } from '../../utils/output.js';
|
|
6
6
|
import { readProjectConfig } from '../../utils/project-config.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { defineCommand } from 'zodline';
|
|
3
2
|
import { createApiClient } from '../../utils/api-client.js';
|
|
4
3
|
import { resolveAudienceText } from '../../utils/audience.js';
|
|
4
|
+
import { defineCommand } from '../../utils/command.js';
|
|
5
5
|
import { hasLockfile, readFingerprint } from '../../utils/fingerprint.js';
|
|
6
6
|
import { defineCommandOptions } from '../../utils/global-options.js';
|
|
7
7
|
import { printJson, printTable, printWarnings } from '../../utils/output.js';
|
|
@@ -9,7 +9,7 @@ import { locateProjectConfig } from '../../utils/project-config.js';
|
|
|
9
9
|
import { buildAudienceQuery, conditionOptionShape, } from '../../utils/release-conditions.js';
|
|
10
10
|
import { channelOptionShape, fetchChannel, } from '../../utils/resource-resolution.js';
|
|
11
11
|
export default defineCommand({
|
|
12
|
-
description: "Preview the devices a release's conditions would reach in a channel, before it exists, the project's fingerprint among them
|
|
12
|
+
description: "Preview the devices a release's conditions would reach in a channel, before it exists, the project's fingerprint among them. This is what release create --dry-run prints.",
|
|
13
13
|
examples: [
|
|
14
14
|
'hotcodepush audience get --binary-version ">=2.3.0" --rollout-percent 10',
|
|
15
15
|
'hotcodepush audience get --channel production --attribute tier=beta --device 6b1e9d37-2f5c-4a80-9c46-d8e3a1f7b259 --json',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { defineCommand } from 'zodline';
|
|
3
2
|
import { createApiClient } from '../../utils/api-client.js';
|
|
3
|
+
import { defineCommand } from '../../utils/command.js';
|
|
4
4
|
import { resolveTimeBound } from '../../utils/duration.js';
|
|
5
5
|
import { defineCommandOptions } from '../../utils/global-options.js';
|
|
6
6
|
import { printJson, printTable } from '../../utils/output.js';
|
|
@@ -23,7 +23,7 @@ export default defineCommand({
|
|
|
23
23
|
app: z
|
|
24
24
|
.string()
|
|
25
25
|
.optional()
|
|
26
|
-
.describe("The app, by id or name, to narrow the log to
|
|
26
|
+
.describe("The app, by id or name, to narrow the log to. Defaults to the whole organization, never to hotcodepush.json's app."),
|
|
27
27
|
createdSince: z
|
|
28
28
|
.string()
|
|
29
29
|
.optional()
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { defineCommand } from 'zodline';
|
|
3
2
|
import { createApiClient } from '../../utils/api-client.js';
|
|
4
3
|
import { buildStepShape, fetchChannelId, readBuildStep, resolveChannelIdByShape, resolveFailureText, resolveOfflineCause, writeBuildResourceFile, } from '../../utils/build-step.js';
|
|
4
|
+
import { defineCommand } from '../../utils/command.js';
|
|
5
5
|
import { compressFiles, withTemporaryDirectory, } from '../../utils/compressed-files.js';
|
|
6
|
+
import { printNotice, printWarning } from '../../utils/diagnostics.js';
|
|
6
7
|
import { isCi } from '../../utils/environment.js';
|
|
7
8
|
import { CliError, PipelineNotLoggedInError } from '../../utils/errors.js';
|
|
8
9
|
import { assertMissingParameter } from '../../utils/framework.js';
|
|
@@ -12,7 +13,8 @@ import { createReporter, resolveByteText } from '../../utils/progress.js';
|
|
|
12
13
|
import { assertWithinBundleBytesLimit, resolveMissingSha256s, uploadMissingFiles, } from '../../utils/upload.js';
|
|
13
14
|
const NO_UPLOAD = { fileCount: 0, sizeBytes: 0 };
|
|
14
15
|
export default defineCommand({
|
|
15
|
-
description: 'The build step of a store build: creates the binary with the embedded bundle it ships and writes the resource file the SDK reads, naming that bundle
|
|
16
|
+
description: 'The build step of a store build: creates the binary with the embedded bundle it ships and writes the resource file the SDK reads, naming that bundle. Every other build runs resource-file write. HOTCODEPUSH_OFFLINE=1 builds without the API, naming no channel unless it is given by id and creating no binary.',
|
|
17
|
+
authentication: 'optional',
|
|
16
18
|
examples: [
|
|
17
19
|
'hotcodepush binary create --platform ios --embedded-bundle-path build/App.app/public --resource-file-path build/App.app/hotcodepush.json --binary-version 2.4.1 --binary-build 57',
|
|
18
20
|
'hotcodepush binary create --platform android --embedded-bundle-path build/assets/public --resource-file-path build/assets/hotcodepush.json --binary-version 2.4.1 --binary-build 57 --force',
|
|
@@ -37,7 +39,7 @@ export default defineCommand({
|
|
|
37
39
|
const { embeddedFiles, platform, resourceFilePath } = buildStep;
|
|
38
40
|
if (embeddedFiles === undefined) {
|
|
39
41
|
writeBuildResourceFile(buildStep, resolveChannelIdByShape(buildStep.channelReference), null);
|
|
40
|
-
|
|
42
|
+
printNotice(`No binary created: the ${platform} build bundled no JavaScript, as a debug build served by the development server does. Wrote ${resourceFilePath} without an embedded bundle: over-the-air (OTA) updates are off in this build.`);
|
|
41
43
|
if (options.json) {
|
|
42
44
|
printJson({ binary: null, resourceFilePath, upload: NO_UPLOAD });
|
|
43
45
|
}
|
|
@@ -61,7 +63,7 @@ export default defineCommand({
|
|
|
61
63
|
throw binaryCreation.pipelineFailure;
|
|
62
64
|
}
|
|
63
65
|
if (binaryCreation.skippedReason !== null) {
|
|
64
|
-
|
|
66
|
+
printWarning(binaryCreation.skippedReason);
|
|
65
67
|
}
|
|
66
68
|
if (options.json) {
|
|
67
69
|
printJson({
|
|
@@ -107,7 +109,7 @@ async function createBuildBinary(request, buildStep, files, reporter) {
|
|
|
107
109
|
return {
|
|
108
110
|
binary: null,
|
|
109
111
|
channelId: null,
|
|
110
|
-
skippedReason: `
|
|
112
|
+
skippedReason: `The channel could not be resolved, so the build names none and takes no OTA updates, and no binary was created: ${resolveFailureText(error)}`,
|
|
111
113
|
upload: NO_UPLOAD,
|
|
112
114
|
};
|
|
113
115
|
}
|
|
@@ -126,7 +128,7 @@ async function createBuildBinary(request, buildStep, files, reporter) {
|
|
|
126
128
|
return {
|
|
127
129
|
binary: null,
|
|
128
130
|
channelId,
|
|
129
|
-
skippedReason: `
|
|
131
|
+
skippedReason: `The binary was not created: ${resolveFailureText(error)}`,
|
|
130
132
|
upload: NO_UPLOAD,
|
|
131
133
|
};
|
|
132
134
|
}
|
|
@@ -178,12 +180,12 @@ function resolveFailedCreation(channelId, pipelineFailure) {
|
|
|
178
180
|
function resolveOfflineText(offlineCause, channelId) {
|
|
179
181
|
const causeText = offlineCause === 'offline-switch'
|
|
180
182
|
? 'HOTCODEPUSH_OFFLINE is set'
|
|
181
|
-
: '
|
|
183
|
+
: 'Not logged in';
|
|
182
184
|
const consequenceText = channelId === null
|
|
183
|
-
? '
|
|
185
|
+
? '. It names no channel and takes no OTA updates until it is built with a token, and no binary was created'
|
|
184
186
|
: ' and no binary was created';
|
|
185
187
|
const fixText = offlineCause === 'offline-switch'
|
|
186
188
|
? ''
|
|
187
|
-
: '
|
|
189
|
+
: '. Run "hotcodepush login" or set HOTCODEPUSH_TOKEN';
|
|
188
190
|
return `${causeText}, so the build was made offline${consequenceText}${fixText}.`;
|
|
189
191
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { defineCommand } from 'zodline';
|
|
3
2
|
import { createApiClient } from '../../utils/api-client.js';
|
|
3
|
+
import { defineCommand } from '../../utils/command.js';
|
|
4
4
|
import { isInteractive } from '../../utils/environment.js';
|
|
5
5
|
import { MissingParameterError } from '../../utils/errors.js';
|
|
6
6
|
import { resolveBinaryBucket, UNSEEN_IN_FLEET_WINDOW_TEXT, } from '../../utils/fleet.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineCommand } from 'zodline';
|
|
2
1
|
import { createApiClient } from '../../utils/api-client.js';
|
|
2
|
+
import { defineCommand } from '../../utils/command.js';
|
|
3
3
|
import { resolveBinaryBucket, UNSEEN_IN_FLEET_WINDOW_TEXT, } from '../../utils/fleet.js';
|
|
4
4
|
import { defineCommandOptions } from '../../utils/global-options.js';
|
|
5
5
|
import { printJson, printTable, resolveDate } from '../../utils/output.js';
|
|
@@ -28,7 +28,7 @@ export default defineCommand({
|
|
|
28
28
|
}
|
|
29
29
|
const fleet = await hotCodePush.apps.statistics.fleet.get({ appId });
|
|
30
30
|
printTable({
|
|
31
|
-
emptyText: 'No binaries
|
|
31
|
+
emptyText: 'No binaries. A store build creates one.',
|
|
32
32
|
headers: [
|
|
33
33
|
'ID',
|
|
34
34
|
'VERSION',
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineCommand } from 'zodline';
|
|
2
1
|
import { createApiClient } from '../../utils/api-client.js';
|
|
3
2
|
import { bundleOptionShape, fetchBundle, resolveBundleLabel, } from '../../utils/bundle-resolution.js';
|
|
3
|
+
import { defineCommand } from '../../utils/command.js';
|
|
4
4
|
import { defineCommandOptions } from '../../utils/global-options.js';
|
|
5
5
|
import { printJson } from '../../utils/output.js';
|
|
6
6
|
import { readProjectConfig } from '../../utils/project-config.js';
|
|
7
7
|
import { confirmConsequence } from '../../utils/prompts.js';
|
|
8
8
|
import { fetchAppId } from '../../utils/resource-resolution.js';
|
|
9
9
|
export default defineCommand({
|
|
10
|
-
description: 'Delete a bundle now
|
|
10
|
+
description: 'Delete a bundle now. One a release serves or a store build embeds is refused.',
|
|
11
11
|
examples: [
|
|
12
12
|
'hotcodepush bundle delete --bundle 17',
|
|
13
13
|
'hotcodepush bundle delete --bundle 17 --yes --json',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineCommand } from 'zodline';
|
|
2
1
|
import { createApiClient } from '../../utils/api-client.js';
|
|
3
2
|
import { bundleOptionShape, fetchBundle, } from '../../utils/bundle-resolution.js';
|
|
3
|
+
import { defineCommand } from '../../utils/command.js';
|
|
4
4
|
import { defineCommandOptions } from '../../utils/global-options.js';
|
|
5
5
|
import { printDetails, printJson, resolveQuantityText, } from '../../utils/output.js';
|
|
6
6
|
import { fetchAllPages } from '../../utils/pagination.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { defineCommand } from 'zodline';
|
|
3
2
|
import { createApiClient } from '../../utils/api-client.js';
|
|
3
|
+
import { defineCommand } from '../../utils/command.js';
|
|
4
4
|
import { defineCommandOptions } from '../../utils/global-options.js';
|
|
5
5
|
import { printJson, printTable, resolveDate } from '../../utils/output.js';
|
|
6
6
|
import { paginationShape, resolveNextOffset } from '../../utils/pagination.js';
|
|
@@ -23,7 +23,7 @@ export default defineCommand({
|
|
|
23
23
|
source: z
|
|
24
24
|
.enum(BUNDLE_SOURCES)
|
|
25
25
|
.optional()
|
|
26
|
-
.describe('upload
|
|
26
|
+
.describe('upload is the bundles a release can carry, binary is the ones binaries ship, which have no number, and all is both. Defaults to upload.'),
|
|
27
27
|
}),
|
|
28
28
|
action: async (options) => {
|
|
29
29
|
const hotCodePush = createApiClient();
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import { defineCommand } from 'zodline';
|
|
5
4
|
import { createApiClient } from '../../utils/api-client.js';
|
|
6
5
|
import { resolveBundleLabel } from '../../utils/bundle-resolution.js';
|
|
6
|
+
import { defineCommand } from '../../utils/command.js';
|
|
7
7
|
import { withTemporaryDirectory } from '../../utils/compressed-files.js';
|
|
8
|
+
import { printWarning } from '../../utils/diagnostics.js';
|
|
8
9
|
import { SigningKeyUnavailableError } from '../../utils/errors.js';
|
|
9
10
|
import { readFingerprint } from '../../utils/fingerprint.js';
|
|
10
11
|
import { detectFramework, resolveInputDirectoryPath, } from '../../utils/framework.js';
|
|
@@ -30,7 +31,7 @@ export const bundleUploadOptionShape = {
|
|
|
30
31
|
bundleVersion: z
|
|
31
32
|
.string()
|
|
32
33
|
.optional()
|
|
33
|
-
.describe("The bundle's version label
|
|
34
|
+
.describe("The bundle's version label. Defaults to the project's package.json version."),
|
|
34
35
|
gitMessage: z
|
|
35
36
|
.string()
|
|
36
37
|
.optional()
|
|
@@ -46,7 +47,7 @@ export const bundleUploadOptionShape = {
|
|
|
46
47
|
noGit: z
|
|
47
48
|
.boolean()
|
|
48
49
|
.optional()
|
|
49
|
-
.describe('Detect no git provenance
|
|
50
|
+
.describe('Detect no git provenance. The typed --git-* flags still apply.'),
|
|
50
51
|
path: z
|
|
51
52
|
.string()
|
|
52
53
|
.optional()
|
|
@@ -57,10 +58,10 @@ export const bundleUploadOptionShape = {
|
|
|
57
58
|
privateKeyPath: z
|
|
58
59
|
.string()
|
|
59
60
|
.optional()
|
|
60
|
-
.describe('The private key file to sign with, as signing-key create wrote it
|
|
61
|
+
.describe('The private key file to sign with, as signing-key create wrote it. In CI, HOTCODEPUSH_SIGNING_KEY holds its content.'),
|
|
61
62
|
};
|
|
62
63
|
export default defineCommand({
|
|
63
|
-
description: 'Upload a build as a bundle, signed where a key is configured
|
|
64
|
+
description: 'Upload a build as a bundle, signed where a key is configured. Only the files the app lacks move, then the full pack. Nothing is released.',
|
|
64
65
|
examples: [
|
|
65
66
|
'hotcodepush bundle upload',
|
|
66
67
|
'hotcodepush bundle upload --path dist --bundle-version 1.4.2 --platform ios --json',
|
|
@@ -78,7 +79,7 @@ export default defineCommand({
|
|
|
78
79
|
const [sharedOptions] = bundleUploads;
|
|
79
80
|
if (sharedOptions !== undefined &&
|
|
80
81
|
(await fetchIsFingerprintUnknown(hotCodePush, sharedOptions))) {
|
|
81
|
-
|
|
82
|
+
printWarning(FINGERPRINT_UNKNOWN_TEXT);
|
|
82
83
|
}
|
|
83
84
|
return bundles;
|
|
84
85
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { HotCodePushError } from '@hotcodepush/node';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { defineCommand } from 'zodline';
|
|
4
3
|
import { createApiClient } from '../../utils/api-client.js';
|
|
5
4
|
import { channelFieldsShape, resolveChannelFields, } from '../../utils/channel-fields.js';
|
|
5
|
+
import { defineCommand } from '../../utils/command.js';
|
|
6
6
|
import { defineCommandOptions } from '../../utils/global-options.js';
|
|
7
7
|
import { printJson } from '../../utils/output.js';
|
|
8
8
|
import { readProjectConfig } from '../../utils/project-config.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HotCodePushError } from '@hotcodepush/node';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { defineCommand } from 'zodline';
|
|
4
3
|
import { createApiClient } from '../../utils/api-client.js';
|
|
4
|
+
import { defineCommand } from '../../utils/command.js';
|
|
5
5
|
import { UnknownNameError } from '../../utils/errors.js';
|
|
6
6
|
import { defineCommandOptions } from '../../utils/global-options.js';
|
|
7
7
|
import { printJson } from '../../utils/output.js';
|
|
@@ -9,7 +9,7 @@ import { ID_SCHEMA } from '../../utils/project-config.js';
|
|
|
9
9
|
import { confirmConsequence } from '../../utils/prompts.js';
|
|
10
10
|
import { channelOptionShape, fetchChannel, } from '../../utils/resource-resolution.js';
|
|
11
11
|
export default defineCommand({
|
|
12
|
-
description: 'Delete a channel and its releases
|
|
12
|
+
description: 'Delete a channel and its releases. Devices on it keep what they have.',
|
|
13
13
|
examples: [
|
|
14
14
|
'hotcodepush channel delete --channel staging',
|
|
15
15
|
'hotcodepush channel delete --channel pr-42 --ignore-not-found --yes --json',
|
|
@@ -34,7 +34,7 @@ export default defineCommand({
|
|
|
34
34
|
printJson(resolveAbsentChannel(options.channel));
|
|
35
35
|
}
|
|
36
36
|
else {
|
|
37
|
-
console.log('The channel does not exist
|
|
37
|
+
console.log('The channel does not exist. There is nothing to delete.');
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineCommand } from 'zodline';
|
|
2
1
|
import { createApiClient } from '../../utils/api-client.js';
|
|
3
2
|
import { resolveEffectiveFailurePolicy, resolveFailurePolicyDetails, } from '../../utils/channel-fields.js';
|
|
3
|
+
import { defineCommand } from '../../utils/command.js';
|
|
4
4
|
import { resolveReleaseDeviceCount } from '../../utils/fleet.js';
|
|
5
5
|
import { defineCommandOptions } from '../../utils/global-options.js';
|
|
6
6
|
import { printDetails, printJson } from '../../utils/output.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineCommand } from 'zodline';
|
|
2
1
|
import { createApiClient } from '../../utils/api-client.js';
|
|
2
|
+
import { defineCommand } from '../../utils/command.js';
|
|
3
3
|
import { defineCommandOptions } from '../../utils/global-options.js';
|
|
4
4
|
import { printJson, printTable, resolveDate } from '../../utils/output.js';
|
|
5
5
|
import { paginationShape, resolveNextOffset } from '../../utils/pagination.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineCommand } from 'zodline';
|
|
2
1
|
import { createApiClient } from '../../utils/api-client.js';
|
|
2
|
+
import { defineCommand } from '../../utils/command.js';
|
|
3
3
|
import { defineCommandOptions } from '../../utils/global-options.js';
|
|
4
4
|
import { printJson } from '../../utils/output.js';
|
|
5
5
|
import { confirmConsequence } from '../../utils/prompts.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineCommand } from 'zodline';
|
|
2
1
|
import { createApiClient } from '../../utils/api-client.js';
|
|
2
|
+
import { defineCommand } from '../../utils/command.js';
|
|
3
3
|
import { defineCommandOptions } from '../../utils/global-options.js';
|
|
4
4
|
import { printJson } from '../../utils/output.js';
|
|
5
5
|
import { confirmConsequence } from '../../utils/prompts.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { defineCommand } from 'zodline';
|
|
3
2
|
import { createApiClient } from '../../utils/api-client.js';
|
|
4
3
|
import { channelFieldsClearShape, channelFieldsShape, resolveChannelFields, } from '../../utils/channel-fields.js';
|
|
4
|
+
import { defineCommand } from '../../utils/command.js';
|
|
5
5
|
import { defineCommandOptions } from '../../utils/global-options.js';
|
|
6
6
|
import { printJson } from '../../utils/output.js';
|
|
7
7
|
import { channelOptionShape, fetchChannel, } from '../../utils/resource-resolution.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineCommand } from 'zodline';
|
|
2
1
|
import { createApiClient } from '../../utils/api-client.js';
|
|
2
|
+
import { defineCommand } from '../../utils/command.js';
|
|
3
3
|
import { defineCommandOptions } from '../../utils/global-options.js';
|
|
4
4
|
import { printJson } from '../../utils/output.js';
|
|
5
5
|
import { fetchOrganizationId } from '../../utils/resource-resolution.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { defineCommand } from '
|
|
2
|
+
import { defineCommand } from '../utils/command.js';
|
|
3
3
|
import { COMPLETION_SHELLS, readCompletionScript, } from '../utils/completion/script-files.js';
|
|
4
4
|
import { InvalidParameterError } from '../utils/errors.js';
|
|
5
5
|
import { defineCommandOptions } from '../utils/global-options.js';
|
|
@@ -10,6 +10,7 @@ import { promptSelect } from '../utils/prompts.js';
|
|
|
10
10
|
const ShellSchema = z.enum(COMPLETION_SHELLS);
|
|
11
11
|
export default defineCommand({
|
|
12
12
|
description: 'Print the completion script for <shell>, bash, fish or zsh: eval "$(hotcodepush completion <shell>)" loads it from ~/.bashrc, or from ~/.zshrc after compinit, and fish loads it saved as ~/.config/fish/completions/hotcodepush.fish.',
|
|
13
|
+
authentication: 'optional',
|
|
13
14
|
examples: [
|
|
14
15
|
'eval "$(hotcodepush completion zsh)"',
|
|
15
16
|
'hotcodepush completion fish > ~/.config/fish/completions/hotcodepush.fish',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineCommand } from 'zodline';
|
|
2
1
|
import { createApiClient } from '../../utils/api-client.js';
|
|
2
|
+
import { defineCommand } from '../../utils/command.js';
|
|
3
3
|
import { defineCommandOptions } from '../../utils/global-options.js';
|
|
4
4
|
import { printJson } from '../../utils/output.js';
|
|
5
5
|
import { fetchOrganizationId } from '../../utils/resource-resolution.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineCommand } from 'zodline';
|
|
2
1
|
import { createApiClient } from '../../utils/api-client.js';
|
|
2
|
+
import { defineCommand } from '../../utils/command.js';
|
|
3
3
|
import { deviceOptionShape, resolveDeviceReference, } from '../../utils/device-resolution.js';
|
|
4
4
|
import { defineCommandOptions } from '../../utils/global-options.js';
|
|
5
5
|
import { printJson } from '../../utils/output.js';
|
|
6
6
|
import { confirmConsequence } from '../../utils/prompts.js';
|
|
7
7
|
export default defineCommand({
|
|
8
|
-
description: "Delete a device's record, an erasure request
|
|
8
|
+
description: "Delete a device's record, an erasure request. The device reports again with its next check.",
|
|
9
9
|
examples: [
|
|
10
10
|
'hotcodepush device delete --device 6b1e9d37-2f5c-4a80-9c46-d8e3a1f7b259',
|
|
11
11
|
'hotcodepush device delete --device 6b1e9d37-2f5c-4a80-9c46-d8e3a1f7b259 --yes --json',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineCommand } from 'zodline';
|
|
2
1
|
import { createApiClient } from '../../utils/api-client.js';
|
|
2
|
+
import { defineCommand } from '../../utils/command.js';
|
|
3
3
|
import { deviceOptionShape, resolveDeviceReference, } from '../../utils/device-resolution.js';
|
|
4
4
|
import { defineCommandOptions } from '../../utils/global-options.js';
|
|
5
5
|
import { printDetails, printJson, printTable, resolveDate, } from '../../utils/output.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { defineCommand } from 'zodline';
|
|
3
2
|
import { createApiClient } from '../../utils/api-client.js';
|
|
3
|
+
import { defineCommand } from '../../utils/command.js';
|
|
4
4
|
import { resolveTimeBound } from '../../utils/duration.js';
|
|
5
5
|
import { defineCommandOptions } from '../../utils/global-options.js';
|
|
6
6
|
import { printJson, printTable, resolveDate } from '../../utils/output.js';
|
|
@@ -8,7 +8,7 @@ import { paginationShape, resolveNextOffset } from '../../utils/pagination.js';
|
|
|
8
8
|
import { readProjectConfig } from '../../utils/project-config.js';
|
|
9
9
|
import { fetchAppId, fetchChannels, fetchResourceId, } from '../../utils/resource-resolution.js';
|
|
10
10
|
export default defineCommand({
|
|
11
|
-
description: "List the app's devices, the newest report first, filtered by what they reported
|
|
11
|
+
description: "List the app's devices, the newest report first, filtered by what they reported. It is for support and QA, never for a pipeline.",
|
|
12
12
|
examples: [
|
|
13
13
|
'hotcodepush device list --attribute userId=42',
|
|
14
14
|
'hotcodepush device list --platform ios --binary-version 2.4.1 --last-seen-since 2026-09-01T00:00:00Z --json',
|
|
@@ -78,7 +78,7 @@ export default defineCommand({
|
|
|
78
78
|
return;
|
|
79
79
|
}
|
|
80
80
|
printTable({
|
|
81
|
-
emptyText: 'No devices match
|
|
81
|
+
emptyText: 'No devices match. A device appears with its first check.',
|
|
82
82
|
headers: ['ID', 'PLATFORM', 'BINARY', 'CHANNEL', 'SDK', 'LAST SEEN'],
|
|
83
83
|
nextOffset,
|
|
84
84
|
rows: listedDevices.map(device => [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChannelIndexSchema, evaluateChannelIndex, } from '@hotcodepush/protocol';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { defineCommand } from 'zodline';
|
|
4
3
|
import { createApiClient } from '../../utils/api-client.js';
|
|
4
|
+
import { defineCommand } from '../../utils/command.js';
|
|
5
5
|
import { deviceOptionShape } from '../../utils/device-resolution.js';
|
|
6
6
|
import { defineCommandOptions } from '../../utils/global-options.js';
|
|
7
7
|
import { resolveFilesBaseUrl } from '../../utils/hosts.js';
|
|
@@ -130,7 +130,7 @@ export default defineCommand({
|
|
|
130
130
|
'Unknown',
|
|
131
131
|
unknownFacts.length === 0
|
|
132
132
|
? 'nothing'
|
|
133
|
-
: `${unknownFacts.join(', ')}, treated as passing
|
|
133
|
+
: `${unknownFacts.join(', ')}, treated as passing. Pass --device for the facts of a real device.`,
|
|
134
134
|
],
|
|
135
135
|
]);
|
|
136
136
|
if (evaluation !== null && servedIndex.index !== null) {
|
|
@@ -240,7 +240,7 @@ function resolveOutcomeText({ outcome }) {
|
|
|
240
240
|
// The index sequence is the publish time in milliseconds.
|
|
241
241
|
function resolveServedIndexText({ index, status, url }) {
|
|
242
242
|
return index === null
|
|
243
|
-
? `none: HTTP ${status} at ${url}
|
|
243
|
+
? `none: HTTP ${status} at ${url}, so a device gets no release`
|
|
244
244
|
: `published ${new Date(index.sequence).toISOString()}`;
|
|
245
245
|
}
|
|
246
246
|
function resolveUnknownFacts(fetchedDevice, binary) {
|
package/dist/commands/doctor.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ProjectConfigurationSchema, resolveSigningKeyId, } from '@hotcodepush/protocol';
|
|
2
|
-
import { defineCommand } from 'zodline';
|
|
3
2
|
import { INIT_MANUAL_STEP, PACKAGE_JSON, PROJECT_CONFIG_FILE_NAME, } from '../config/consts.js';
|
|
4
3
|
import { createApiClient } from '../utils/api-client.js';
|
|
4
|
+
import { defineCommand } from '../utils/command.js';
|
|
5
5
|
import { fetchCurrentUser, isUnauthenticatedError, resolveCredentialText, } from '../utils/credential.js';
|
|
6
6
|
import { resolveCliError, resolveSentence } from '../utils/error-mapping.js';
|
|
7
7
|
import { CliError, InvalidJsonError, NotLoggedInError, ReportedFailureError, SigningKeyUnavailableError, UnknownFrameworkError, } from '../utils/errors.js';
|
|
@@ -22,6 +22,7 @@ const CHANNEL_NAME_SCHEMA = ProjectConfigurationSchema.shape.channel;
|
|
|
22
22
|
const PROBE_TIMEOUT_MS = 5000;
|
|
23
23
|
export default defineCommand({
|
|
24
24
|
description: 'Check the project: its configuration, the hook wiring, the signing key, the hosts and the versions a bug report needs.',
|
|
25
|
+
authentication: 'optional',
|
|
25
26
|
examples: ['hotcodepush doctor', 'hotcodepush doctor --json'],
|
|
26
27
|
options: defineCommandOptions({}),
|
|
27
28
|
action: async (options) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { defineCommand } from '
|
|
3
|
+
import { defineCommand } from '../../utils/command.js';
|
|
4
4
|
import { InvalidParameterError } from '../../utils/errors.js';
|
|
5
5
|
import { defineCommandOptions } from '../../utils/global-options.js';
|
|
6
6
|
import { printJson, printTable } from '../../utils/output.js';
|
|
@@ -16,7 +16,8 @@ const FingerprintFileSchema = z.object({
|
|
|
16
16
|
})),
|
|
17
17
|
});
|
|
18
18
|
export default defineCommand({
|
|
19
|
-
description: 'Print the packages and extra fingerprint paths added, removed or moved between <file-a> and <file-b>, two files written by fingerprint --json, the earlier first
|
|
19
|
+
description: 'Print the packages and extra fingerprint paths added, removed or moved between <file-a> and <file-b>, two files written by fingerprint --json, the earlier first. Runs locally without a login.',
|
|
20
|
+
authentication: 'optional',
|
|
20
21
|
examples: [
|
|
21
22
|
'hotcodepush fingerprint diff store-build.json current.json',
|
|
22
23
|
'hotcodepush fingerprint diff store-build.json current.json --json',
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { computeFingerprint } from '@hotcodepush/protocol/fingerprint';
|
|
2
|
-
import { defineCommand } from '
|
|
2
|
+
import { defineCommand } from '../utils/command.js';
|
|
3
3
|
import { readProjectFingerprintContributors } from '../utils/fingerprint.js';
|
|
4
4
|
import { defineCommandOptions } from '../utils/global-options.js';
|
|
5
5
|
import { printJson, printTable } from '../utils/output.js';
|
|
6
6
|
import { locateProjectConfig } from '../utils/project-config.js';
|
|
7
7
|
export default defineCommand({
|
|
8
|
-
description: "Print the project's native fingerprint with the packages and the files under the extra fingerprint paths that contribute to it
|
|
8
|
+
description: "Print the project's native fingerprint with the packages and the files under the extra fingerprint paths that contribute to it. Runs locally without a login.",
|
|
9
|
+
authentication: 'optional',
|
|
9
10
|
examples: [
|
|
10
11
|
'hotcodepush fingerprint',
|
|
11
12
|
'hotcodepush fingerprint --json > fingerprint.json',
|
package/dist/commands/init.js
CHANGED
|
@@ -2,9 +2,9 @@ import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
|
2
2
|
import { basename, join } from 'node:path';
|
|
3
3
|
import { HotCodePushError } from '@hotcodepush/node';
|
|
4
4
|
import { z } from 'zod';
|
|
5
|
-
import { defineCommand } from 'zodline';
|
|
6
5
|
import { DOCS_URL, PROJECT_CONFIG_FILE_NAME, SIGNING_PRIVATE_KEY_FILE_NAME, } from '../config/consts.js';
|
|
7
6
|
import { createApiClient } from '../utils/api-client.js';
|
|
7
|
+
import { defineCommand } from '../utils/command.js';
|
|
8
8
|
import { fetchCurrentUser, isUnauthenticatedError, resolveCredentialText, } from '../utils/credential.js';
|
|
9
9
|
import { isInteractive } from '../utils/environment.js';
|
|
10
10
|
import { ConfirmationRequiredError, InvalidParameterError, MissingParameterError, NotLoggedInError, ReportedFailureError, UnexpectedError, } from '../utils/errors.js';
|
|
@@ -14,6 +14,7 @@ import { defineCommandOptions } from '../utils/global-options.js';
|
|
|
14
14
|
import { resolveConsoleBaseUrl } from '../utils/hosts.js';
|
|
15
15
|
import { InitRun, resolveStepRows } from '../utils/init-steps.js';
|
|
16
16
|
import { stringifyLikeSource } from '../utils/json-file.js';
|
|
17
|
+
import { logIn } from '../utils/login.js';
|
|
17
18
|
import { printOutcomeRows } from '../utils/outcome.js';
|
|
18
19
|
import { printJson } from '../utils/output.js';
|
|
19
20
|
import { readPackageJson } from '../utils/package-json.js';
|
|
@@ -23,12 +24,12 @@ import { confirmConsequence, promptSelect, promptText, promptYesNo, } from '../u
|
|
|
23
24
|
import { fetchApps, fetchHasSigningKey, fetchOrganizations, } from '../utils/resource-resolution.js';
|
|
24
25
|
import { isEnvironmentToken, readToken } from '../utils/token-store.js';
|
|
25
26
|
import { readApiUrl } from '../utils/user-config.js';
|
|
26
|
-
import { logIn } from './login.js';
|
|
27
27
|
import releaseCreateCommand from './release/create.js';
|
|
28
28
|
import signingKeyCreateCommand from './signing-key/create.js';
|
|
29
29
|
const CREATE_CHOICE = 'create';
|
|
30
30
|
export default defineCommand({
|
|
31
31
|
description: 'Set a React Native, Expo, Capacitor or Cordova project up from sign-in to the first release, re-runnable at any step.',
|
|
32
|
+
authentication: 'optional',
|
|
32
33
|
examples: ['hotcodepush init', 'hotcodepush init --yes --json'],
|
|
33
34
|
options: defineCommandOptions({
|
|
34
35
|
androidPath: z
|
|
@@ -396,7 +397,7 @@ async function releaseFirst({ configFilePath, directoryPath, framework, packageJ
|
|
|
396
397
|
function printFinish(app, isReleased, privateKeyPath) {
|
|
397
398
|
console.log('');
|
|
398
399
|
console.log(isReleased
|
|
399
|
-
? `Build the app natively once and run it
|
|
400
|
+
? `Build the app natively once and run it. Change a line, run the build and "${resolveReleaseCommandText(privateKeyPath)}", then reopen the app.`
|
|
400
401
|
: 'Build the app natively once and run it, then publish the first release as shown above.');
|
|
401
402
|
console.log(`Console: ${resolveConsoleBaseUrl(readApiUrl())}/apps/${app.id}`);
|
|
402
403
|
console.log(`Docs: ${DOCS_URL}`);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { defineCommand } from 'zodline';
|
|
3
2
|
import { createApiClient } from '../../utils/api-client.js';
|
|
3
|
+
import { defineCommand } from '../../utils/command.js';
|
|
4
4
|
import { isInteractive } from '../../utils/environment.js';
|
|
5
5
|
import { MissingParameterError } from '../../utils/errors.js';
|
|
6
6
|
import { defineCommandOptions } from '../../utils/global-options.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { defineCommand } from 'zodline';
|
|
3
2
|
import { createApiClient } from '../../utils/api-client.js';
|
|
3
|
+
import { defineCommand } from '../../utils/command.js';
|
|
4
4
|
import { defineCommandOptions } from '../../utils/global-options.js';
|
|
5
5
|
import { printJson } from '../../utils/output.js';
|
|
6
6
|
import { confirmConsequence, promptSelect, promptText, } from '../../utils/prompts.js';
|
|
@@ -11,7 +11,7 @@ const INVITATION_ROLES = [
|
|
|
11
11
|
'member',
|
|
12
12
|
];
|
|
13
13
|
export default defineCommand({
|
|
14
|
-
description: 'Invite an address to the organization with a role
|
|
14
|
+
description: 'Invite an address to the organization with a role. The invitation mail is valid for two days.',
|
|
15
15
|
examples: [
|
|
16
16
|
'hotcodepush invitation create --email anna@example.com --role member',
|
|
17
17
|
'hotcodepush invitation create --organization Acme --email anna@example.com --role admin --yes --json',
|