@detergent-software/atk 8.1.2-dev.4 → 8.1.2-dev.40

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.
Files changed (147) hide show
  1. package/CHANGELOG.md +254 -0
  2. package/build/commands/audit.d.ts.map +1 -1
  3. package/build/commands/audit.js +6 -4
  4. package/build/commands/audit.js.map +1 -1
  5. package/build/commands/browse.js +24 -34
  6. package/build/commands/browse.js.map +1 -1
  7. package/build/commands/install.d.ts.map +1 -1
  8. package/build/commands/install.js +32 -73
  9. package/build/commands/install.js.map +1 -1
  10. package/build/commands/list.js +2 -2
  11. package/build/commands/list.js.map +1 -1
  12. package/build/commands/login.js +2 -2
  13. package/build/commands/login.js.map +1 -1
  14. package/build/commands/register.js +3 -3
  15. package/build/commands/register.js.map +1 -1
  16. package/build/commands/sync.d.ts.map +1 -1
  17. package/build/commands/sync.js +16 -11
  18. package/build/commands/sync.js.map +1 -1
  19. package/build/commands/uninstall.d.ts +9 -1
  20. package/build/commands/uninstall.d.ts.map +1 -1
  21. package/build/commands/uninstall.js +23 -26
  22. package/build/commands/uninstall.js.map +1 -1
  23. package/build/commands/update.d.ts +9 -1
  24. package/build/commands/update.d.ts.map +1 -1
  25. package/build/commands/update.js +54 -14
  26. package/build/commands/update.js.map +1 -1
  27. package/build/components/InstallConfirmBar.d.ts.map +1 -1
  28. package/build/components/InstallConfirmBar.js +2 -1
  29. package/build/components/InstallConfirmBar.js.map +1 -1
  30. package/build/components/ListActionBar.d.ts.map +1 -1
  31. package/build/components/ListActionBar.js +3 -2
  32. package/build/components/ListActionBar.js.map +1 -1
  33. package/build/components/RunStoppedHint.d.ts +13 -0
  34. package/build/components/RunStoppedHint.d.ts.map +1 -0
  35. package/build/components/RunStoppedHint.js +12 -0
  36. package/build/components/RunStoppedHint.js.map +1 -0
  37. package/build/components/SkippedAssetSection.d.ts +2 -0
  38. package/build/components/SkippedAssetSection.d.ts.map +1 -1
  39. package/build/components/SkippedAssetSection.js +1 -1
  40. package/build/components/SkippedAssetSection.js.map +1 -1
  41. package/build/components/SyncDriftedList.d.ts +3 -2
  42. package/build/components/SyncDriftedList.d.ts.map +1 -1
  43. package/build/components/SyncDriftedList.js +11 -3
  44. package/build/components/SyncDriftedList.js.map +1 -1
  45. package/build/components/index.d.ts +1 -0
  46. package/build/components/index.d.ts.map +1 -1
  47. package/build/components/index.js +1 -0
  48. package/build/components/index.js.map +1 -1
  49. package/build/hooks/useCommand.js +2 -2
  50. package/build/hooks/useCommand.js.map +1 -1
  51. package/build/hooks/useInitState.js +5 -5
  52. package/build/hooks/useInitState.js.map +1 -1
  53. package/build/hooks/useListActions.d.ts.map +1 -1
  54. package/build/hooks/useListActions.js +34 -18
  55. package/build/hooks/useListActions.js.map +1 -1
  56. package/build/hooks/usePruneState.js +9 -9
  57. package/build/hooks/usePruneState.js.map +1 -1
  58. package/build/hooks/usePublishState.js +3 -3
  59. package/build/hooks/usePublishState.js.map +1 -1
  60. package/build/hooks/useRegistryChangeState.js +2 -2
  61. package/build/hooks/useRegistryChangeState.js.map +1 -1
  62. package/build/hooks/useSetupState.js +3 -3
  63. package/build/hooks/useSetupState.js.map +1 -1
  64. package/build/hooks/useUninstallState.d.ts +16 -29
  65. package/build/hooks/useUninstallState.d.ts.map +1 -1
  66. package/build/hooks/useUninstallState.js +147 -140
  67. package/build/hooks/useUninstallState.js.map +1 -1
  68. package/build/lib/adapter.d.ts.map +1 -1
  69. package/build/lib/adapter.js +3 -3
  70. package/build/lib/adapter.js.map +1 -1
  71. package/build/lib/asset-tools.d.ts +5 -0
  72. package/build/lib/asset-tools.d.ts.map +1 -1
  73. package/build/lib/asset-tools.js +7 -0
  74. package/build/lib/asset-tools.js.map +1 -1
  75. package/build/lib/auth.d.ts.map +1 -1
  76. package/build/lib/auth.js +3 -3
  77. package/build/lib/auth.js.map +1 -1
  78. package/build/lib/checksum.d.ts.map +1 -1
  79. package/build/lib/checksum.js +2 -1
  80. package/build/lib/checksum.js.map +1 -1
  81. package/build/lib/diagnostics.d.ts.map +1 -1
  82. package/build/lib/diagnostics.js +6 -5
  83. package/build/lib/diagnostics.js.map +1 -1
  84. package/build/lib/diff-command.d.ts.map +1 -1
  85. package/build/lib/diff-command.js +10 -6
  86. package/build/lib/diff-command.js.map +1 -1
  87. package/build/lib/enabled-list.d.ts +15 -0
  88. package/build/lib/enabled-list.d.ts.map +1 -0
  89. package/build/lib/enabled-list.js +83 -0
  90. package/build/lib/enabled-list.js.map +1 -0
  91. package/build/lib/entra.d.ts.map +1 -1
  92. package/build/lib/entra.js +3 -2
  93. package/build/lib/entra.js.map +1 -1
  94. package/build/lib/errors.d.ts +9 -0
  95. package/build/lib/errors.d.ts.map +1 -1
  96. package/build/lib/errors.js +29 -0
  97. package/build/lib/errors.js.map +1 -1
  98. package/build/lib/file-snapshot.d.ts +17 -0
  99. package/build/lib/file-snapshot.d.ts.map +1 -0
  100. package/build/lib/file-snapshot.js +41 -0
  101. package/build/lib/file-snapshot.js.map +1 -0
  102. package/build/lib/installed-for-tool.d.ts +8 -0
  103. package/build/lib/installed-for-tool.d.ts.map +1 -0
  104. package/build/lib/installed-for-tool.js +18 -0
  105. package/build/lib/installed-for-tool.js.map +1 -0
  106. package/build/lib/installer.d.ts +108 -4
  107. package/build/lib/installer.d.ts.map +1 -1
  108. package/build/lib/installer.js +551 -168
  109. package/build/lib/installer.js.map +1 -1
  110. package/build/lib/lockfile.d.ts +23 -4
  111. package/build/lib/lockfile.d.ts.map +1 -1
  112. package/build/lib/lockfile.js +32 -14
  113. package/build/lib/lockfile.js.map +1 -1
  114. package/build/lib/multi-tool-install.d.ts +23 -0
  115. package/build/lib/multi-tool-install.d.ts.map +1 -0
  116. package/build/lib/multi-tool-install.js +78 -0
  117. package/build/lib/multi-tool-install.js.map +1 -0
  118. package/build/lib/org.d.ts +16 -0
  119. package/build/lib/org.d.ts.map +1 -1
  120. package/build/lib/org.js +18 -0
  121. package/build/lib/org.js.map +1 -1
  122. package/build/lib/owned-paths.d.ts +68 -0
  123. package/build/lib/owned-paths.d.ts.map +1 -0
  124. package/build/lib/owned-paths.js +162 -0
  125. package/build/lib/owned-paths.js.map +1 -0
  126. package/build/lib/publisher.d.ts.map +1 -1
  127. package/build/lib/publisher.js +2 -1
  128. package/build/lib/publisher.js.map +1 -1
  129. package/build/lib/registry.d.ts.map +1 -1
  130. package/build/lib/registry.js +10 -6
  131. package/build/lib/registry.js.map +1 -1
  132. package/build/lib/setup.d.ts.map +1 -1
  133. package/build/lib/setup.js +4 -3
  134. package/build/lib/setup.js.map +1 -1
  135. package/build/lib/sync.d.ts +17 -4
  136. package/build/lib/sync.d.ts.map +1 -1
  137. package/build/lib/sync.js +119 -45
  138. package/build/lib/sync.js.map +1 -1
  139. package/build/lib/uninstaller.d.ts +21 -4
  140. package/build/lib/uninstaller.d.ts.map +1 -1
  141. package/build/lib/uninstaller.js +61 -91
  142. package/build/lib/uninstaller.js.map +1 -1
  143. package/build/lib/updater.d.ts +64 -3
  144. package/build/lib/updater.d.ts.map +1 -1
  145. package/build/lib/updater.js +367 -83
  146. package/build/lib/updater.js.map +1 -1
  147. package/package.json +1 -1
@@ -0,0 +1,41 @@
1
+ import { chmod, readFile, stat } from 'node:fs/promises';
2
+ import { writeBinaryFile } from './write-file.js';
3
+ /**
4
+ * Write every file of a snapshot back as it was, recreating its directory and mode (a hook
5
+ * script keeps its exec bit). Files created since the snapshot are left alone. A file that
6
+ * can't be written doesn't stop the others; the first error is thrown once all were tried.
7
+ */
8
+ export async function restoreFiles(snapshot) {
9
+ const errors = [];
10
+ for (const [path, { content, mode }] of snapshot) {
11
+ try {
12
+ await writeBinaryFile(path, content);
13
+ await chmod(path, mode);
14
+ }
15
+ catch (error) {
16
+ errors.push(error);
17
+ }
18
+ }
19
+ if (errors.length > 0)
20
+ throw errors[0];
21
+ }
22
+ /**
23
+ * Capture the bytes and mode of each file in `paths` that exists. A missing path is skipped,
24
+ * including one under a file where a directory would be (`ENOTDIR` on POSIX, `ENOENT` on Windows).
25
+ */
26
+ export async function snapshotFiles(paths) {
27
+ const snapshot = new Map();
28
+ for (const path of new Set(paths)) {
29
+ const stats = await stat(path).catch((error) => {
30
+ const code = error.code;
31
+ if (code === 'ENOENT' || code === 'ENOTDIR')
32
+ return undefined;
33
+ throw error;
34
+ });
35
+ if (!stats?.isFile())
36
+ continue;
37
+ snapshot.set(path, { content: await readFile(path), mode: stats.mode });
38
+ }
39
+ return snapshot;
40
+ }
41
+ //# sourceMappingURL=file-snapshot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-snapshot.js","sourceRoot":"","sources":["../../src/lib/file-snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKlD;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,QAAsB;IACvD,MAAM,MAAM,GAAc,EAAE,CAAC;IAC7B,KAAK,MAAM,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,IAAI,QAAQ,EAAE,CAAC;QACjD,IAAI,CAAC;YACH,MAAM,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YACrC,MAAM,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC1B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC;IACH,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;QAAE,MAAM,MAAM,CAAC,CAAC,CAAC,CAAC;AACzC,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,KAAuB;IACzD,MAAM,QAAQ,GAAG,IAAI,GAAG,EAA6C,CAAC;IACtE,KAAK,MAAM,IAAI,IAAI,IAAI,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;QAClC,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;YACtD,MAAM,IAAI,GAAI,KAA+B,CAAC,IAAI,CAAC;YACnD,IAAI,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,SAAS;gBAAE,OAAO,SAAS,CAAC;YAC9D,MAAM,KAAK,CAAC;QACd,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE;YAAE,SAAS;QAC/B,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;IAC1E,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { Adapter } from './schemas/adapter.js';
2
+ import type { InstalledAsset } from './schemas/lockfile.js';
3
+ /**
4
+ * Whether a lockfile asset is in place for one tool: not uninstalled for it (`excludedTools`),
5
+ * its files are on disk, and the tool's config registration was recorded.
6
+ */
7
+ export declare function isInstalledForTool(installed: InstalledAsset, adapter: Adapter, projectDir: string): boolean;
8
+ //# sourceMappingURL=installed-for-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"installed-for-tool.d.ts","sourceRoot":"","sources":["../../src/lib/installed-for-tool.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAO5D;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAK3G"}
@@ -0,0 +1,18 @@
1
+ import { join } from 'node:path';
2
+ import { resolveInstalledPaths } from './adapter.js';
3
+ import { isExcludedForTool } from './asset-tools.js';
4
+ import { needsConfigRegistration } from './config-entries.js';
5
+ import { areAssetFilesIntact } from './lockfile.js';
6
+ /**
7
+ * Whether a lockfile asset is in place for one tool: not uninstalled for it (`excludedTools`),
8
+ * its files are on disk, and the tool's config registration was recorded.
9
+ */
10
+ export function isInstalledForTool(installed, adapter, projectDir) {
11
+ if (isExcludedForTool(installed, adapter.tool))
12
+ return false;
13
+ if (needsConfigRegistration(installed, adapter))
14
+ return false;
15
+ const resolved = resolveInstalledPaths(installed, adapter, projectDir);
16
+ return areAssetFilesIntact(resolved.files.map((f) => join(projectDir, f.installedPath)));
17
+ }
18
+ //# sourceMappingURL=installed-for-tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"installed-for-tool.js","sourceRoot":"","sources":["../../src/lib/installed-for-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAKjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpD;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,SAAyB,EAAE,OAAgB,EAAE,UAAkB;IAChG,IAAI,iBAAiB,CAAC,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IAC7D,IAAI,uBAAuB,CAAC,SAAS,EAAE,OAAO,CAAC;QAAE,OAAO,KAAK,CAAC;IAC9D,MAAM,QAAQ,GAAG,qBAAqB,CAAC,SAAS,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;IACvE,OAAO,mBAAmB,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;AAC3F,CAAC"}
@@ -1,6 +1,9 @@
1
- import type { InstallPlan } from './resolver.js';
1
+ import type { InstallPlan, InstallPlanEntry } from './resolver.js';
2
2
  import type { Adapter } from './schemas/adapter.js';
3
+ import type { RegistryAsset } from './schemas/index.js';
4
+ import type { Lockfile } from './schemas/lockfile.js';
3
5
  import { ApiCodeError } from './errors.js';
6
+ import { type AssetIdentity } from './lockfile.js';
4
7
  export interface InstallOptions {
5
8
  /** Adapter for the target tool. */
6
9
  adapter: Adapter;
@@ -10,8 +13,22 @@ export interface InstallOptions {
10
13
  org?: string;
11
14
  version: string;
12
15
  };
16
+ /** Files already downloaded with {@link fetchPlanFiles}, for every entry this tool can place. */
17
+ files?: PlanFiles;
13
18
  /** Skip file conflict detection, allowing overwrite of non-ATK files. */
14
19
  force?: boolean;
20
+ /**
21
+ * The lockfile from before the command, for deciding which assets this tool already had in
22
+ * place, which a failed plan keeps. A multi-tool install passes it, since an earlier tool's pass
23
+ * has rewritten the shared lockfile by then. Defaults to `managedFrom`, then the lockfile on disk.
24
+ */
25
+ installedBefore?: Lockfile;
26
+ /**
27
+ * The lockfile as this tool has it, for deciding which files are ATK-managed. In a multi-tool
28
+ * update the shared lockfile can already list the files of a version an earlier tool installed,
29
+ * which a later tool does not have yet. Defaults to the lockfile on disk.
30
+ */
31
+ managedFrom?: Lockfile;
15
32
  /** Callback for progress updates. */
16
33
  onProgress?: (message: string) => void;
17
34
  /** Pin the asset at the installed version. */
@@ -27,6 +44,15 @@ export interface InstallOptions {
27
44
  skipUnsupported?: boolean;
28
45
  }
29
46
  export interface InstallResult {
47
+ /**
48
+ * The memory-template block the install wrote into `file` (relative, like `configFilesCreated`),
49
+ * the block of that name it `replaced`, and whether it `created` the file; a rollback undoes it.
50
+ */
51
+ blockWritten?: {
52
+ created: boolean;
53
+ file: string;
54
+ replaced?: string;
55
+ };
30
56
  bundleOrigin?: {
31
57
  name: string;
32
58
  org?: string;
@@ -38,6 +64,10 @@ export interface InstallResult {
38
64
  file: string;
39
65
  key: string;
40
66
  }>;
67
+ /** The config files the install created, relative like `configEntriesCreated[].file`; a rollback deletes them once empty. */
68
+ configFilesCreated?: string[];
69
+ /** The names the install added to its placement's enabled list (e.g. `enabledMcpjsonServers`). */
70
+ enabledListAdded?: string[];
41
71
  filesPlaced: Array<{
42
72
  destination: string;
43
73
  source: string;
@@ -47,9 +77,51 @@ export interface InstallResult {
47
77
  type: string;
48
78
  version: string;
49
79
  }
80
+ /** The downloaded files of a plan's entries, keyed by {@link planEntryKey}. */
81
+ export type PlanFiles = Map<string, AssetFiles>;
82
+ interface AssetFile {
83
+ /** Raw file bytes — asset files may be binary (images, spreadsheets), never assume text. */
84
+ content: Buffer;
85
+ relativePath: string;
86
+ }
87
+ interface AssetFiles {
88
+ entrypoint?: string;
89
+ files: AssetFile[];
90
+ }
50
91
  export declare class InstallerError extends ApiCodeError {
51
92
  name: string;
52
93
  }
94
+ /**
95
+ * A file the install would place at `path` exists and is not ATK-managed, or belongs to `owner`,
96
+ * another installed asset; nothing was written there. With `entry`, the conflict is that part of
97
+ * the file (a memory-template's block, a config entry), which `owner` wrote.
98
+ */
99
+ export declare class FileConflictError extends InstallerError {
100
+ name: string;
101
+ readonly owner?: AssetIdentity;
102
+ readonly path: string;
103
+ /** What conflicts, quoted for a message: `"<path>"`, or `the <entry> in "<path>"`. */
104
+ readonly where: string;
105
+ constructor(path: string, owner?: AssetIdentity, entry?: string);
106
+ }
107
+ /**
108
+ * An install plan that failed at `asset` with `cause`, after rolling back the
109
+ * `rolledBack` assets it had already installed. Keeps the cause's API code and
110
+ * guidance, so callers that name the asset themselves can quote just the cause.
111
+ */
112
+ export declare class InstallPlanError extends InstallerError {
113
+ readonly asset: Pick<RegistryAsset, 'name' | 'org' | 'type'>;
114
+ readonly cause: unknown;
115
+ /** The plan kept what it installed before `asset`, because it moved an installed asset to another version. */
116
+ readonly keptInstall: boolean;
117
+ name: string;
118
+ constructor(asset: Pick<RegistryAsset, 'name' | 'org' | 'type'>, cause: unknown, rolledBack: number, keptInstall?: boolean);
119
+ }
120
+ /** A plan whose files for `asset` could not be downloaded; nothing was written. */
121
+ export declare class PlanDownloadError extends InstallPlanError {
122
+ name: string;
123
+ constructor(asset: Pick<RegistryAsset, 'name' | 'org' | 'type'>, cause: unknown);
124
+ }
53
125
  /**
54
126
  * Guard for multi-tool installs run with `skipUnsupported`. Each tool skips the asset
55
127
  * types it cannot place, which is fine as long as some tool placed something. If every
@@ -62,9 +134,41 @@ export declare function assertInstalledByAnyTool(plan: InstallPlan, toolResults:
62
134
  }>): void;
63
135
  /**
64
136
  * Execute a full install plan — install all assets in order.
65
- * On partial failure, rolls back previously installed assets (deletes placed files,
66
- * reverts config entries, removes lockfile entries) so the system is not left in
67
- * an inconsistent state.
137
+ * On partial failure, deletes the files the failing asset wrote where no file was before placing
138
+ * its files failed, and rolls back the assets the plan added before it (deletes placed files,
139
+ * reverts config entries and memory-template blocks, removes lockfile entries) so the system is not
140
+ * left in an inconsistent state. An asset the tool already had in place keeps what the plan placed,
141
+ * since rolling it back would delete its working copy, and gets its lockfile entry back. When the
142
+ * plan moved such an asset to another version, which may need the assets the plan added, nothing is
143
+ * rolled back ({@link InstallPlanError.keptInstall}).
68
144
  */
69
145
  export declare function executeInstallPlan(plan: InstallPlan, options: InstallOptions): Promise<InstallResult[]>;
146
+ /**
147
+ * Download the files of every plan entry this tool can place, without writing anything. A
148
+ * caller that replaces an installed asset downloads first, so a refused download leaves the
149
+ * installed version in place, then passes the result to {@link executeInstallPlan} as `files`.
150
+ */
151
+ export declare function fetchPlanFiles(plan: InstallPlan, adapter: Adapter): Promise<PlanFiles>;
152
+ /**
153
+ * The message of an install failure for `asset`, for a caller whose own message already names
154
+ * it: a plan that failed at that asset gives just its cause; one that failed at another asset
155
+ * keeps the installer's message, which names that asset.
156
+ */
157
+ export declare function installFailureMessage(error: unknown, asset: Pick<RegistryAsset, 'name' | 'org' | 'type'>): string;
158
+ /** The entries of `plan` the adapter's tool has a placement for, in plan order. */
159
+ export declare function placeableEntries(plan: InstallPlan, adapter: Adapter): InstallPlanEntry[];
160
+ /**
161
+ * Undo the installs of `installed` for the adapter's tool, in reverse order (best-effort): delete
162
+ * their placed files, revert their config entries (deleting a config file they created once it is
163
+ * empty), put back the memory-template block they replaced or take out the one they added (deleting
164
+ * a file they created once it is empty), take the names they added out of an enabled list, and give
165
+ * each asset its lockfile entry from `before`, or remove it. A file or config entry an asset of
166
+ * `before` also owns is kept.
167
+ * Returns `lockfile` with the entries reverted, as written.
168
+ */
169
+ export declare function rollBackInstalledAssets(installed: Array<{
170
+ asset: Pick<RegistryAsset, 'name' | 'org' | 'type'>;
171
+ result: InstallResult;
172
+ }>, before: Lockfile, lockfile: Lockfile, options: Pick<InstallOptions, 'adapter' | 'onProgress' | 'projectDir'>): Promise<Lockfile>;
173
+ export {};
70
174
  //# sourceMappingURL=installer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"installer.d.ts","sourceRoot":"","sources":["../../src/lib/installer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAoB,MAAM,eAAe,CAAC;AACnE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAiBpD,OAAO,EAAE,YAAY,EAAiB,MAAM,aAAa,CAAC;AAS1D,MAAM,WAAW,cAAc;IAC7B,mCAAmC;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,kEAAkE;IAClE,YAAY,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/D,yEAAyE;IACzE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,qCAAqC;IACrC,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,8CAA8C;IAC9C,G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