@detergent-software/atk 8.9.0-dev.2 → 8.9.0-dev.21
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 +145 -0
- package/README.md +13 -3
- package/build/cli.js +18 -6
- package/build/cli.js.map +1 -1
- package/build/command-manifest.json +1507 -0
- package/build/commands/_app.d.ts.map +1 -1
- package/build/commands/_app.js +8 -4
- package/build/commands/_app.js.map +1 -1
- package/build/commands/audit.d.ts.map +1 -1
- package/build/commands/audit.js +1 -1
- package/build/commands/audit.js.map +1 -1
- package/build/commands/browse.js +2 -2
- package/build/commands/browse.js.map +1 -1
- package/build/commands/cache.d.ts +1 -1
- package/build/commands/cache.d.ts.map +1 -1
- package/build/commands/cache.js +1 -16
- package/build/commands/cache.js.map +1 -1
- package/build/commands/config.d.ts.map +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/config.js.map +1 -1
- package/build/commands/diff.d.ts.map +1 -1
- package/build/commands/diff.js +4 -0
- package/build/commands/diff.js.map +1 -1
- package/build/commands/drift.d.ts.map +1 -1
- package/build/commands/drift.js +4 -0
- package/build/commands/drift.js.map +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/index.js.map +1 -1
- package/build/commands/info.d.ts.map +1 -1
- package/build/commands/info.js +50 -33
- package/build/commands/info.js.map +1 -1
- package/build/commands/init.d.ts.map +1 -1
- package/build/commands/init.js +4 -2
- package/build/commands/init.js.map +1 -1
- package/build/commands/install.d.ts.map +1 -1
- package/build/commands/install.js +28 -7
- package/build/commands/install.js.map +1 -1
- package/build/commands/list.js +2 -2
- package/build/commands/list.js.map +1 -1
- package/build/commands/login.d.ts.map +1 -1
- package/build/commands/login.js +12 -2
- package/build/commands/login.js.map +1 -1
- package/build/commands/logout.d.ts.map +1 -1
- package/build/commands/logout.js +9 -1
- package/build/commands/logout.js.map +1 -1
- package/build/commands/outdated.js +1 -1
- package/build/commands/outdated.js.map +1 -1
- package/build/commands/publish.d.ts +1 -1
- package/build/commands/publish.d.ts.map +1 -1
- package/build/commands/publish.js +32 -36
- package/build/commands/publish.js.map +1 -1
- package/build/commands/release-notes.d.ts.map +1 -1
- package/build/commands/release-notes.js +4 -0
- package/build/commands/release-notes.js.map +1 -1
- package/build/commands/schema.d.ts +3 -3
- package/build/commands/search.js +1 -1
- package/build/commands/search.js.map +1 -1
- package/build/commands/sync.d.ts +1 -1
- package/build/commands/sync.d.ts.map +1 -1
- package/build/commands/sync.js +27 -12
- package/build/commands/sync.js.map +1 -1
- package/build/commands/update.d.ts.map +1 -1
- package/build/commands/update.js +58 -9
- package/build/commands/update.js.map +1 -1
- package/build/commands/whoami.d.ts.map +1 -1
- package/build/commands/whoami.js +16 -4
- package/build/commands/whoami.js.map +1 -1
- package/build/commands/why.js +3 -4
- package/build/commands/why.js.map +1 -1
- package/build/components/Header.d.ts +2 -3
- package/build/components/Header.d.ts.map +1 -1
- package/build/components/Header.js +2 -9
- package/build/components/Header.js.map +1 -1
- package/build/components/LocalEditsHint.d.ts +16 -0
- package/build/components/LocalEditsHint.d.ts.map +1 -0
- package/build/components/LocalEditsHint.js +18 -0
- package/build/components/LocalEditsHint.js.map +1 -0
- package/build/components/SyncAllInSync.d.ts +5 -1
- package/build/components/SyncAllInSync.d.ts.map +1 -1
- package/build/components/SyncAllInSync.js +2 -2
- package/build/components/SyncAllInSync.js.map +1 -1
- package/build/components/header-art.d.ts +7 -0
- package/build/components/header-art.d.ts.map +1 -0
- package/build/components/header-art.js +14 -0
- package/build/components/header-art.js.map +1 -0
- package/build/components/index.d.ts +1 -0
- package/build/components/index.d.ts.map +1 -1
- package/build/components/index.js +1 -0
- package/build/components/index.js.map +1 -1
- package/build/hooks/useListActions.d.ts.map +1 -1
- package/build/hooks/useListActions.js +4 -0
- package/build/hooks/useListActions.js.map +1 -1
- package/build/hooks/usePublishState.d.ts +38 -207
- package/build/hooks/usePublishState.d.ts.map +1 -1
- package/build/hooks/usePublishState.js +83 -1501
- package/build/hooks/usePublishState.js.map +1 -1
- package/build/lib/adapter.js +23 -3
- package/build/lib/adapter.js.map +1 -1
- package/build/lib/api-client.d.ts +9 -5
- package/build/lib/api-client.d.ts.map +1 -1
- package/build/lib/api-client.js +35 -8
- package/build/lib/api-client.js.map +1 -1
- package/build/lib/atk-api/generated/types.gen.d.ts +4 -4
- package/build/lib/auth.d.ts +12 -2
- package/build/lib/auth.d.ts.map +1 -1
- package/build/lib/auth.js +38 -3
- package/build/lib/auth.js.map +1 -1
- package/build/lib/checksum.d.ts +40 -14
- package/build/lib/checksum.d.ts.map +1 -1
- package/build/lib/checksum.js +110 -57
- package/build/lib/checksum.js.map +1 -1
- package/build/lib/config.d.ts.map +1 -1
- package/build/lib/config.js +28 -5
- package/build/lib/config.js.map +1 -1
- package/build/lib/diagnostics.d.ts.map +1 -1
- package/build/lib/diagnostics.js +10 -7
- package/build/lib/diagnostics.js.map +1 -1
- package/build/lib/diff-command.js +1 -1
- package/build/lib/diff-command.js.map +1 -1
- package/build/lib/errors.d.ts +4 -1
- package/build/lib/errors.d.ts.map +1 -1
- package/build/lib/errors.js.map +1 -1
- package/build/lib/format-age.d.ts +3 -0
- package/build/lib/format-age.d.ts.map +1 -0
- package/build/lib/format-age.js +18 -0
- package/build/lib/format-age.js.map +1 -0
- package/build/lib/installer.d.ts +2 -7
- package/build/lib/installer.d.ts.map +1 -1
- package/build/lib/installer.js +30 -5
- package/build/lib/installer.js.map +1 -1
- package/build/lib/local-edits.d.ts +72 -0
- package/build/lib/local-edits.d.ts.map +1 -0
- package/build/lib/local-edits.js +145 -0
- package/build/lib/local-edits.js.map +1 -0
- package/build/lib/lockfile.d.ts +12 -8
- package/build/lib/lockfile.d.ts.map +1 -1
- package/build/lib/lockfile.js +193 -52
- package/build/lib/lockfile.js.map +1 -1
- package/build/lib/mover.d.ts.map +1 -1
- package/build/lib/mover.js +8 -12
- package/build/lib/mover.js.map +1 -1
- package/build/lib/offline.d.ts +19 -0
- package/build/lib/offline.d.ts.map +1 -0
- package/build/lib/offline.js +26 -0
- package/build/lib/offline.js.map +1 -0
- package/build/lib/owned-paths.d.ts +4 -2
- package/build/lib/owned-paths.d.ts.map +1 -1
- package/build/lib/owned-paths.js +19 -6
- package/build/lib/owned-paths.js.map +1 -1
- package/build/lib/pastel/commander-specs.d.ts +7 -0
- package/build/lib/pastel/commander-specs.d.ts.map +1 -0
- package/build/lib/pastel/commander-specs.js +50 -0
- package/build/lib/pastel/commander-specs.js.map +1 -0
- package/build/lib/pastel/generate-arguments.d.ts +3 -3
- package/build/lib/pastel/generate-arguments.d.ts.map +1 -1
- package/build/lib/pastel/generate-arguments.js +25 -22
- package/build/lib/pastel/generate-arguments.js.map +1 -1
- package/build/lib/pastel/generate-command.d.ts +7 -5
- package/build/lib/pastel/generate-command.d.ts.map +1 -1
- package/build/lib/pastel/generate-command.js +32 -67
- package/build/lib/pastel/generate-command.js.map +1 -1
- package/build/lib/pastel/generate-commands.d.ts +3 -5
- package/build/lib/pastel/generate-commands.d.ts.map +1 -1
- package/build/lib/pastel/generate-commands.js +6 -10
- package/build/lib/pastel/generate-commands.js.map +1 -1
- package/build/lib/pastel/generate-options.d.ts +3 -3
- package/build/lib/pastel/generate-options.d.ts.map +1 -1
- package/build/lib/pastel/generate-options.js +16 -13
- package/build/lib/pastel/generate-options.js.map +1 -1
- package/build/lib/pastel/index.d.ts +26 -4
- package/build/lib/pastel/index.d.ts.map +1 -1
- package/build/lib/pastel/index.js +104 -18
- package/build/lib/pastel/index.js.map +1 -1
- package/build/lib/pastel/internal-types.d.ts +39 -8
- package/build/lib/pastel/internal-types.d.ts.map +1 -1
- package/build/lib/pastel/manifest.d.ts +8 -0
- package/build/lib/pastel/manifest.d.ts.map +1 -0
- package/build/lib/pastel/manifest.js +7 -0
- package/build/lib/pastel/manifest.js.map +1 -0
- package/build/lib/pastel/read-commands.d.ts +7 -2
- package/build/lib/pastel/read-commands.d.ts.map +1 -1
- package/build/lib/pastel/read-commands.js +51 -30
- package/build/lib/pastel/read-commands.js.map +1 -1
- package/build/lib/pastel/render-command.d.ts +13 -0
- package/build/lib/pastel/render-command.d.ts.map +1 -0
- package/build/lib/pastel/render-command.js +56 -0
- package/build/lib/pastel/render-command.js.map +1 -0
- package/build/lib/publish-flow.d.ts +225 -0
- package/build/lib/publish-flow.d.ts.map +1 -0
- package/build/lib/publish-flow.js +1242 -0
- package/build/lib/publish-flow.js.map +1 -0
- package/build/lib/publish-run.d.ts +55 -0
- package/build/lib/publish-run.d.ts.map +1 -0
- package/build/lib/publish-run.js +164 -0
- package/build/lib/publish-run.js.map +1 -0
- package/build/lib/publisher.d.ts +11 -16
- package/build/lib/publisher.d.ts.map +1 -1
- package/build/lib/publisher.js +25 -42
- package/build/lib/publisher.js.map +1 -1
- package/build/lib/registry.d.ts +15 -1
- package/build/lib/registry.d.ts.map +1 -1
- package/build/lib/registry.js +108 -24
- package/build/lib/registry.js.map +1 -1
- package/build/lib/root-path.d.ts +11 -0
- package/build/lib/root-path.d.ts.map +1 -1
- package/build/lib/root-path.js +15 -1
- package/build/lib/root-path.js.map +1 -1
- package/build/lib/schemas/config.js +1 -1
- package/build/lib/schemas/config.js.map +1 -1
- package/build/lib/schemas/lockfile.d.ts +156 -23
- package/build/lib/schemas/lockfile.d.ts.map +1 -1
- package/build/lib/schemas/lockfile.js +100 -79
- package/build/lib/schemas/lockfile.js.map +1 -1
- package/build/lib/staging.d.ts +15 -0
- package/build/lib/staging.d.ts.map +1 -0
- package/build/lib/staging.js +33 -0
- package/build/lib/staging.js.map +1 -0
- package/build/lib/sync.d.ts +22 -6
- package/build/lib/sync.d.ts.map +1 -1
- package/build/lib/sync.js +59 -7
- package/build/lib/sync.js.map +1 -1
- package/build/lib/uninstaller.js +2 -2
- package/build/lib/uninstaller.js.map +1 -1
- package/build/lib/update-check.d.ts.map +1 -1
- package/build/lib/update-check.js +5 -1
- package/build/lib/update-check.js.map +1 -1
- package/build/lib/updater.d.ts +31 -1
- package/build/lib/updater.d.ts.map +1 -1
- package/build/lib/updater.js +143 -4
- package/build/lib/updater.js.map +1 -1
- package/build/lib/usage-error.d.ts +20 -0
- package/build/lib/usage-error.d.ts.map +1 -0
- package/build/lib/usage-error.js +41 -0
- package/build/lib/usage-error.js.map +1 -0
- package/build/lib/write-file.d.ts +5 -0
- package/build/lib/write-file.d.ts.map +1 -1
- package/build/lib/write-file.js +10 -7
- package/build/lib/write-file.js.map +1 -1
- package/package.json +81 -81
|
@@ -1,215 +1,46 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
type: 'TOOLS_LOADED';
|
|
8
|
-
} | {
|
|
9
|
-
authorValue: string;
|
|
10
|
-
orgValue: string;
|
|
11
|
-
rawDetection: RawAssetDetection;
|
|
12
|
-
toolsDetected: string[];
|
|
13
|
-
type: 'RAW_DETECT_DONE';
|
|
14
|
-
} | {
|
|
15
|
-
code?: string;
|
|
16
|
-
command?: string;
|
|
17
|
-
hint?: string;
|
|
18
|
-
message: string;
|
|
19
|
-
type: 'ERROR';
|
|
20
|
-
} | {
|
|
21
|
-
entries: PublishEntryState[];
|
|
22
|
-
type: 'ENTRIES_CHECKED';
|
|
23
|
-
} | {
|
|
24
|
-
entries: PublishEntryState[];
|
|
25
|
-
type: 'ENTRIES_LOADED';
|
|
26
|
-
} | {
|
|
27
|
-
error: ErrorAction;
|
|
28
|
-
missing: DeclaredDependency[];
|
|
29
|
-
suggested: PublishEntry[];
|
|
30
|
-
type: 'SUGGEST_ENTRIES';
|
|
31
|
-
} | {
|
|
32
|
-
isUpdate: boolean;
|
|
33
|
-
resolvedVersion: string;
|
|
34
|
-
token: string;
|
|
35
|
-
type: 'REGISTRY_CHECK_DONE';
|
|
36
|
-
versionCheck: VersionCheckResult;
|
|
37
|
-
} | {
|
|
38
|
-
lockfileOrgReviewers?: string[];
|
|
39
|
-
type: 'VALIDATE_DONE';
|
|
40
|
-
validation: ValidationResult;
|
|
41
|
-
} | {
|
|
42
|
-
manifestDiff?: ManifestFieldChange[];
|
|
43
|
-
plan: PublishPlan;
|
|
44
|
-
type: 'PLAN_DONE';
|
|
45
|
-
} | {
|
|
46
|
-
message: string;
|
|
47
|
-
type: 'BUMP_DONE';
|
|
48
|
-
updatedTarget: PublishTarget;
|
|
49
|
-
version: string;
|
|
50
|
-
} | {
|
|
51
|
-
message: string;
|
|
52
|
-
type: 'PUBLISH_PROGRESS';
|
|
53
|
-
} | {
|
|
54
|
-
rawDetection: RawAssetDetection;
|
|
55
|
-
target: PublishTarget;
|
|
56
|
-
type: 'RAW_DETECT_DONE_NON_INTERACTIVE';
|
|
57
|
-
} | {
|
|
58
|
-
resolvedPath: string;
|
|
59
|
-
type: 'RESOLVED_INSTALLED';
|
|
60
|
-
} | {
|
|
61
|
-
resolvedPath: string;
|
|
62
|
-
type: 'RESOLVED_UPDATE';
|
|
63
|
-
} | {
|
|
64
|
-
result: PublishResult;
|
|
65
|
-
type: 'PUBLISH_DONE';
|
|
66
|
-
} | {
|
|
67
|
-
target: PublishTarget;
|
|
68
|
-
type: 'DETECT_DONE';
|
|
69
|
-
} | {
|
|
70
|
-
target: PublishTarget;
|
|
71
|
-
type: 'STAGING_DONE';
|
|
72
|
-
} | {
|
|
73
|
-
tool: string;
|
|
74
|
-
type: 'TOGGLE_PROMPT_TOOL';
|
|
75
|
-
} | {
|
|
76
|
-
tools: string[];
|
|
77
|
-
type: 'RESOLVE_TOOLS_NONINTERACTIVE';
|
|
78
|
-
} | {
|
|
79
|
-
type: 'CONFIRM_PROMPT_TOOLS';
|
|
80
|
-
} | {
|
|
81
|
-
type: 'INSTALL_DONE';
|
|
82
|
-
} | {
|
|
83
|
-
type: 'SET_BUMP_SELECTION';
|
|
84
|
-
value: string;
|
|
85
|
-
} | {
|
|
86
|
-
type: 'SET_CONFIRM_VALUE';
|
|
87
|
-
value: string;
|
|
88
|
-
} | {
|
|
89
|
-
type: 'SET_DESCRIPTION';
|
|
1
|
+
import { type PublishFlags, type PublishState } from '../lib/publish-flow.js';
|
|
2
|
+
/** The text field of the prompt the run waits on. */
|
|
3
|
+
export interface PublishInput {
|
|
4
|
+
onChange: (value: string) => void;
|
|
5
|
+
/** Answer the prompt with what was typed; a second Enter before the next prompt does nothing. */
|
|
6
|
+
onSubmit: () => void;
|
|
90
7
|
value: string;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
} | {
|
|
104
|
-
type: 'SET_WITH_CONFIRM_VALUE';
|
|
105
|
-
value: string;
|
|
106
|
-
} | {
|
|
107
|
-
type: 'SUBMIT_BUMP';
|
|
108
|
-
} | {
|
|
109
|
-
type: 'SUBMIT_CONFIRM';
|
|
110
|
-
} | {
|
|
111
|
-
type: 'SUBMIT_DESCRIPTION';
|
|
112
|
-
} | {
|
|
113
|
-
type: 'SUBMIT_PROMPT_TAGS';
|
|
114
|
-
} | {
|
|
115
|
-
type: 'SUBMIT_PUBLISH_CONFIRM';
|
|
116
|
-
} | {
|
|
117
|
-
type: 'SUBMIT_REVIEWER';
|
|
118
|
-
} | {
|
|
119
|
-
type: 'SUBMIT_TAGS';
|
|
120
|
-
} | {
|
|
121
|
-
type: 'SUBMIT_WITH_CONFIRM';
|
|
122
|
-
} | {
|
|
8
|
+
}
|
|
9
|
+
/** The tools prompt's checklist, with the keys that work it. */
|
|
10
|
+
export interface PublishToolPicker extends ToolPickerState {
|
|
11
|
+
/** Answer the tools prompt with the ticked tools, once there is one. */
|
|
12
|
+
confirm: () => void;
|
|
13
|
+
down: () => void;
|
|
14
|
+
/** Tick or untick the tool under the cursor. */
|
|
15
|
+
toggle: () => void;
|
|
16
|
+
up: () => void;
|
|
17
|
+
}
|
|
18
|
+
export type ToolPickerAction = {
|
|
19
|
+
count: number;
|
|
123
20
|
type: 'TOOL_CURSOR_DOWN';
|
|
124
21
|
} | {
|
|
22
|
+
count: number;
|
|
125
23
|
type: 'TOOL_CURSOR_UP';
|
|
24
|
+
} | {
|
|
25
|
+
tool: string;
|
|
26
|
+
type: 'TOGGLE_PROMPT_TOOL';
|
|
126
27
|
};
|
|
127
|
-
/**
|
|
128
|
-
export interface
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
validation?: ValidationResult;
|
|
132
|
-
/** Set once `checking-entries` ran for the entry. */
|
|
133
|
-
versionCheck?: VersionCheckResult;
|
|
134
|
-
}
|
|
135
|
-
export interface PublishFlags {
|
|
136
|
-
bump?: 'major' | 'minor' | 'patch';
|
|
137
|
-
descriptionFlag?: string;
|
|
138
|
-
dryRun: boolean;
|
|
139
|
-
force?: boolean;
|
|
140
|
-
fromInstalled: boolean;
|
|
141
|
-
isTTY?: boolean;
|
|
142
|
-
json?: boolean;
|
|
143
|
-
message?: string;
|
|
144
|
-
/** Every path given; more than one publishes them as one batch, `rawPath` (the first) as its root. */
|
|
145
|
-
paths?: string[];
|
|
146
|
-
projectRoot?: string;
|
|
147
|
-
rawPath: string;
|
|
148
|
-
refresh?: boolean;
|
|
149
|
-
reviewerFlag?: string;
|
|
150
|
-
tagsFlag?: string;
|
|
151
|
-
tool?: string;
|
|
152
|
-
toolsFlag?: string;
|
|
153
|
-
update: boolean;
|
|
154
|
-
/** `--with` folders: new dependencies published in the same pull request. */
|
|
155
|
-
withPaths?: string[];
|
|
156
|
-
yes?: boolean;
|
|
157
|
-
}
|
|
158
|
-
export type PublishPhase = 'building-plan' | 'bump-prompt' | 'checking-entries' | 'checking-registry' | 'confirm-publish' | 'confirm-update' | 'confirm-with' | 'detecting' | 'done' | 'dry-run-result' | 'error' | 'gathering-metadata' | 'installing' | 'loading-tools' | 'prompting-reviewer' | 'prompting-tags' | 'prompting-tools' | 'publishing' | 'resolving-installed' | 'resolving-update' | 'validating';
|
|
159
|
-
export interface PublishState {
|
|
160
|
-
authorValue: string;
|
|
161
|
-
/** The entry the bump prompt is for; unset when it is for the root asset. */
|
|
162
|
-
bumpEntry?: number;
|
|
163
|
-
bumpSelection: string;
|
|
164
|
-
confirmValue: string;
|
|
165
|
-
descriptionValue: string;
|
|
166
|
-
/** New dependencies published with the root asset, in request order. */
|
|
167
|
-
entries: PublishEntryState[];
|
|
168
|
-
errorCode?: string;
|
|
169
|
-
errorCommand?: string;
|
|
170
|
-
errorHint?: string;
|
|
171
|
-
errorMessage: string;
|
|
172
|
-
flags: PublishFlags;
|
|
173
|
-
isRawPublish: boolean;
|
|
174
|
-
isUpdate: boolean;
|
|
175
|
-
manifestDiff: ManifestFieldChange[] | undefined;
|
|
176
|
-
metadataSubPhase: MetadataSubPhase;
|
|
177
|
-
/** The missing dependencies the `confirm-with` prompt offers folders for. */
|
|
178
|
-
missingDependencies: DeclaredDependency[];
|
|
179
|
-
nonInteractive: boolean;
|
|
180
|
-
orgValue: string;
|
|
181
|
-
/** The plan's error, shown if the `confirm-with` offer is declined. */
|
|
182
|
-
pendingError?: ErrorAction;
|
|
183
|
-
phase: PublishPhase;
|
|
184
|
-
plan: PublishPlan | undefined;
|
|
185
|
-
progressMessage: string;
|
|
186
|
-
promptTagsValue: string;
|
|
187
|
-
publishConfirmValue: string;
|
|
188
|
-
publishResult: PublishResult | undefined;
|
|
189
|
-
rawDetection: null | RawAssetDetection;
|
|
190
|
-
resolvedPath: string;
|
|
191
|
-
resolvedVersion: string;
|
|
192
|
-
reviewerValue: string;
|
|
193
|
-
selectedPromptTools: string[];
|
|
194
|
-
/** Folders next to the root that the `confirm-with` prompt offers to publish too. */
|
|
195
|
-
suggestedEntries: PublishEntry[];
|
|
196
|
-
tagsValue: string;
|
|
197
|
-
target: PublishTarget | undefined;
|
|
198
|
-
token: string | undefined;
|
|
199
|
-
toolAdapters: Adapter[];
|
|
200
|
-
toolCursorIndex: number;
|
|
201
|
-
toolsDetected: string[];
|
|
202
|
-
validation: undefined | ValidationResult;
|
|
203
|
-
versionCheck: undefined | VersionCheckResult;
|
|
204
|
-
withConfirmValue: string;
|
|
28
|
+
/** The tools prompt's checklist: the row under the cursor and the tools ticked so far. */
|
|
29
|
+
export interface ToolPickerState {
|
|
30
|
+
cursor: number;
|
|
31
|
+
selected: string[];
|
|
205
32
|
}
|
|
206
|
-
|
|
207
|
-
|
|
33
|
+
/** Move the tools prompt's cursor over its `count` rows, wrapping at either end, or tick or untick a tool. */
|
|
34
|
+
export declare function toolPickerReducer(picker: ToolPickerState, action: ToolPickerAction): ToolPickerState;
|
|
35
|
+
/**
|
|
36
|
+
* The publish flow for the command's UI. `runPublish` (lib/publish-run.ts) runs it once
|
|
37
|
+
* and this mirrors each state it moves to. The hook is its prompter: a prompt waits on
|
|
38
|
+
* `input`, which shows the state's own value for that prompt (an answer the reducer
|
|
39
|
+
* didn't take stays) until something is typed, or, for tools, on `picker`.
|
|
40
|
+
*/
|
|
41
|
+
export declare function usePublishState(flags: PublishFlags): {
|
|
42
|
+
input: PublishInput;
|
|
43
|
+
picker: PublishToolPicker;
|
|
44
|
+
state: PublishState;
|
|
208
45
|
};
|
|
209
|
-
export declare function createInitialState(flags: PublishFlags): PublishState;
|
|
210
|
-
/** Several folders published together (`atk publish a b c`) in one pull request; one folder named twice is one. */
|
|
211
|
-
export declare function isBatch(flags: PublishFlags): boolean;
|
|
212
|
-
export declare function publishReducer(state: PublishState, action: PublishAction): PublishState;
|
|
213
|
-
export declare function usePublishState(flags: PublishFlags): readonly [PublishState, React.Dispatch<PublishAction>];
|
|
214
|
-
export {};
|
|
215
46
|
//# sourceMappingURL=usePublishState.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePublishState.d.ts","sourceRoot":"","sources":["../../src/hooks/usePublishState.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"usePublishState.d.ts","sourceRoot":"","sources":["../../src/hooks/usePublishState.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAGlG,qDAAqD;AACrD,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,iGAAiG;IACjG,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,gEAAgE;AAChE,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD,wEAAwE;IACxE,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,gDAAgD;IAChD,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,EAAE,EAAE,MAAM,IAAI,CAAC;CAChB;AAED,MAAM,MAAM,gBAAgB,GACxB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,kBAAkB,CAAA;CAAE,GAC3C;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,gBAAgB,CAAA;CAAE,GACzC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,oBAAoB,CAAA;CAAE,CAAC;AAEjD,0FAA0F;AAC1F,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,8GAA8G;AAC9G,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,gBAAgB,GAAG,eAAe,CAoBpG;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,YAAY,GAAG;IACpD,KAAK,EAAE,YAAY,CAAC;IACpB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,KAAK,EAAE,YAAY,CAAC;CACrB,CA6EA"}
|