@detergent-software/atk 8.9.0 → 8.9.1-dev.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/CHANGELOG.md +312 -0
- package/README.md +22 -12
- 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.d.ts.map +1 -1
- package/build/commands/index.js +5 -40
- 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/prune.d.ts.map +1 -1
- package/build/commands/prune.js +4 -2
- package/build/commands/prune.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 +33 -37
- 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/usePruneState.d.ts +1 -7
- package/build/hooks/usePruneState.d.ts.map +1 -1
- package/build/hooks/usePruneState.js +18 -62
- package/build/hooks/usePruneState.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 +10 -1
- package/build/lib/adapter.d.ts.map +1 -1
- package/build/lib/adapter.js +46 -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/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/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 +4 -4
- package/build/lib/config.d.ts.map +1 -1
- package/build/lib/config.js +31 -8
- 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 +8 -11
- package/build/lib/installer.d.ts.map +1 -1
- package/build/lib/installer.js +83 -28
- 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 +209 -59
- package/build/lib/lockfile.js.map +1 -1
- package/build/lib/mover.d.ts.map +1 -1
- package/build/lib/mover.js +11 -12
- package/build/lib/mover.js.map +1 -1
- package/build/lib/multi-tool-install.d.ts +4 -2
- package/build/lib/multi-tool-install.d.ts.map +1 -1
- package/build/lib/multi-tool-install.js +12 -2
- package/build/lib/multi-tool-install.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 +7 -4
- package/build/lib/owned-paths.d.ts.map +1 -1
- package/build/lib/owned-paths.js +23 -8
- package/build/lib/owned-paths.js.map +1 -1
- package/build/lib/parse-json.d.ts +12 -0
- package/build/lib/parse-json.d.ts.map +1 -1
- package/build/lib/parse-json.js +15 -2
- package/build/lib/parse-json.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/process-alive.d.ts +11 -0
- package/build/lib/process-alive.d.ts.map +1 -0
- package/build/lib/process-alive.js +22 -0
- package/build/lib/process-alive.js.map +1 -0
- package/build/lib/pruner.d.ts +26 -0
- package/build/lib/pruner.d.ts.map +1 -0
- package/build/lib/pruner.js +42 -0
- package/build/lib/pruner.js.map +1 -0
- package/build/lib/publish-flow.d.ts +224 -0
- package/build/lib/publish-flow.d.ts.map +1 -0
- package/build/lib/publish-flow.js +1258 -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 +169 -0
- package/build/lib/publish-run.js.map +1 -0
- package/build/lib/publisher.d.ts +25 -17
- package/build/lib/publisher.d.ts.map +1 -1
- package/build/lib/publisher.js +54 -53
- package/build/lib/publisher.js.map +1 -1
- package/build/lib/registrar.d.ts.map +1 -1
- package/build/lib/registrar.js +2 -2
- package/build/lib/registrar.js.map +1 -1
- package/build/lib/registry.d.ts +18 -7
- package/build/lib/registry.d.ts.map +1 -1
- package/build/lib/registry.js +113 -32
- 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.d.ts +3 -1
- package/build/lib/schemas/config.d.ts.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/setup.d.ts.map +1 -1
- package/build/lib/setup.js +53 -48
- package/build/lib/setup.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.d.ts.map +1 -1
- package/build/lib/uninstaller.js +8 -5
- package/build/lib/uninstaller.js.map +1 -1
- package/build/lib/update-check.d.ts +4 -0
- package/build/lib/update-check.d.ts.map +1 -1
- package/build/lib/update-check.js +55 -56
- 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/user-setup.d.ts.map +1 -1
- package/build/lib/user-setup.js +62 -59
- package/build/lib/user-setup.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 +68 -13
- package/build/lib/write-file.js.map +1 -1
- package/package.json +81 -81
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pastel's build-time entry: describe a commands folder as the manifest `Pastel`'s `commands` option takes. It imports
|
|
3
|
+
* every command and Zod, which is why `index.ts` doesn't re-export it (ATK-605).
|
|
4
|
+
*/
|
|
5
|
+
import readCommands from './read-commands.js';
|
|
6
|
+
export type { ArgumentSpec, CommandManifest, CommandSpec, OptionSpec } from './internal-types.js';
|
|
7
|
+
export { readCommands as describeCommands };
|
|
8
|
+
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../src/lib/pastel/manifest.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAE9C,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAElG,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pastel's build-time entry: describe a commands folder as the manifest `Pastel`'s `commands` option takes. It imports
|
|
3
|
+
* every command and Zod, which is why `index.ts` doesn't re-export it (ATK-605).
|
|
4
|
+
*/
|
|
5
|
+
import readCommands from './read-commands.js';
|
|
6
|
+
export { readCommands as describeCommands };
|
|
7
|
+
//# sourceMappingURL=manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../../src/lib/pastel/manifest.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAI9C,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAAE,CAAC"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { CommandManifest } from './internal-types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Import every command in `directory` and describe it as plain data. Files are read in name order, so the manifest
|
|
4
|
+
* and the help list commands the same way on every file system. `prefix` is the folder's path from the commands
|
|
5
|
+
* folder, for `file`.
|
|
6
|
+
*/
|
|
7
|
+
declare const readCommands: (directory: string, prefix?: string) => Promise<CommandManifest>;
|
|
3
8
|
export default readCommands;
|
|
4
9
|
//# sourceMappingURL=read-commands.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-commands.d.ts","sourceRoot":"","sources":["../../../src/lib/pastel/read-commands.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"read-commands.d.ts","sourceRoot":"","sources":["../../../src/lib/pastel/read-commands.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAkB,eAAe,EAAe,MAAM,qBAAqB,CAAC;AAKxF;;;;GAIG;AACH,QAAA,MAAM,YAAY,GAAU,WAAW,MAAM,EAAE,eAAW,KAAG,OAAO,CAAC,eAAe,CA8DnF,CAAC;AAiBF,eAAe,YAAY,CAAC"}
|
|
@@ -10,9 +10,17 @@ import decamelize from 'decamelize';
|
|
|
10
10
|
import fs from 'node:fs/promises';
|
|
11
11
|
import path from 'node:path';
|
|
12
12
|
import { pathToFileURL } from 'node:url';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
import { isDeepStrictEqual } from 'node:util';
|
|
14
|
+
import describeArguments from './generate-arguments.js';
|
|
15
|
+
import describeOptions from './generate-options.js';
|
|
16
|
+
/**
|
|
17
|
+
* Import every command in `directory` and describe it as plain data. Files are read in name order, so the manifest
|
|
18
|
+
* and the help list commands the same way on every file system. `prefix` is the folder's path from the commands
|
|
19
|
+
* folder, for `file`.
|
|
20
|
+
*/
|
|
21
|
+
const readCommands = async (directory, prefix = '') => {
|
|
22
|
+
const commands = [];
|
|
23
|
+
const files = (await fs.readdir(directory)).sort();
|
|
16
24
|
for (const file of files) {
|
|
17
25
|
if (file.startsWith('_app')) {
|
|
18
26
|
continue;
|
|
@@ -20,40 +28,53 @@ const readCommands = async (directory) => {
|
|
|
20
28
|
const filePath = path.join(directory, file);
|
|
21
29
|
const stat = await fs.stat(filePath);
|
|
22
30
|
if (stat.isDirectory()) {
|
|
23
|
-
const subCommands = await readCommands(filePath);
|
|
24
|
-
const indexCommand = subCommands.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
indexCommand
|
|
28
|
-
|
|
29
|
-
commands.set(file, indexCommand);
|
|
30
|
-
continue;
|
|
31
|
-
}
|
|
32
|
-
const command = indexCommand ?? {
|
|
33
|
-
commands: subCommands,
|
|
34
|
-
isDefault: false,
|
|
35
|
-
name: file,
|
|
36
|
-
};
|
|
37
|
-
commands.set(file, command);
|
|
31
|
+
const subCommands = await readCommands(filePath, `${prefix}${file}/`);
|
|
32
|
+
const indexCommand = subCommands.find((command) => command.name === 'index');
|
|
33
|
+
const others = subCommands.filter((command) => command !== indexCommand);
|
|
34
|
+
commands.push(indexCommand
|
|
35
|
+
? { ...indexCommand, commands: others, name: file }
|
|
36
|
+
: { commands: others, isDefault: false, name: file });
|
|
38
37
|
continue;
|
|
39
38
|
}
|
|
40
39
|
if (!/\.(js|ts)x?$/.test(file) || file.endsWith('.d.ts')) {
|
|
41
40
|
continue;
|
|
42
41
|
}
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
alias
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
42
|
+
const m = (await import(__rewriteRelativeImportExtension(pathToFileURL(filePath).href)));
|
|
43
|
+
const stem = file.replace(/\.(js|ts)x?$/, '');
|
|
44
|
+
const command = { isDefault: m.isDefault ?? false, name: decamelize(stem, { separator: '-' }) };
|
|
45
|
+
if (m.alias) {
|
|
46
|
+
command.alias = m.alias;
|
|
47
|
+
}
|
|
48
|
+
if (m.args) {
|
|
49
|
+
command.args = describeArguments(m.args);
|
|
50
|
+
}
|
|
51
|
+
if (m.description) {
|
|
52
|
+
command.description = m.description;
|
|
53
|
+
}
|
|
54
|
+
// The built module's name: under tsx, `.js` resolves to the `.ts(x)` source.
|
|
55
|
+
if (m.default) {
|
|
56
|
+
command.file = `${prefix}${stem}.js`;
|
|
57
|
+
}
|
|
58
|
+
if (m.options) {
|
|
59
|
+
command.options = describeOptions(m.options);
|
|
60
|
+
}
|
|
61
|
+
for (const spec of [...(command.args ?? []), ...(command.options ?? [])]) {
|
|
62
|
+
assertJsonDefault(spec, `${prefix}${file}`);
|
|
63
|
+
}
|
|
64
|
+
commands.push(command);
|
|
55
65
|
}
|
|
56
66
|
return commands;
|
|
57
67
|
};
|
|
68
|
+
/**
|
|
69
|
+
* The manifest is JSON, written on a developer's machine, so a default must be a constant JSON keeps as it is: not
|
|
70
|
+
* `Infinity`, a `Date` or a function's result. A default that differs between machines (`process.cwd()`, a home
|
|
71
|
+
* path) passes here but fails the manifest test anywhere else.
|
|
72
|
+
*/
|
|
73
|
+
function assertJsonDefault(spec, file) {
|
|
74
|
+
const { defaultValue } = spec;
|
|
75
|
+
if (defaultValue !== undefined && !isDeepStrictEqual(JSON.parse(JSON.stringify(defaultValue)), defaultValue)) {
|
|
76
|
+
throw new Error(`${file}: the default of ${spec.flags ?? spec.name} (${String(defaultValue)}) doesn't survive JSON, so the command manifest can't carry it.`);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
58
79
|
export default readCommands;
|
|
59
80
|
//# sourceMappingURL=read-commands.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-commands.js","sourceRoot":"","sources":["../../../src/lib/pastel/read-commands.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"read-commands.js","sourceRoot":"","sources":["../../../src/lib/pastel/read-commands.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAI9C,OAAO,iBAAiB,MAAM,yBAAyB,CAAC;AACxD,OAAO,eAAe,MAAM,uBAAuB,CAAC;AAEpD;;;;GAIG;AACH,MAAM,YAAY,GAAG,KAAK,EAAE,SAAiB,EAAE,MAAM,GAAG,EAAE,EAA4B,EAAE;IACtF,MAAM,QAAQ,GAAkB,EAAE,CAAC;IACnC,MAAM,KAAK,GAAG,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAEnD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;YAC5B,SAAS;QACX,CAAC;Q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C,EAAE,CAAC;QAC7G,MAAM,IAAI,KAAK,CACb,GAAG,IAAI,oBAAoB,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC,YAAY,CAAC,iEAAiE,CAC7I,CAAC;IACJ,CAAC;AACH,CAAC;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type Command as CommanderCommand } from 'commander';
|
|
2
|
+
import type { CommandExports } from './internal-types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Run a command once commander has parsed it: check its options and arguments against the module's Zod schemas, then
|
|
5
|
+
* render its component in the app. `generate-command.tsx` imports this only when a command runs, so help and version
|
|
6
|
+
* output never load Ink, React or Zod (ATK-605).
|
|
7
|
+
*/
|
|
8
|
+
export default function renderCommand(commanderCommand: CommanderCommand, module: CommandExports, { commandsDirectory, input, variadic }: {
|
|
9
|
+
commandsDirectory: string;
|
|
10
|
+
input: unknown[];
|
|
11
|
+
variadic: boolean;
|
|
12
|
+
}): Promise<void>;
|
|
13
|
+
//# sourceMappingURL=render-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-command.d.ts","sourceRoot":"","sources":["../../../src/lib/pastel/render-command.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,IAAI,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAK7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAK1D;;;;GAIG;AACH,wBAA8B,aAAa,CACzC,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,cAAc,EACtB,EAAE,iBAAiB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE;IAAE,iBAAiB,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,EAAE,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,iBA6C3G"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import {} from 'commander';
|
|
2
|
+
import { render } from 'ink';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { fromZodError } from 'zod-validation-error';
|
|
5
|
+
import App from './_app.js';
|
|
6
|
+
import readCustomApp from './read-custom-app.js';
|
|
7
|
+
/**
|
|
8
|
+
* Run a command once commander has parsed it: check its options and arguments against the module's Zod schemas, then
|
|
9
|
+
* render its component in the app. `generate-command.tsx` imports this only when a command runs, so help and version
|
|
10
|
+
* output never load Ink, React or Zod (ATK-605).
|
|
11
|
+
*/
|
|
12
|
+
export default async function renderCommand(commanderCommand, module, { commandsDirectory, input, variadic }) {
|
|
13
|
+
const Component = module.default;
|
|
14
|
+
// The manifest names a module only when it had a component.
|
|
15
|
+
if (!Component) {
|
|
16
|
+
throw new Error(`${commanderCommand.name()} has no default export: run \`pnpm manifest\` after changing it.`);
|
|
17
|
+
}
|
|
18
|
+
const options = input.pop();
|
|
19
|
+
let parsedOptions = {};
|
|
20
|
+
if (module.options) {
|
|
21
|
+
const result = module.options.safeParse(options);
|
|
22
|
+
if (result.success) {
|
|
23
|
+
parsedOptions = result.data ?? {};
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
rejectInput(commanderCommand, result.error);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
let arguments_ = [];
|
|
30
|
+
if (module.args) {
|
|
31
|
+
const result = module.args.safeParse(variadic ? input.flat() : input);
|
|
32
|
+
if (result.success) {
|
|
33
|
+
arguments_ = result.data ?? [];
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
rejectInput(commanderCommand, result.error);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
const appComponent = (await readCustomApp(commandsDirectory)) ?? App;
|
|
40
|
+
render(React.createElement(appComponent, {
|
|
41
|
+
commandProps: {
|
|
42
|
+
args: arguments_,
|
|
43
|
+
options: parsedOptions,
|
|
44
|
+
},
|
|
45
|
+
Component,
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Options or arguments the command's schema rejects are a usage error, reported through commander like its own
|
|
50
|
+
* (exit 2), so `Pastel`'s `onUsageError` sees them too.
|
|
51
|
+
*/
|
|
52
|
+
function rejectInput(commanderCommand, error) {
|
|
53
|
+
const { message } = fromZodError(error, { maxIssuesInMessage: 1, prefix: '', prefixSeparator: '' });
|
|
54
|
+
commanderCommand.error(`error: ${message}`, { code: 'pastel.invalidInput', exitCode: 2 });
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=render-command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-command.js","sourceRoot":"","sources":["../../../src/lib/pastel/render-command.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoC,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAIpD,OAAO,GAAG,MAAM,WAAW,CAAC;AAC5B,OAAO,aAAa,MAAM,sBAAsB,CAAC;AAEjD;;;;GAIG;AACH,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,aAAa,CACzC,gBAAkC,EAClC,MAAsB,EACtB,EAAE,iBAAiB,EAAE,KAAK,EAAE,QAAQ,EAAsE;IAE1G,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC;IAEjC,4DAA4D;IAC5D,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,GAAG,gBAAgB,CAAC,IAAI,EAAE,kEAAkE,CAAC,CAAC;IAChH,CAAC;IAED,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,EAA6B,CAAC;IACvD,IAAI,aAAa,GAA4B,EAAE,CAAC;IAEhD,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,CAA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,CAAC;AAC5F,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check whether a process with the given PID is still running.
|
|
3
|
+
* Uses `process.kill(pid, 0)` which sends no signal but throws if the
|
|
4
|
+
* process does not exist. Only `ESRCH` means it is gone: `EPERM` means it
|
|
5
|
+
* exists but belongs to another user, and any other error is read as running
|
|
6
|
+
* too, since a wrong "running" only waits for the holder to go stale while a
|
|
7
|
+
* wrong "gone" takes a live holder's lock or temp file. A PID no process can
|
|
8
|
+
* have (not a positive int32; 0 and negatives signal a process group) is gone.
|
|
9
|
+
*/
|
|
10
|
+
export declare function isProcessAlive(pid: number): boolean;
|
|
11
|
+
//# sourceMappingURL=process-alive.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process-alive.d.ts","sourceRoot":"","sources":["../../src/lib/process-alive.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAUnD"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check whether a process with the given PID is still running.
|
|
3
|
+
* Uses `process.kill(pid, 0)` which sends no signal but throws if the
|
|
4
|
+
* process does not exist. Only `ESRCH` means it is gone: `EPERM` means it
|
|
5
|
+
* exists but belongs to another user, and any other error is read as running
|
|
6
|
+
* too, since a wrong "running" only waits for the holder to go stale while a
|
|
7
|
+
* wrong "gone" takes a live holder's lock or temp file. A PID no process can
|
|
8
|
+
* have (not a positive int32; 0 and negatives signal a process group) is gone.
|
|
9
|
+
*/
|
|
10
|
+
export function isProcessAlive(pid) {
|
|
11
|
+
if (!Number.isInteger(pid) || pid <= 0 || pid > 0x7fffffff) {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
try {
|
|
15
|
+
process.kill(pid, 0);
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
catch (error) {
|
|
19
|
+
return error.code !== 'ESRCH';
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=process-alive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process-alive.js","sourceRoot":"","sources":["../../src/lib/process-alive.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,UAAU,cAAc,CAAC,GAAW;IACxC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,GAAG,UAAU,EAAE,CAAC;QAC3D,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,CAAC;QACH,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAQ,KAA+B,CAAC,IAAI,KAAK,OAAO,CAAC;IAC3D,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Adapter } from './schemas/adapter.js';
|
|
2
|
+
import type { InstalledAsset } from './schemas/lockfile.js';
|
|
3
|
+
/** An orphan prune could not remove. */
|
|
4
|
+
export interface PruneError {
|
|
5
|
+
error: string;
|
|
6
|
+
name: string;
|
|
7
|
+
org?: string;
|
|
8
|
+
type: string;
|
|
9
|
+
}
|
|
10
|
+
export interface PruneResult {
|
|
11
|
+
errors: PruneError[];
|
|
12
|
+
/** The orphans found inside the lock, which can differ from an earlier scan. */
|
|
13
|
+
orphans: InstalledAsset[];
|
|
14
|
+
removed: InstalledAsset[];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Removes every orphaned dependency, under the lockfile lock, from disk for each adapter and then
|
|
18
|
+
* from the lockfile, which is written once at the end. An orphan whose removal fails is reported in
|
|
19
|
+
* `errors` and keeps its lockfile entry; the rest go on. An aborted `signal` stops before the next
|
|
20
|
+
* orphan, and what was removed so far is still written.
|
|
21
|
+
*/
|
|
22
|
+
export declare function pruneOrphans(projectDir: string, adapters: Adapter[], { onProgress, signal }?: {
|
|
23
|
+
onProgress?: (message: string) => void;
|
|
24
|
+
signal?: AbortSignal;
|
|
25
|
+
}): Promise<PruneResult>;
|
|
26
|
+
//# sourceMappingURL=pruner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pruner.d.ts","sourceRoot":"","sources":["../../src/lib/pruner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAY5D,wCAAwC;AACxC,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,gFAAgF;IAChF,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,OAAO,EAAE,cAAc,EAAE,CAAC;CAC3B;AAED;;;;;GAKG;AACH,wBAAsB,YAAY,CAChC,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,OAAO,EAAE,EACnB,EAAE,UAAU,EAAE,MAAM,EAAE,GAAE;IAAE,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAAC,MAAM,CAAC,EAAE,WAAW,CAAA;CAAO,GAC5F,OAAO,CAAC,WAAW,CAAC,CAiCtB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { errorMessage } from './errors.js';
|
|
2
|
+
import { findAllOrphanedAssets, readLockfile, removeAssetFromLockfile, withLockfileErrorHandling, writeLockfile, } from './lockfile.js';
|
|
3
|
+
import { removeSingleAsset } from './uninstaller.js';
|
|
4
|
+
/**
|
|
5
|
+
* Removes every orphaned dependency, under the lockfile lock, from disk for each adapter and then
|
|
6
|
+
* from the lockfile, which is written once at the end. An orphan whose removal fails is reported in
|
|
7
|
+
* `errors` and keeps its lockfile entry; the rest go on. An aborted `signal` stops before the next
|
|
8
|
+
* orphan, and what was removed so far is still written.
|
|
9
|
+
*/
|
|
10
|
+
export async function pruneOrphans(projectDir, adapters, { onProgress, signal } = {}) {
|
|
11
|
+
return withLockfileErrorHandling(projectDir, async () => {
|
|
12
|
+
// Re-read the lockfile inside the lock for freshness
|
|
13
|
+
let lockfile = await readLockfile(projectDir);
|
|
14
|
+
const orphans = findAllOrphanedAssets(lockfile);
|
|
15
|
+
const removed = [];
|
|
16
|
+
const errors = [];
|
|
17
|
+
for (const orphan of orphans) {
|
|
18
|
+
if (signal?.aborted)
|
|
19
|
+
break;
|
|
20
|
+
try {
|
|
21
|
+
onProgress?.(`Removing ${orphan.name}...`);
|
|
22
|
+
for (const adapter of adapters) {
|
|
23
|
+
await removeSingleAsset(orphan, adapter, projectDir, { lockfile });
|
|
24
|
+
}
|
|
25
|
+
lockfile = removeAssetFromLockfile(lockfile, orphan.name, orphan.type, orphan.org);
|
|
26
|
+
removed.push(orphan);
|
|
27
|
+
}
|
|
28
|
+
catch (err) {
|
|
29
|
+
errors.push({
|
|
30
|
+
error: errorMessage(err),
|
|
31
|
+
name: orphan.name,
|
|
32
|
+
...(orphan.org ? { org: orphan.org } : {}),
|
|
33
|
+
type: orphan.type,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
onProgress?.('Updating lockfile...');
|
|
38
|
+
await writeLockfile(projectDir, lockfile);
|
|
39
|
+
return { errors, orphans, removed };
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=pruner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pruner.js","sourceRoot":"","sources":["../../src/lib/pruner.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,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IAAI;oBACjB,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;oBAC1C,IAAI,EAAE,MAAM,CAAC,IAAI;iBAClB,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,UAAU,EAAE,CAAC,sBAAsB,CAAC,CAAC;QACrC,MAAM,aAAa,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAE1C,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import type { Adapter } from './schemas/adapter.js';
|
|
2
|
+
import { type ManifestFieldChange } from './manifest-diff.js';
|
|
3
|
+
import { type DeclaredDependency, type PublishEntry, type PublishPlan, type PublishResult, type PublishTarget, type RawAssetDetection, type ValidationResult, type VersionCheckResult } from './publisher.js';
|
|
4
|
+
export type MetadataSubPhase = 'building-staging' | 'description' | 'tags';
|
|
5
|
+
export type PublishAction = {
|
|
6
|
+
adapters: Adapter[];
|
|
7
|
+
type: 'TOOLS_LOADED';
|
|
8
|
+
} | {
|
|
9
|
+
authorValue: string;
|
|
10
|
+
/** The description from --description or the installed asset; unset when it is still to ask. */
|
|
11
|
+
description?: string;
|
|
12
|
+
orgValue: string;
|
|
13
|
+
rawDetection: RawAssetDetection;
|
|
14
|
+
toolsDetected: string[];
|
|
15
|
+
type: 'RAW_DETECT_DONE';
|
|
16
|
+
} | {
|
|
17
|
+
code?: string;
|
|
18
|
+
command?: string;
|
|
19
|
+
hint?: string;
|
|
20
|
+
message: string;
|
|
21
|
+
type: 'ERROR';
|
|
22
|
+
} | {
|
|
23
|
+
entries: PublishEntryState[];
|
|
24
|
+
type: 'ENTRIES_CHECKED';
|
|
25
|
+
} | {
|
|
26
|
+
entries: PublishEntryState[];
|
|
27
|
+
type: 'ENTRIES_LOADED';
|
|
28
|
+
} | {
|
|
29
|
+
error: PublishErrorAction;
|
|
30
|
+
missing: DeclaredDependency[];
|
|
31
|
+
suggested: PublishEntry[];
|
|
32
|
+
type: 'SUGGEST_ENTRIES';
|
|
33
|
+
} | {
|
|
34
|
+
isUpdate: boolean;
|
|
35
|
+
resolvedVersion: string;
|
|
36
|
+
token: string;
|
|
37
|
+
type: 'REGISTRY_CHECK_DONE';
|
|
38
|
+
versionCheck: VersionCheckResult;
|
|
39
|
+
} | {
|
|
40
|
+
lockfileOrgReviewers?: string[];
|
|
41
|
+
type: 'VALIDATE_DONE';
|
|
42
|
+
validation: ValidationResult;
|
|
43
|
+
} | {
|
|
44
|
+
manifestDiff?: ManifestFieldChange[];
|
|
45
|
+
plan: PublishPlan;
|
|
46
|
+
type: 'PLAN_DONE';
|
|
47
|
+
} | {
|
|
48
|
+
message: string;
|
|
49
|
+
type: 'BUMP_DONE';
|
|
50
|
+
updatedTarget: PublishTarget;
|
|
51
|
+
version: string;
|
|
52
|
+
} | {
|
|
53
|
+
message: string;
|
|
54
|
+
type: 'PUBLISH_PROGRESS';
|
|
55
|
+
} | {
|
|
56
|
+
rawDetection: RawAssetDetection;
|
|
57
|
+
target: PublishTarget;
|
|
58
|
+
type: 'RAW_DETECT_DONE_NON_INTERACTIVE';
|
|
59
|
+
} | {
|
|
60
|
+
resolvedPath: string;
|
|
61
|
+
type: 'RESOLVED_UPDATE';
|
|
62
|
+
} | {
|
|
63
|
+
result: PublishResult;
|
|
64
|
+
type: 'PUBLISH_DONE';
|
|
65
|
+
} | {
|
|
66
|
+
target: PublishTarget;
|
|
67
|
+
type: 'DETECT_DONE';
|
|
68
|
+
} | {
|
|
69
|
+
target: PublishTarget;
|
|
70
|
+
type: 'STAGING_DONE';
|
|
71
|
+
} | {
|
|
72
|
+
tools: string[];
|
|
73
|
+
type: 'CONFIRM_PROMPT_TOOLS';
|
|
74
|
+
} | {
|
|
75
|
+
tools: string[];
|
|
76
|
+
type: 'RESOLVE_TOOLS_NONINTERACTIVE';
|
|
77
|
+
} | {
|
|
78
|
+
type: 'SET_BUMP_SELECTION';
|
|
79
|
+
value: string;
|
|
80
|
+
} | {
|
|
81
|
+
type: 'SET_CONFIRM_VALUE';
|
|
82
|
+
value: string;
|
|
83
|
+
} | {
|
|
84
|
+
type: 'SET_DESCRIPTION';
|
|
85
|
+
value: string;
|
|
86
|
+
} | {
|
|
87
|
+
type: 'SET_PROMPT_TAGS';
|
|
88
|
+
value: string;
|
|
89
|
+
} | {
|
|
90
|
+
type: 'SET_PUBLISH_CONFIRM_VALUE';
|
|
91
|
+
value: string;
|
|
92
|
+
} | {
|
|
93
|
+
type: 'SET_REVIEWER';
|
|
94
|
+
value: string;
|
|
95
|
+
} | {
|
|
96
|
+
type: 'SET_TAGS';
|
|
97
|
+
value: string;
|
|
98
|
+
} | {
|
|
99
|
+
type: 'SET_WITH_CONFIRM_VALUE';
|
|
100
|
+
value: string;
|
|
101
|
+
} | {
|
|
102
|
+
type: 'SUBMIT_BUMP';
|
|
103
|
+
} | {
|
|
104
|
+
type: 'SUBMIT_CONFIRM';
|
|
105
|
+
} | {
|
|
106
|
+
type: 'SUBMIT_DESCRIPTION';
|
|
107
|
+
} | {
|
|
108
|
+
type: 'SUBMIT_PROMPT_TAGS';
|
|
109
|
+
} | {
|
|
110
|
+
type: 'SUBMIT_PUBLISH_CONFIRM';
|
|
111
|
+
} | {
|
|
112
|
+
type: 'SUBMIT_REVIEWER';
|
|
113
|
+
} | {
|
|
114
|
+
type: 'SUBMIT_TAGS';
|
|
115
|
+
} | {
|
|
116
|
+
type: 'SUBMIT_WITH_CONFIRM';
|
|
117
|
+
};
|
|
118
|
+
/** An entry of the publish (see {@link PublishEntry}) and how far the run has checked it. */
|
|
119
|
+
export interface PublishEntryState extends PublishEntry {
|
|
120
|
+
/** The version to publish: the manifest's, or its bump. Unset while a needed bump is pending. */
|
|
121
|
+
resolvedVersion?: string;
|
|
122
|
+
validation?: ValidationResult;
|
|
123
|
+
/** Set once `checking-entries` ran for the entry. */
|
|
124
|
+
versionCheck?: VersionCheckResult;
|
|
125
|
+
}
|
|
126
|
+
export type PublishErrorAction = PublishAction & {
|
|
127
|
+
type: 'ERROR';
|
|
128
|
+
};
|
|
129
|
+
export interface PublishFlags {
|
|
130
|
+
bump?: 'major' | 'minor' | 'patch';
|
|
131
|
+
descriptionFlag?: string;
|
|
132
|
+
dryRun: boolean;
|
|
133
|
+
force?: boolean;
|
|
134
|
+
fromInstalled: boolean;
|
|
135
|
+
isTTY?: boolean;
|
|
136
|
+
json?: boolean;
|
|
137
|
+
message?: string;
|
|
138
|
+
/** Every path given; more than one publishes them as one batch, `rawPath` (the first) as its root. */
|
|
139
|
+
paths?: string[];
|
|
140
|
+
projectRoot?: string;
|
|
141
|
+
rawPath: string;
|
|
142
|
+
refresh?: boolean;
|
|
143
|
+
reviewerFlag?: string;
|
|
144
|
+
tagsFlag?: string;
|
|
145
|
+
tool?: string;
|
|
146
|
+
toolsFlag?: string;
|
|
147
|
+
update: boolean;
|
|
148
|
+
/** `--with` folders: new dependencies published in the same pull request. */
|
|
149
|
+
withPaths?: string[];
|
|
150
|
+
yes?: boolean;
|
|
151
|
+
}
|
|
152
|
+
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' | 'loading-tools' | 'prompting-reviewer' | 'prompting-tags' | 'prompting-tools' | 'publishing' | 'resolving-installed' | 'resolving-update' | 'validating';
|
|
153
|
+
export interface PublishState {
|
|
154
|
+
authorValue: string;
|
|
155
|
+
/** The entry the bump prompt is for; unset when it is for the root asset. */
|
|
156
|
+
bumpEntry?: number;
|
|
157
|
+
bumpSelection: string;
|
|
158
|
+
confirmValue: string;
|
|
159
|
+
descriptionValue: string;
|
|
160
|
+
/** New dependencies published with the root asset, in request order. */
|
|
161
|
+
entries: PublishEntryState[];
|
|
162
|
+
errorCode?: string;
|
|
163
|
+
errorCommand?: string;
|
|
164
|
+
errorHint?: string;
|
|
165
|
+
errorMessage: string;
|
|
166
|
+
flags: PublishFlags;
|
|
167
|
+
isRawPublish: boolean;
|
|
168
|
+
isUpdate: boolean;
|
|
169
|
+
manifestDiff: ManifestFieldChange[] | undefined;
|
|
170
|
+
metadataSubPhase: MetadataSubPhase;
|
|
171
|
+
/** The missing dependencies the `confirm-with` prompt offers folders for. */
|
|
172
|
+
missingDependencies: DeclaredDependency[];
|
|
173
|
+
nonInteractive: boolean;
|
|
174
|
+
orgValue: string;
|
|
175
|
+
/** The plan's error, shown if the `confirm-with` offer is declined. */
|
|
176
|
+
pendingError?: PublishErrorAction;
|
|
177
|
+
phase: PublishPhase;
|
|
178
|
+
plan: PublishPlan | undefined;
|
|
179
|
+
progressMessage: string;
|
|
180
|
+
promptTagsValue: string;
|
|
181
|
+
publishConfirmValue: string;
|
|
182
|
+
publishResult: PublishResult | undefined;
|
|
183
|
+
rawDetection: null | RawAssetDetection;
|
|
184
|
+
resolvedPath: string;
|
|
185
|
+
resolvedVersion: string;
|
|
186
|
+
reviewerValue: string;
|
|
187
|
+
/** The tools chosen at the tools prompt; empty unless it was asked. */
|
|
188
|
+
selectedPromptTools: string[];
|
|
189
|
+
/** Folders next to the root that the `confirm-with` prompt offers to publish too. */
|
|
190
|
+
suggestedEntries: PublishEntry[];
|
|
191
|
+
tagsValue: string;
|
|
192
|
+
target: PublishTarget | undefined;
|
|
193
|
+
token: string | undefined;
|
|
194
|
+
toolAdapters: Adapter[];
|
|
195
|
+
toolsDetected: string[];
|
|
196
|
+
validation: undefined | ValidationResult;
|
|
197
|
+
versionCheck: undefined | VersionCheckResult;
|
|
198
|
+
withConfirmValue: string;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* What a publish step needs from whoever runs it. A step reads the state it started
|
|
202
|
+
* in and reports what it found as reducer actions, as the phase effects did.
|
|
203
|
+
*/
|
|
204
|
+
export interface PublishStepContext {
|
|
205
|
+
/** True once the run has moved on or stopped; `runPublishStep` then drops what the step dispatches. */
|
|
206
|
+
cancelled: () => boolean;
|
|
207
|
+
dispatch: (action: PublishAction) => void;
|
|
208
|
+
/** A staging directory the run removes when it ends, staged as soon as it exists so a cancelled run removes it too. */
|
|
209
|
+
stage: (dir: string) => void;
|
|
210
|
+
}
|
|
211
|
+
export declare function createInitialState(flags: PublishFlags): PublishState;
|
|
212
|
+
/** Several folders published together (`atk publish a b c`) in one pull request; one folder named twice is one. */
|
|
213
|
+
export declare function isBatch(flags: PublishFlags): boolean;
|
|
214
|
+
/**
|
|
215
|
+
* Run the step for the state's phase, if it has one: the work the phase waits on,
|
|
216
|
+
* reported through `ctx.dispatch`, which reaches the runner only until the run is
|
|
217
|
+
* cancelled. An error the step throws is dispatched too, so this never rejects.
|
|
218
|
+
* Prompt and terminal phases have no step.
|
|
219
|
+
*/
|
|
220
|
+
export declare function runPublishStep(state: PublishState, ctx: PublishStepContext): Promise<void>;
|
|
221
|
+
/** The comma-separated values in a flag or prompt answer, trimmed, without empty ones. */
|
|
222
|
+
export declare function splitList(value: string | undefined): string[];
|
|
223
|
+
export declare function publishReducer(state: PublishState, action: PublishAction): PublishState;
|
|
224
|
+
//# sourceMappingURL=publish-flow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish-flow.d.ts","sourceRoot":"","sources":["../../src/lib/publish-flow.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AASpD,OAAO,EAAwC,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAGpG,OAAO,EAKL,KAAK,kBAAkB,EAWvB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EAOtB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACxB,MAAM,gBAAgB,CAAC;AAUxB,M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