@detergent-software/atk 8.8.1 → 8.9.0-dev.10
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 +77 -0
- package/build/cli.js +0 -0
- package/build/commands/publish.d.ts.map +1 -1
- package/build/commands/publish.js +19 -23
- package/build/commands/publish.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.d.ts.map +1 -1
- package/build/lib/adapter.js +29 -4
- package/build/lib/adapter.js.map +1 -1
- package/build/lib/atk-api/errors.d.ts +5 -2
- package/build/lib/atk-api/errors.d.ts.map +1 -1
- package/build/lib/atk-api/errors.js +1 -0
- package/build/lib/atk-api/errors.js.map +1 -1
- package/build/lib/atk-api/generated/types.gen.d.ts +12 -12
- package/build/lib/atk-api/index.d.ts +2 -2
- package/build/lib/atk-api/index.d.ts.map +1 -1
- package/build/lib/atk-api/index.js +1 -1
- package/build/lib/atk-api/index.js.map +1 -1
- package/build/lib/atk-api/web-routes.d.ts +25 -6
- package/build/lib/atk-api/web-routes.d.ts.map +1 -1
- package/build/lib/atk-api/web-routes.js +27 -8
- package/build/lib/atk-api/web-routes.js.map +1 -1
- package/build/lib/checksum.d.ts +30 -14
- package/build/lib/checksum.d.ts.map +1 -1
- package/build/lib/checksum.js +93 -57
- package/build/lib/checksum.js.map +1 -1
- package/build/lib/config-entries.d.ts +5 -1
- package/build/lib/config-entries.d.ts.map +1 -1
- package/build/lib/config-entries.js +7 -3
- package/build/lib/config-entries.js.map +1 -1
- package/build/lib/hook-config.d.ts +11 -1
- package/build/lib/hook-config.d.ts.map +1 -1
- package/build/lib/hook-config.js +22 -3
- package/build/lib/hook-config.js.map +1 -1
- package/build/lib/hook-script.d.ts +4 -0
- package/build/lib/hook-script.d.ts.map +1 -1
- package/build/lib/hook-script.js +4 -0
- package/build/lib/hook-script.js.map +1 -1
- package/build/lib/init.d.ts.map +1 -1
- package/build/lib/init.js +7 -1
- package/build/lib/init.js.map +1 -1
- package/build/lib/installer.d.ts +2 -7
- package/build/lib/installer.d.ts.map +1 -1
- package/build/lib/installer.js +49 -13
- package/build/lib/installer.js.map +1 -1
- package/build/lib/lockfile.d.ts +10 -6
- package/build/lib/lockfile.d.ts.map +1 -1
- package/build/lib/lockfile.js +191 -50
- package/build/lib/lockfile.js.map +1 -1
- 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/publish-flow.d.ts +227 -0
- package/build/lib/publish-flow.d.ts.map +1 -0
- package/build/lib/publish-flow.js +1316 -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 +2 -1
- package/build/lib/publisher.d.ts.map +1 -1
- package/build/lib/publisher.js +20 -18
- package/build/lib/publisher.js.map +1 -1
- package/build/lib/registry.d.ts +2 -1
- package/build/lib/registry.d.ts.map +1 -1
- package/build/lib/registry.js +2 -1
- 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/adapter.d.ts +12 -0
- package/build/lib/schemas/adapter.d.ts.map +1 -1
- package/build/lib/schemas/adapter.js +10 -1
- package/build/lib/schemas/adapter.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.map +1 -1
- package/build/lib/sync.js +28 -0
- 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/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
- package/tool-adapters/claude-code.json +10 -2
|
@@ -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":"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