@detergent-software/atk 3.0.0 → 4.0.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/README.md +361 -0
- package/build/commands/_app.d.ts.map +1 -1
- package/build/commands/_app.js +23 -3
- package/build/commands/_app.js.map +1 -1
- package/build/commands/audit.d.ts.map +1 -1
- package/build/commands/audit.js +76 -37
- package/build/commands/audit.js.map +1 -1
- package/build/commands/browse.d.ts.map +1 -1
- package/build/commands/browse.js +126 -154
- package/build/commands/browse.js.map +1 -1
- package/build/commands/cache.d.ts.map +1 -1
- package/build/commands/cache.js +13 -15
- package/build/commands/cache.js.map +1 -1
- package/build/commands/config.d.ts +1 -1
- package/build/commands/config.d.ts.map +1 -1
- package/build/commands/config.js +7 -3
- package/build/commands/config.js.map +1 -1
- package/build/commands/diff.d.ts.map +1 -1
- package/build/commands/diff.js +4 -117
- package/build/commands/diff.js.map +1 -1
- package/build/commands/freeze.d.ts +1 -2
- package/build/commands/freeze.d.ts.map +1 -1
- package/build/commands/freeze.js +17 -37
- package/build/commands/freeze.js.map +1 -1
- package/build/commands/info.d.ts +1 -2
- package/build/commands/info.d.ts.map +1 -1
- package/build/commands/info.js +43 -38
- package/build/commands/info.js.map +1 -1
- package/build/commands/init.d.ts.map +1 -1
- package/build/commands/init.js +41 -414
- package/build/commands/init.js.map +1 -1
- package/build/commands/install.d.ts.map +1 -1
- package/build/commands/install.js +79 -72
- package/build/commands/install.js.map +1 -1
- package/build/commands/list.d.ts +2 -2
- package/build/commands/list.d.ts.map +1 -1
- package/build/commands/list.js +138 -27
- package/build/commands/list.js.map +1 -1
- package/build/commands/outdated.d.ts.map +1 -1
- package/build/commands/outdated.js +20 -10
- package/build/commands/outdated.js.map +1 -1
- package/build/commands/pin.d.ts +1 -2
- package/build/commands/pin.d.ts.map +1 -1
- package/build/commands/pin.js +44 -47
- package/build/commands/pin.js.map +1 -1
- package/build/commands/prune.d.ts.map +1 -1
- package/build/commands/prune.js +76 -151
- package/build/commands/prune.js.map +1 -1
- package/build/commands/publish.d.ts +4 -1
- package/build/commands/publish.d.ts.map +1 -1
- package/build/commands/publish.js +139 -388
- package/build/commands/publish.js.map +1 -1
- package/build/commands/search.d.ts.map +1 -1
- package/build/commands/search.js +14 -19
- package/build/commands/search.js.map +1 -1
- package/build/commands/setup.d.ts +1 -1
- package/build/commands/setup.d.ts.map +1 -1
- package/build/commands/setup.js +48 -253
- package/build/commands/setup.js.map +1 -1
- package/build/commands/sync.d.ts.map +1 -1
- package/build/commands/sync.js +43 -169
- package/build/commands/sync.js.map +1 -1
- package/build/commands/thaw.d.ts +1 -2
- package/build/commands/thaw.d.ts.map +1 -1
- package/build/commands/thaw.js +19 -37
- package/build/commands/thaw.js.map +1 -1
- package/build/commands/uninstall.d.ts.map +1 -1
- package/build/commands/uninstall.js +106 -221
- package/build/commands/uninstall.js.map +1 -1
- package/build/commands/unpin.d.ts +1 -2
- package/build/commands/unpin.d.ts.map +1 -1
- package/build/commands/unpin.js +23 -38
- package/build/commands/unpin.js.map +1 -1
- package/build/commands/update.d.ts.map +1 -1
- package/build/commands/update.js +57 -54
- package/build/commands/update.js.map +1 -1
- package/build/commands/why.d.ts +1 -1
- package/build/commands/why.d.ts.map +1 -1
- package/build/commands/why.js +14 -6
- package/build/commands/why.js.map +1 -1
- package/build/components/AssetDetail.d.ts +1 -3
- package/build/components/AssetDetail.d.ts.map +1 -1
- package/build/components/AssetDetail.js +22 -21
- package/build/components/AssetDetail.js.map +1 -1
- package/build/components/AssetTable.d.ts +5 -2
- package/build/components/AssetTable.d.ts.map +1 -1
- package/build/components/AssetTable.js +37 -40
- package/build/components/AssetTable.js.map +1 -1
- package/build/components/AssetVersionLine.d.ts +27 -0
- package/build/components/AssetVersionLine.d.ts.map +1 -0
- package/build/components/AssetVersionLine.js +10 -0
- package/build/components/AssetVersionLine.js.map +1 -0
- package/build/components/BrowseExpandedBundle.d.ts +10 -1
- package/build/components/BrowseExpandedBundle.d.ts.map +1 -1
- package/build/components/BrowseExpandedBundle.js +25 -2
- package/build/components/BrowseExpandedBundle.js.map +1 -1
- package/build/components/BrowseExpandedRow.d.ts +4 -1
- package/build/components/BrowseExpandedRow.d.ts.map +1 -1
- package/build/components/BrowseExpandedRow.js +24 -3
- package/build/components/BrowseExpandedRow.js.map +1 -1
- package/build/components/BrowseList.d.ts +5 -1
- package/build/components/BrowseList.d.ts.map +1 -1
- package/build/components/BrowseList.js +57 -47
- package/build/components/BrowseList.js.map +1 -1
- package/build/components/BundleDetail.d.ts +2 -1
- package/build/components/BundleDetail.d.ts.map +1 -1
- package/build/components/BundleDetail.js +3 -2
- package/build/components/BundleDetail.js.map +1 -1
- package/build/components/DiffView.d.ts +0 -2
- package/build/components/DiffView.d.ts.map +1 -1
- package/build/components/DiffView.js +11 -5
- package/build/components/DiffView.js.map +1 -1
- package/build/components/DryRunBanner.d.ts +3 -3
- package/build/components/DryRunBanner.d.ts.map +1 -1
- package/build/components/DryRunBanner.js +2 -2
- package/build/components/DryRunBanner.js.map +1 -1
- package/build/components/FilterBar.d.ts +10 -3
- package/build/components/FilterBar.d.ts.map +1 -1
- package/build/components/FilterBar.js +4 -4
- package/build/components/FilterBar.js.map +1 -1
- package/build/components/FrozenSkippedHint.d.ts +11 -0
- package/build/components/FrozenSkippedHint.d.ts.map +1 -0
- package/build/components/FrozenSkippedHint.js +12 -0
- package/build/components/FrozenSkippedHint.js.map +1 -0
- package/build/components/HelpBar.d.ts.map +1 -1
- package/build/components/HelpBar.js +3 -3
- package/build/components/HelpBar.js.map +1 -1
- package/build/components/InitSuccess.d.ts +5 -0
- package/build/components/InitSuccess.d.ts.map +1 -0
- package/build/components/InitSuccess.js +20 -0
- package/build/components/InitSuccess.js.map +1 -0
- package/build/components/InstallSummary.d.ts +3 -3
- package/build/components/InstallSummary.d.ts.map +1 -1
- package/build/components/InstallSummary.js +2 -2
- package/build/components/InstallSummary.js.map +1 -1
- package/build/components/Link.d.ts +7 -0
- package/build/components/Link.d.ts.map +1 -0
- package/build/components/Link.js +6 -0
- package/build/components/Link.js.map +1 -0
- package/build/components/ListActionBar.d.ts +11 -0
- package/build/components/ListActionBar.d.ts.map +1 -0
- package/build/components/ListActionBar.js +30 -0
- package/build/components/ListActionBar.js.map +1 -0
- package/build/components/ListBrowseList.d.ts +27 -0
- package/build/components/ListBrowseList.d.ts.map +1 -0
- package/build/components/ListBrowseList.js +57 -0
- package/build/components/ListBrowseList.js.map +1 -0
- package/build/components/ListExpandedRow.d.ts +38 -0
- package/build/components/ListExpandedRow.d.ts.map +1 -0
- package/build/components/ListExpandedRow.js +46 -0
- package/build/components/ListExpandedRow.js.map +1 -0
- package/build/components/ListHelpBar.d.ts +19 -0
- package/build/components/ListHelpBar.d.ts.map +1 -0
- package/build/components/ListHelpBar.js +11 -0
- package/build/components/ListHelpBar.js.map +1 -0
- package/build/components/OrphanListItem.d.ts +15 -0
- package/build/components/OrphanListItem.d.ts.map +1 -0
- package/build/components/OrphanListItem.js +6 -0
- package/build/components/OrphanListItem.js.map +1 -0
- package/build/components/PromptField.d.ts +19 -0
- package/build/components/PromptField.d.ts.map +1 -0
- package/build/components/PromptField.js +7 -0
- package/build/components/PromptField.js.map +1 -0
- package/build/components/SkippedAssetSection.d.ts +35 -0
- package/build/components/SkippedAssetSection.d.ts.map +1 -0
- package/build/components/SkippedAssetSection.js +15 -0
- package/build/components/SkippedAssetSection.js.map +1 -0
- package/build/components/StatusBadge.d.ts +1 -1
- package/build/components/StatusBadge.d.ts.map +1 -1
- package/build/components/StatusBadge.js +4 -0
- package/build/components/StatusBadge.js.map +1 -1
- package/build/components/SyncAllInSync.d.ts +14 -0
- package/build/components/SyncAllInSync.d.ts.map +1 -0
- package/build/components/SyncAllInSync.js +10 -0
- package/build/components/SyncAllInSync.js.map +1 -0
- package/build/components/SyncDriftedList.d.ts +24 -0
- package/build/components/SyncDriftedList.d.ts.map +1 -0
- package/build/components/SyncDriftedList.js +17 -0
- package/build/components/SyncDriftedList.js.map +1 -0
- package/build/components/SyncNoAssets.d.ts +12 -0
- package/build/components/SyncNoAssets.d.ts.map +1 -0
- package/build/components/SyncNoAssets.js +9 -0
- package/build/components/SyncNoAssets.js.map +1 -0
- package/build/components/index.d.ts +16 -2
- package/build/components/index.d.ts.map +1 -1
- package/build/components/index.js +16 -2
- package/build/components/index.js.map +1 -1
- package/build/hooks/useBrowseState.d.ts +44 -1
- package/build/hooks/useBrowseState.d.ts.map +1 -1
- package/build/hooks/useBrowseState.js +148 -13
- package/build/hooks/useBrowseState.js.map +1 -1
- package/build/hooks/useConfirmation.d.ts +18 -0
- package/build/hooks/useConfirmation.d.ts.map +1 -0
- package/build/hooks/useConfirmation.js +56 -0
- package/build/hooks/useConfirmation.js.map +1 -0
- package/build/hooks/useInitState.d.ts +109 -0
- package/build/hooks/useInitState.d.ts.map +1 -0
- package/build/hooks/useInitState.js +474 -0
- package/build/hooks/useInitState.js.map +1 -0
- package/build/hooks/useListActions.d.ts +15 -0
- package/build/hooks/useListActions.d.ts.map +1 -0
- package/build/hooks/useListActions.js +155 -0
- package/build/hooks/useListActions.js.map +1 -0
- package/build/hooks/useListState.d.ts +151 -0
- package/build/hooks/useListState.d.ts.map +1 -0
- package/build/hooks/useListState.js +448 -0
- package/build/hooks/useListState.js.map +1 -0
- package/build/hooks/usePruneState.d.ts +76 -0
- package/build/hooks/usePruneState.d.ts.map +1 -0
- package/build/hooks/usePruneState.js +252 -0
- package/build/hooks/usePruneState.js.map +1 -0
- package/build/hooks/usePublishState.d.ts +147 -0
- package/build/hooks/usePublishState.d.ts.map +1 -0
- package/build/hooks/usePublishState.js +916 -0
- package/build/hooks/usePublishState.js.map +1 -0
- package/build/hooks/useSetupState.d.ts +57 -0
- package/build/hooks/useSetupState.d.ts.map +1 -0
- package/build/hooks/useSetupState.js +236 -0
- package/build/hooks/useSetupState.js.map +1 -0
- package/build/hooks/useUninstallState.d.ts +102 -0
- package/build/hooks/useUninstallState.d.ts.map +1 -0
- package/build/hooks/useUninstallState.js +342 -0
- package/build/hooks/useUninstallState.js.map +1 -0
- package/build/lib/adapter.d.ts +21 -0
- package/build/lib/adapter.d.ts.map +1 -1
- package/build/lib/adapter.js +59 -1
- package/build/lib/adapter.js.map +1 -1
- package/build/lib/checksum.d.ts +39 -0
- package/build/lib/checksum.d.ts.map +1 -1
- package/build/lib/checksum.js +98 -13
- package/build/lib/checksum.js.map +1 -1
- package/build/lib/config.d.ts +38 -18
- package/build/lib/config.d.ts.map +1 -1
- package/build/lib/config.js +103 -55
- package/build/lib/config.js.map +1 -1
- package/build/lib/detector.d.ts +2 -11
- package/build/lib/detector.d.ts.map +1 -1
- package/build/lib/detector.js +2 -64
- package/build/lib/detector.js.map +1 -1
- package/build/lib/diagnostics.d.ts +7 -0
- package/build/lib/diagnostics.d.ts.map +1 -1
- package/build/lib/diagnostics.js +54 -34
- package/build/lib/diagnostics.js.map +1 -1
- package/build/lib/diff-command.d.ts +40 -0
- package/build/lib/diff-command.d.ts.map +1 -0
- package/build/lib/diff-command.js +145 -0
- package/build/lib/diff-command.js.map +1 -0
- package/build/lib/diff.d.ts +7 -0
- package/build/lib/diff.d.ts.map +1 -1
- package/build/lib/diff.js +15 -10
- package/build/lib/diff.js.map +1 -1
- package/build/lib/format.d.ts +6 -0
- package/build/lib/format.d.ts.map +1 -0
- package/build/lib/format.js +18 -0
- package/build/lib/format.js.map +1 -0
- package/build/lib/github.d.ts +35 -0
- package/build/lib/github.d.ts.map +1 -1
- package/build/lib/github.js +44 -0
- package/build/lib/github.js.map +1 -1
- package/build/lib/gitignore.d.ts +17 -0
- package/build/lib/gitignore.d.ts.map +1 -1
- package/build/lib/gitignore.js +17 -1
- package/build/lib/gitignore.js.map +1 -1
- package/build/lib/init.d.ts +22 -0
- package/build/lib/init.d.ts.map +1 -1
- package/build/lib/init.js +163 -18
- package/build/lib/init.js.map +1 -1
- package/build/lib/installer.d.ts +1 -0
- package/build/lib/installer.d.ts.map +1 -1
- package/build/lib/installer.js +7 -7
- package/build/lib/installer.js.map +1 -1
- package/build/lib/lockfile.d.ts +19 -17
- package/build/lib/lockfile.d.ts.map +1 -1
- package/build/lib/lockfile.js +43 -67
- package/build/lib/lockfile.js.map +1 -1
- package/build/lib/publisher.d.ts +41 -12
- package/build/lib/publisher.d.ts.map +1 -1
- package/build/lib/publisher.js +226 -64
- package/build/lib/publisher.js.map +1 -1
- package/build/lib/registry.d.ts +20 -5
- package/build/lib/registry.d.ts.map +1 -1
- package/build/lib/registry.js +41 -30
- package/build/lib/registry.js.map +1 -1
- package/build/lib/schemas/config.d.ts +31 -3
- package/build/lib/schemas/config.d.ts.map +1 -1
- package/build/lib/schemas/config.js +21 -2
- package/build/lib/schemas/config.js.map +1 -1
- package/build/lib/schemas/index.d.ts +1 -1
- package/build/lib/schemas/index.d.ts.map +1 -1
- package/build/lib/schemas/index.js +1 -1
- package/build/lib/schemas/index.js.map +1 -1
- package/build/lib/schemas/lockfile.d.ts +18 -2
- package/build/lib/schemas/lockfile.d.ts.map +1 -1
- package/build/lib/schemas/lockfile.js +7 -1
- package/build/lib/schemas/lockfile.js.map +1 -1
- package/build/lib/schemas/manifest.d.ts +1 -1
- package/build/lib/schemas/manifest.d.ts.map +1 -1
- package/build/lib/schemas/manifest.js +7 -2
- package/build/lib/schemas/manifest.js.map +1 -1
- package/build/lib/schemas/registry.d.ts +2 -4
- package/build/lib/schemas/registry.d.ts.map +1 -1
- package/build/lib/schemas/registry.js +1 -1
- package/build/lib/schemas/registry.js.map +1 -1
- package/build/lib/search.d.ts +15 -1
- package/build/lib/search.d.ts.map +1 -1
- package/build/lib/search.js +65 -65
- package/build/lib/search.js.map +1 -1
- package/build/lib/setup.d.ts +28 -0
- package/build/lib/setup.d.ts.map +1 -0
- package/build/lib/setup.js +98 -0
- package/build/lib/setup.js.map +1 -0
- package/build/lib/sync.d.ts +109 -0
- package/build/lib/sync.d.ts.map +1 -0
- package/build/lib/sync.js +217 -0
- package/build/lib/sync.js.map +1 -0
- package/build/lib/tool-resolver.d.ts +29 -6
- package/build/lib/tool-resolver.d.ts.map +1 -1
- package/build/lib/tool-resolver.js +54 -15
- package/build/lib/tool-resolver.js.map +1 -1
- package/build/lib/updater.d.ts +7 -4
- package/build/lib/updater.d.ts.map +1 -1
- package/build/lib/updater.js +10 -6
- package/build/lib/updater.js.map +1 -1
- package/build/lib/version.js +1 -1
- package/build/lib/version.js.map +1 -1
- package/package.json +79 -65
- package/tool-adapters/claude-code.json +1 -1
- package/tool-adapters/copilot-cli.json +1 -1
package/build/commands/diff.js
CHANGED
|
@@ -1,22 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Text } from 'ink';
|
|
3
|
-
import { existsSync } from 'node:fs';
|
|
4
|
-
import { readFile } from 'node:fs/promises';
|
|
5
|
-
import { join } from 'node:path';
|
|
6
3
|
import { option } from 'pastel';
|
|
7
4
|
import { z } from 'zod';
|
|
8
5
|
import { DiffView, Spinner } from '../components/index.js';
|
|
9
6
|
import { useCommand } from '../hooks/useCommand.js';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { loadMergedConfig } from '../lib/config.js';
|
|
13
|
-
import { computeAddedFileDiff, computeRemovedFileDiff, computeUnifiedDiff } from '../lib/diff.js';
|
|
14
|
-
import { fetchFileContent, getEffectiveBranch, listAssetDirectoryFiles } from '../lib/github.js';
|
|
15
|
-
import { findInstalledAsset, readLockfile } from '../lib/lockfile.js';
|
|
16
|
-
import { parseOrgFromName, resolveActiveOrg } from '../lib/org.js';
|
|
17
|
-
import { findProjectRoot } from '../lib/paths.js';
|
|
18
|
-
import { fetchRegistry, findAsset } from '../lib/registry.js';
|
|
19
|
-
import { resolveTool } from '../lib/tool-resolver.js';
|
|
7
|
+
import { computeDiffOutcome } from '../lib/diff-command.js';
|
|
8
|
+
import { parseOrgFromName } from '../lib/org.js';
|
|
20
9
|
export const description = 'Show changes between installed and latest version';
|
|
21
10
|
export const options = z.object({
|
|
22
11
|
context: z
|
|
@@ -57,111 +46,9 @@ export const options = z.object({
|
|
|
57
46
|
});
|
|
58
47
|
export const args = z.tuple([z.string().describe('Asset name')]);
|
|
59
48
|
export default function Diff({ args: [rawName], options: { context, org: cliOrg, projectRoot, refresh, tool }, }) {
|
|
60
|
-
// Extract org from @org/name syntax if present
|
|
61
49
|
const { name: nameFromOrg, org: inlineOrg } = parseOrgFromName(rawName);
|
|
62
50
|
const name = inlineOrg ? nameFromOrg : rawName;
|
|
63
|
-
const state = useCommand(async (progress) =>
|
|
64
|
-
const projectDir = findProjectRoot(projectRoot);
|
|
65
|
-
progress('Loading configuration...');
|
|
66
|
-
const config = await loadMergedConfig(projectDir);
|
|
67
|
-
const { adapter } = await resolveTool(tool);
|
|
68
|
-
progress('Reading lockfile...');
|
|
69
|
-
const lockfile = await readLockfile(projectDir);
|
|
70
|
-
const org = resolveActiveOrg(inlineOrg ?? cliOrg, lockfile.org, config.org);
|
|
71
|
-
const installed = findInstalledAsset(lockfile, name);
|
|
72
|
-
if (!installed) {
|
|
73
|
-
return { name, outcome: 'not-installed' };
|
|
74
|
-
}
|
|
75
|
-
progress('Fetching registry...');
|
|
76
|
-
const registry = await fetchRegistry({ force: refresh });
|
|
77
|
-
const foundAsset = findAsset(registry, name, installed.type, undefined, org);
|
|
78
|
-
if (!foundAsset) {
|
|
79
|
-
return { name, outcome: 'not-in-registry' };
|
|
80
|
-
}
|
|
81
|
-
const { asset: registryAsset, version: latestVersion } = foundAsset;
|
|
82
|
-
progress('Fetching latest version...');
|
|
83
|
-
const token = await getGitHubToken();
|
|
84
|
-
const effectiveBranch = getEffectiveBranch(config.registryBranch);
|
|
85
|
-
const remoteFiles = await listAssetDirectoryFiles(token, registryAsset, latestVersion, effectiveBranch);
|
|
86
|
-
// Resolve installed paths via the adapter
|
|
87
|
-
const resolved = resolveInstalledPaths(installed, adapter, projectDir);
|
|
88
|
-
const installedPathMap = new Map(resolved.files.map((f) => [f.sourcePath, f.installedPath]));
|
|
89
|
-
// Identify which installed files have a remote counterpart and exist locally
|
|
90
|
-
const filesToFetch = [];
|
|
91
|
-
const diffs = [];
|
|
92
|
-
for (const file of installed.files) {
|
|
93
|
-
const installedPath = installedPathMap.get(file.sourcePath);
|
|
94
|
-
const remoteFile = remoteFiles.find((f) => f.name === file.sourcePath);
|
|
95
|
-
if (!remoteFile) {
|
|
96
|
-
const absoluteInstalledPath = installedPath ? join(projectDir, installedPath) : undefined;
|
|
97
|
-
if (absoluteInstalledPath && existsSync(absoluteInstalledPath)) {
|
|
98
|
-
const localContent = await readFile(absoluteInstalledPath, 'utf-8');
|
|
99
|
-
diffs.push({
|
|
100
|
-
diffLines: computeRemovedFileDiff(localContent),
|
|
101
|
-
fileName: file.sourcePath,
|
|
102
|
-
status: 'removed',
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
diffs.push({ fileName: file.sourcePath, status: 'removed' });
|
|
107
|
-
}
|
|
108
|
-
continue;
|
|
109
|
-
}
|
|
110
|
-
if (!installedPath) {
|
|
111
|
-
diffs.push({ fileName: file.sourcePath, status: 'missing-local' });
|
|
112
|
-
continue;
|
|
113
|
-
}
|
|
114
|
-
const absoluteInstalledPath = join(projectDir, installedPath);
|
|
115
|
-
if (!existsSync(absoluteInstalledPath)) {
|
|
116
|
-
diffs.push({ fileName: file.sourcePath, status: 'missing-local' });
|
|
117
|
-
continue;
|
|
118
|
-
}
|
|
119
|
-
filesToFetch.push({ file, installedPath, remotePath: remoteFile.path });
|
|
120
|
-
}
|
|
121
|
-
// Fetch all remote file contents in parallel
|
|
122
|
-
const remoteContents = await Promise.all(filesToFetch.map(async ({ remotePath }) => fetchFileContent(token, remotePath, effectiveBranch)));
|
|
123
|
-
// Build diffs from fetched content
|
|
124
|
-
for (let i = 0; i < filesToFetch.length; i++) {
|
|
125
|
-
const { file, installedPath } = filesToFetch[i];
|
|
126
|
-
const remoteContent = remoteContents[i];
|
|
127
|
-
const absoluteInstalledPath = join(projectDir, installedPath);
|
|
128
|
-
const localContent = await readFile(absoluteInstalledPath, 'utf-8');
|
|
129
|
-
if (localContent === remoteContent) {
|
|
130
|
-
diffs.push({
|
|
131
|
-
fileName: file.sourcePath,
|
|
132
|
-
localLines: localContent.split('\n').length,
|
|
133
|
-
remoteLines: remoteContent.split('\n').length,
|
|
134
|
-
status: 'unchanged',
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
else {
|
|
138
|
-
diffs.push({
|
|
139
|
-
diffLines: computeUnifiedDiff(remoteContent, localContent, context),
|
|
140
|
-
fileName: file.sourcePath,
|
|
141
|
-
localLines: localContent.split('\n').length,
|
|
142
|
-
remoteLines: remoteContent.split('\n').length,
|
|
143
|
-
status: 'modified',
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
for (const remoteFile of remoteFiles) {
|
|
148
|
-
if (!installed.files.find((f) => f.sourcePath === remoteFile.name)) {
|
|
149
|
-
const remoteContent = await fetchFileContent(token, remoteFile.path, effectiveBranch);
|
|
150
|
-
diffs.push({ diffLines: computeAddedFileDiff(remoteContent), fileName: remoteFile.name, status: 'added' });
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
const sameVersion = installed.version === latestVersion;
|
|
154
|
-
return {
|
|
155
|
-
contextLines: context,
|
|
156
|
-
diffs,
|
|
157
|
-
installed,
|
|
158
|
-
latestVersion,
|
|
159
|
-
name,
|
|
160
|
-
outcome: 'results',
|
|
161
|
-
registryAsset,
|
|
162
|
-
sameVersion,
|
|
163
|
-
};
|
|
164
|
-
}, [cliOrg, inlineOrg, name, refresh, tool]);
|
|
51
|
+
const state = useCommand(async (progress) => computeDiffOutcome(name, undefined, tool, context, refresh, projectRoot, cliOrg, inlineOrg, progress), [cliOrg, context, inlineOrg, name, projectRoot, refresh, tool]);
|
|
165
52
|
if (state.status === 'loading') {
|
|
166
53
|
return _jsx(Spinner, { message: state.message });
|
|
167
54
|
}
|
|
@@ -175,6 +62,6 @@ export default function Diff({ args: [rawName], options: { context, org: cliOrg,
|
|
|
175
62
|
if (data.outcome === 'not-in-registry') {
|
|
176
63
|
return (_jsxs(Text, { children: [_jsx(Text, { color: 'yellow', children: "!" }), " ", _jsx(Text, { bold: true, children: data.name }), " was not found in the registry."] }));
|
|
177
64
|
}
|
|
178
|
-
return (_jsx(DiffView, {
|
|
65
|
+
return (_jsx(DiffView, { diffs: data.diffs, installedVersion: data.installed.version, latestVersion: data.latestVersion, name: data.name, sameVersion: data.sameVersion }));
|
|
179
66
|
}
|
|
180
67
|
//# sourceMappingURL=diff.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diff.js","sourceRoot":"","sources":["../../src/commands/diff.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"diff.js","sourceRoot":"","sources":["../../src/commands/diff.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,MAAM,CAAC,MAAM,WAAW,GAAG,mDAAmD,CAAC;AAE/E,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9B,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,OAAO,CAAC,CAAC,CAAC;SACV,QAAQ,CACP,MAAM,CAAC;QACL,KAAK,EAAE,GAAG;QACV,WAAW,EAAE,4CAA4C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W,EAAE,IAAI,CAAC,WAAW,GAC7B,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -2,7 +2,6 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const description = "Freeze an installed asset to prevent sync and update from overwriting it";
|
|
3
3
|
export declare const options: z.ZodObject<{
|
|
4
4
|
projectRoot: z.ZodOptional<z.ZodString>;
|
|
5
|
-
tool: z.ZodOptional<z.ZodString>;
|
|
6
5
|
type: z.ZodOptional<z.ZodEnum<{
|
|
7
6
|
skill: "skill";
|
|
8
7
|
agent: "agent";
|
|
@@ -17,6 +16,6 @@ type Props = {
|
|
|
17
16
|
args: z.infer<typeof args>;
|
|
18
17
|
options: z.infer<typeof options>;
|
|
19
18
|
};
|
|
20
|
-
export default function Freeze({ args: [
|
|
19
|
+
export default function Freeze({ args: [rawName], options: { projectRoot, type } }: Props): import("react/jsx-runtime").JSX.Element;
|
|
21
20
|
export {};
|
|
22
21
|
//# sourceMappingURL=freeze.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"freeze.d.ts","sourceRoot":"","sources":["../../src/commands/freeze.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"freeze.d.ts","sourceRoot":"","sources":["../../src/commands/freeze.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,WAAW,6EAA6E,CAAC;AAEtG,eAAO,MAAM,OAAO;;;;;;;;;;iBAgBlB,CAAC;AAEH,eAAO,MAAM,IAAI,iCAAyD,CAAC;AAI3E,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;IAC3B,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAC;CAClC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,2CAmDxF"}
|
package/build/commands/freeze.js
CHANGED
|
@@ -4,10 +4,11 @@ import { option } from 'pastel';
|
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import { Spinner } from '../components/index.js';
|
|
6
6
|
import { useCommand } from '../hooks/useCommand.js';
|
|
7
|
-
import {
|
|
7
|
+
import { freezeAssetInConfig, isAssetFrozen } from '../lib/config.js';
|
|
8
|
+
import { readLockfile, requireDirectInstall } from '../lib/lockfile.js';
|
|
9
|
+
import { parseOrgFromName } from '../lib/org.js';
|
|
8
10
|
import { findProjectRoot } from '../lib/paths.js';
|
|
9
11
|
import { AssetType } from '../lib/schemas/manifest.js';
|
|
10
|
-
import { resolveTool } from '../lib/tool-resolver.js';
|
|
11
12
|
export const description = 'Freeze an installed asset to prevent sync and update from overwriting it';
|
|
12
13
|
export const options = z.object({
|
|
13
14
|
projectRoot: z
|
|
@@ -17,50 +18,29 @@ export const options = z.object({
|
|
|
17
18
|
alias: 'P',
|
|
18
19
|
description: 'Override project root directory',
|
|
19
20
|
})),
|
|
20
|
-
tool: z
|
|
21
|
-
.string()
|
|
22
|
-
.optional()
|
|
23
|
-
.describe(option({
|
|
24
|
-
alias: 'T',
|
|
25
|
-
description: 'Target tool (e.g., claude-code)',
|
|
26
|
-
})),
|
|
27
21
|
type: AssetType.optional().describe(option({
|
|
28
22
|
alias: 't',
|
|
29
23
|
description: 'Filter by asset type (skill, agent, rule, hook, memory-template, mcp-config)',
|
|
30
24
|
})),
|
|
31
25
|
});
|
|
32
26
|
export const args = z.tuple([z.string().describe('Asset name to freeze')]);
|
|
33
|
-
export default function Freeze({ args: [
|
|
27
|
+
export default function Freeze({ args: [rawName], options: { projectRoot, type } }) {
|
|
28
|
+
const { name, org } = parseOrgFromName(rawName);
|
|
34
29
|
const state = useCommand(async (progress) => {
|
|
35
30
|
const projectDir = findProjectRoot(projectRoot);
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
if (!installed) {
|
|
44
|
-
throw new LockfileError(`Asset '${name}' is not installed`);
|
|
45
|
-
}
|
|
46
|
-
// Check if already frozen
|
|
47
|
-
if (isFrozen(lockfile, name, type)) {
|
|
48
|
-
return { name, outcome: 'already-frozen' };
|
|
49
|
-
}
|
|
50
|
-
progress('Freezing asset...');
|
|
51
|
-
const updatedLockfile = freezeAsset(lockfile, name, type);
|
|
52
|
-
progress('Writing lockfile...');
|
|
53
|
-
await writeLockfile(projectDir, updatedLockfile);
|
|
54
|
-
return { name, outcome: 'frozen' };
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
catch (error) {
|
|
58
|
-
if (error instanceof LockfileLockedError) {
|
|
59
|
-
throw new Error('Another ATK process is currently modifying this project. Please wait and try again.');
|
|
60
|
-
}
|
|
61
|
-
throw error;
|
|
31
|
+
progress('Reading lockfile...');
|
|
32
|
+
const lockfile = await readLockfile(projectDir);
|
|
33
|
+
// Verify asset is installed and is a direct install
|
|
34
|
+
const installed = requireDirectInstall(lockfile, name, 'frozen', type, org);
|
|
35
|
+
// Check if already frozen via project config
|
|
36
|
+
if (await isAssetFrozen(projectDir, name, installed.type, org)) {
|
|
37
|
+
return { name: rawName, outcome: 'already-frozen' };
|
|
62
38
|
}
|
|
63
|
-
|
|
39
|
+
// Freeze in project config (.atkrc.json)
|
|
40
|
+
progress('Freezing asset...');
|
|
41
|
+
await freezeAssetInConfig(projectDir, name, installed.type, org);
|
|
42
|
+
return { name: rawName, outcome: 'frozen' };
|
|
43
|
+
}, [rawName, projectRoot, type]);
|
|
64
44
|
if (state.status === 'loading') {
|
|
65
45
|
return _jsx(Spinner, { message: state.message });
|
|
66
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"freeze.js","sourceRoot":"","sources":["../../src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AAC,EACD,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,CAAC,CAC7B,CAAC;IAEF,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QAC/B,OAAO,KAAC,OAAO,IAAC,OAAO,EAAE,KAAK,CAAC,OAAO,GAAI,CAAC;IAC7C,CAAC;IAED,IAAI,KAAK,CAAC,MAAM,KAAK,OAAO,EAAE,CAAC;QAC7B,OAAO,MAAC,IAAI,IAAC,KAAK,EAAC,KAAK,wBAAS,KAAK,CAAC,OAAO,IAAQ,CAAC;IACzD,CAAC;IAED,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IAEvB,IAAI,IAAI,CAAC,OAAO,KAAK,gBAAgB,EAAE,CAAC;QACtC,OAAO,CACL,MAAC,IAAI,eACH,KAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,kBAAS,OAAC,KAAC,IAAI,IAAC,IAAI,kBAAE,IAAI,CAAC,IAAI,GAAQ,0BACtD,CACR,CAAC;IACJ,CAAC;IAED,4BAA4B;IAC5B,OAAO,CACL,MAAC,IAAI,IAAC,KAAK,EAAC,OAAO,wBACV,KAAC,IAAI,IAAC,IAAI,kBAAE,IAAI,CAAC,IAAI,GAAQ,IAC/B,CACR,CAAC;AACJ,CAAC"}
|
package/build/commands/info.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const description = "Show details about an asset";
|
|
3
3
|
export declare const options: z.ZodObject<{
|
|
4
|
-
full: z.ZodDefault<z.ZodBoolean>;
|
|
5
4
|
json: z.ZodDefault<z.ZodBoolean>;
|
|
6
5
|
org: z.ZodOptional<z.ZodString>;
|
|
7
6
|
refresh: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -21,6 +20,6 @@ type Props = {
|
|
|
21
20
|
args: z.infer<typeof args>;
|
|
22
21
|
options: z.infer<typeof options>;
|
|
23
22
|
};
|
|
24
|
-
export default function Info({ args: [rawName], options: {
|
|
23
|
+
export default function Info({ args: [rawName], options: { json, org: cliOrg, refresh, type, verbose, version }, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
25
24
|
export {};
|
|
26
25
|
//# sourceMappingURL=info.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../src/commands/info.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../src/commands/info.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAqBxB,eAAO,MAAM,WAAW,gCAAgC,CAAC;AAEzD,eAAO,MAAM,OAAO;;;;;;;;;;;;;;iBAoDlB,CAAC;AAEH,eAAO,MAAM,IAAI,iCAA8E,CAAC;AAsBhG,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;IAC3B,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAC;CAClC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,EAC3B,IAAI,EAAE,CAAC,OAAO,CAAC,EACf,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,GAChE,EAAE,KAAK,2CA2LP"}
|
package/build/commands/info.js
CHANGED
|
@@ -4,22 +4,15 @@ import { option } from 'pastel';
|
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import { AssetDetail, BundleDetail, Spinner } from '../components/index.js';
|
|
6
6
|
import { useCommand } from '../hooks/useCommand.js';
|
|
7
|
-
import {
|
|
7
|
+
import { buildBundleReadmeUrl, buildReadmeUrl } from '../lib/github.js';
|
|
8
8
|
import { findInstalledAsset, readLockfile } from '../lib/lockfile.js';
|
|
9
|
-
import { parseOrgFromName
|
|
9
|
+
import { parseOrgFromName } from '../lib/org.js';
|
|
10
10
|
import { findProjectRoot } from '../lib/paths.js';
|
|
11
|
-
import { fetchRegistry, findAsset, findBundle, getSortedVersions, isDeprecated } from '../lib/registry.js';
|
|
11
|
+
import { fetchRegistry, findAsset, findAssetsByName, findBundle, getSortedVersions, isDeprecated, } from '../lib/registry.js';
|
|
12
12
|
import { AssetType } from '../lib/schemas/manifest.js';
|
|
13
13
|
import { parseNameVersion } from '../lib/version.js';
|
|
14
14
|
export const description = 'Show details about an asset';
|
|
15
15
|
export const options = z.object({
|
|
16
|
-
full: z
|
|
17
|
-
.boolean()
|
|
18
|
-
.default(false)
|
|
19
|
-
.describe(option({
|
|
20
|
-
alias: 'F',
|
|
21
|
-
description: 'Show the full README without truncation',
|
|
22
|
-
})),
|
|
23
16
|
json: z
|
|
24
17
|
.boolean()
|
|
25
18
|
.default(false)
|
|
@@ -61,14 +54,13 @@ export const options = z.object({
|
|
|
61
54
|
})),
|
|
62
55
|
});
|
|
63
56
|
export const args = z.tuple([z.string().describe('Asset name (supports name@version syntax)')]);
|
|
64
|
-
export default function Info({ args: [rawName], options: {
|
|
57
|
+
export default function Info({ args: [rawName], options: { json, org: cliOrg, refresh, type, verbose, version }, }) {
|
|
65
58
|
const { name: parsedName, version: parsedVersion } = parseNameVersion(rawName);
|
|
66
59
|
// Extract org from @org/name syntax if present
|
|
67
60
|
const { name: nameFromOrg, org: inlineOrg } = parseOrgFromName(parsedName);
|
|
68
61
|
const name = inlineOrg ? nameFromOrg : parsedName;
|
|
69
62
|
const effectiveVersion = version ?? parsedVersion;
|
|
70
63
|
const state = useCommand(async (progress) => {
|
|
71
|
-
const parsedType = type;
|
|
72
64
|
// Resolve project root — non-fatal if not in a project
|
|
73
65
|
let projectDir;
|
|
74
66
|
try {
|
|
@@ -77,26 +69,24 @@ export default function Info({ args: [rawName], options: { full, json, org: cliO
|
|
|
77
69
|
catch {
|
|
78
70
|
// Not in a project directory — fall back to user config only
|
|
79
71
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
const registry = await fetchRegistry({ force: refresh });
|
|
83
|
-
// Read lockfile early for org resolution (non-fatal)
|
|
84
|
-
let lockfileOrg;
|
|
72
|
+
// Read lockfile once for install status (non-fatal)
|
|
73
|
+
let lockfile;
|
|
85
74
|
try {
|
|
86
75
|
if (projectDir) {
|
|
87
|
-
|
|
88
|
-
lockfileOrg = lf.org;
|
|
76
|
+
lockfile = await readLockfile(projectDir);
|
|
89
77
|
}
|
|
90
78
|
}
|
|
91
79
|
catch {
|
|
92
80
|
// Non-fatal — lockfile read failure
|
|
93
81
|
}
|
|
94
|
-
|
|
95
|
-
const
|
|
96
|
-
|
|
82
|
+
progress('Fetching registry...');
|
|
83
|
+
const registry = await fetchRegistry({ force: refresh });
|
|
84
|
+
// Use explicit org only (inline @org/name or --org flag)
|
|
85
|
+
const org = inlineOrg ?? cliOrg;
|
|
86
|
+
const resolved = findAsset(registry, name, type, effectiveVersion, org);
|
|
97
87
|
if (!resolved) {
|
|
98
88
|
if (effectiveVersion) {
|
|
99
|
-
const assetExists = findAsset(registry, name,
|
|
89
|
+
const assetExists = findAsset(registry, name, type, undefined, org);
|
|
100
90
|
if (assetExists) {
|
|
101
91
|
const { versions: availableVersions } = getSortedVersions(assetExists.asset);
|
|
102
92
|
return {
|
|
@@ -113,27 +103,28 @@ export default function Info({ args: [rawName], options: { full, json, org: cliO
|
|
|
113
103
|
return { bundle, outcome: 'bundle_found' };
|
|
114
104
|
}
|
|
115
105
|
}
|
|
106
|
+
// When no explicit org was provided, suggest org-scoped matches
|
|
107
|
+
if (!org) {
|
|
108
|
+
const orgMatches = findAssetsByName(registry, name, type);
|
|
109
|
+
if (orgMatches.length > 0) {
|
|
110
|
+
return { name, orgMatches, outcome: 'not_found_with_suggestions' };
|
|
111
|
+
}
|
|
112
|
+
}
|
|
116
113
|
return { name, outcome: 'not_found' };
|
|
117
114
|
}
|
|
118
|
-
const deprecation = isDeprecated(registry, name,
|
|
115
|
+
const deprecation = isDeprecated(registry, name, type);
|
|
119
116
|
const { versions: availableVersions } = getSortedVersions(resolved.asset);
|
|
120
|
-
//
|
|
117
|
+
// Determine install status from already-loaded lockfile
|
|
121
118
|
progress('Checking install status...');
|
|
122
119
|
let isInstalled = false;
|
|
123
120
|
let installedVersion;
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
throw new Error('No project root');
|
|
127
|
-
const lockfile = await readLockfile(projectDir);
|
|
128
|
-
const installed = findInstalledAsset(lockfile, name, parsedType);
|
|
121
|
+
if (lockfile) {
|
|
122
|
+
const installed = findInstalledAsset(lockfile, name, type, resolved.asset.org);
|
|
129
123
|
if (installed) {
|
|
130
124
|
isInstalled = true;
|
|
131
125
|
installedVersion = installed.version;
|
|
132
126
|
}
|
|
133
127
|
}
|
|
134
|
-
catch {
|
|
135
|
-
// Lockfile loading is non-fatal — default to not installed
|
|
136
|
-
}
|
|
137
128
|
return {
|
|
138
129
|
asset: resolved.asset,
|
|
139
130
|
availableVersions,
|
|
@@ -152,22 +143,27 @@ export default function Info({ args: [rawName], options: { full, json, org: cliO
|
|
|
152
143
|
return _jsxs(Text, { color: 'red', children: ["Error: ", state.message] });
|
|
153
144
|
}
|
|
154
145
|
const { data } = state;
|
|
155
|
-
if (data.outcome === 'not_found' ||
|
|
146
|
+
if (data.outcome === 'not_found' ||
|
|
147
|
+
data.outcome === 'not_found_with_suggestions' ||
|
|
148
|
+
data.outcome === 'version_not_found') {
|
|
156
149
|
process.exitCode = 1;
|
|
157
150
|
}
|
|
158
151
|
if (json) {
|
|
159
|
-
return _jsx(Text, { children: JSON.stringify(buildJsonOutput(data), null, 2) });
|
|
152
|
+
return (_jsx(Box, { width: 9999, children: _jsx(Text, { children: JSON.stringify(buildJsonOutput(data), null, 2) }) }));
|
|
160
153
|
}
|
|
161
154
|
if (data.outcome === 'bundle_found') {
|
|
162
|
-
return _jsx(BundleDetail, { bundle: data.bundle });
|
|
155
|
+
return _jsx(BundleDetail, { bundle: data.bundle, readmeUrl: buildBundleReadmeUrl(data.bundle.name, data.bundle.version) });
|
|
163
156
|
}
|
|
164
157
|
if (data.outcome === 'version_not_found') {
|
|
165
158
|
return (_jsxs(Box, { flexDirection: 'column', children: [_jsxs(Text, { color: 'red', children: ["Version ", _jsxs(Text, { bold: true, children: ["\"", data.version, "\""] }), " of ", _jsxs(Text, { bold: true, children: ["\"", data.name, "\""] }), " not found."] }), data.availableVersions.length > 0 && (_jsxs(Text, { dimColor: true, children: ["Available versions: ", data.availableVersions.join(', ')] }))] }));
|
|
166
159
|
}
|
|
160
|
+
if (data.outcome === 'not_found_with_suggestions') {
|
|
161
|
+
return (_jsxs(Box, { flexDirection: 'column', children: [_jsxs(Text, { color: 'red', children: ["Asset ", _jsxs(Text, { bold: true, children: ["\"", data.name, "\""] }), " not found in the global registry."] }), _jsx(Text, { children: "Did you mean one of these org-scoped assets?" }), data.orgMatches.map((match) => (_jsxs(Text, { children: [' ', "@", match.org, "/", match.name, " (", match.type, ")"] }, `${match.org}/${match.name}`))), _jsxs(Text, { dimColor: true, children: ["Run ", _jsx(Text, { bold: true, children: "atk info @org/name" }), " to view an org-scoped asset."] })] }));
|
|
162
|
+
}
|
|
167
163
|
if (data.outcome === 'not_found') {
|
|
168
164
|
return (_jsxs(Box, { flexDirection: 'column', children: [_jsxs(Text, { color: 'red', children: ["Asset ", _jsxs(Text, { bold: true, children: ["\"", data.name, "\""] }), " not found in the registry."] }), _jsxs(Text, { dimColor: true, children: ["Run ", _jsxs(Text, { bold: true, children: ["atk search ", data.name] }), " to find similar assets."] })] }));
|
|
169
165
|
}
|
|
170
|
-
return (_jsx(AssetDetail, { asset: data.asset, availableVersions: data.availableVersions, deprecation: data.deprecation,
|
|
166
|
+
return (_jsx(Box, { flexDirection: 'column', children: _jsx(AssetDetail, { asset: data.asset, availableVersions: data.availableVersions, deprecation: data.deprecation, installedVersion: data.installedVersion, isInstalled: data.isInstalled, verbose: verbose, version: data.version, versionData: data.versionData }) }));
|
|
171
167
|
}
|
|
172
168
|
function buildJsonOutput(data) {
|
|
173
169
|
switch (data.outcome) {
|
|
@@ -179,6 +175,7 @@ function buildJsonOutput(data) {
|
|
|
179
175
|
description: data.bundle.description,
|
|
180
176
|
name: data.bundle.name,
|
|
181
177
|
outcome: data.outcome,
|
|
178
|
+
readmeUrl: buildBundleReadmeUrl(data.bundle.name, data.bundle.version),
|
|
182
179
|
tags: data.bundle.tags,
|
|
183
180
|
version: data.bundle.version,
|
|
184
181
|
};
|
|
@@ -192,6 +189,7 @@ function buildJsonOutput(data) {
|
|
|
192
189
|
isInstalled: data.isInstalled,
|
|
193
190
|
name: data.asset.name,
|
|
194
191
|
outcome: data.outcome,
|
|
192
|
+
readmeUrl: buildReadmeUrl({ name: data.asset.name, org: data.asset.org, type: data.asset.type }, data.version),
|
|
195
193
|
tags: data.asset.tags,
|
|
196
194
|
type: data.asset.type,
|
|
197
195
|
version: data.version,
|
|
@@ -201,7 +199,6 @@ function buildJsonOutput(data) {
|
|
|
201
199
|
dependencies: data.versionData.dependencies,
|
|
202
200
|
description: data.versionData.description,
|
|
203
201
|
files: data.versionData.files,
|
|
204
|
-
readme: data.versionData.readme,
|
|
205
202
|
security: data.versionData.security,
|
|
206
203
|
tools: data.versionData.tools,
|
|
207
204
|
},
|
|
@@ -214,6 +211,14 @@ function buildJsonOutput(data) {
|
|
|
214
211
|
outcome: data.outcome,
|
|
215
212
|
};
|
|
216
213
|
}
|
|
214
|
+
case 'not_found_with_suggestions': {
|
|
215
|
+
return {
|
|
216
|
+
exitCode: 1,
|
|
217
|
+
name: data.name,
|
|
218
|
+
orgMatches: data.orgMatches,
|
|
219
|
+
outcome: data.outcome,
|
|
220
|
+
};
|
|
221
|
+
}
|
|
217
222
|
case 'version_not_found': {
|
|
218
223
|
return {
|
|
219
224
|
availableVersions: data.availableVersions,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"info.js","sourceRoot":"","sources":["../../src/commands/info.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"info.js","sourceRoot":"","sources":["../../src/commands/info.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EACL,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,UAAU,EACV,iBAAiB,EACjB,YAAY,GACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,MAAM,CAAC,MAAM,WAAW,GAAG,6BAA6B,CAAC;AAEzD,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9B,IAAI,EAAE,CAAC;SACJ,OAAO,EAAE;SACT,OAAO,CAAC,KAAK,CAAC;SACd,QAAQ,CACP,MAAM,CAAC;QACL,KAAK,EAAE,GAAG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WAAW,CAAC,KAAK;oBAC7B,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC,QAAQ;oBACnC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK;iBAC9B;aACF,CAAC;QACJ,CAAC;QACD,KAAK,WAAW,CAAC,CAAC,CAAC;YACjB,OAAO;gBACL,QAAQ,EAAE,CAAC;gBACX,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,CAAC;QACJ,CAAC;QACD,KAAK,4BAA4B,CAAC,CAAC,CAAC;YAClC,OAAO;gBACL,QAAQ,EAAE,CAAC;gBACX,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,CAAC;QACJ,CAAC;QACD,KAAK,mBAAmB,CAAC,CAAC,CAAC;YACzB,OAAO;gBACL,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;gBACzC,QAAQ,EAAE,CAAC;gBACX,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,WAAW,mCAAmC,CAAC;AAE5D,eAAO,MAAM,OAAO;;;;;;;iBAuDlB,CAAC;AAEH,eAAO,MAAM,IAAI,iCAEf,CAAC;AAEH,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;IAC3B,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAC;CAClC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,EAC3B,IAAI,EAAE,CAAC,OAAO,CAAC,EACf,OAAO,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAC1G,EAAE,KAAK,kDAgJP"}
|