@g3nomaly/core 0.2.0 → 0.3.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 +3 -0
- package/package.json +3 -60
- package/LICENSE +0 -95
- package/dist/cli/commands/add.d.ts +0 -17
- package/dist/cli/commands/add.d.ts.map +0 -1
- package/dist/cli/commands/add.js +0 -76
- package/dist/cli/commands/add.js.map +0 -1
- package/dist/cli/commands/ls.d.ts +0 -5
- package/dist/cli/commands/ls.d.ts.map +0 -1
- package/dist/cli/commands/ls.js +0 -22
- package/dist/cli/commands/ls.js.map +0 -1
- package/dist/cli/commands/remove.d.ts +0 -13
- package/dist/cli/commands/remove.d.ts.map +0 -1
- package/dist/cli/commands/remove.js +0 -109
- package/dist/cli/commands/remove.js.map +0 -1
- package/dist/cli/commands/update.d.ts +0 -10
- package/dist/cli/commands/update.d.ts.map +0 -1
- package/dist/cli/commands/update.js +0 -92
- package/dist/cli/commands/update.js.map +0 -1
- package/dist/cli/dialogue.d.ts +0 -74
- package/dist/cli/dialogue.d.ts.map +0 -1
- package/dist/cli/dialogue.js +0 -117
- package/dist/cli/dialogue.js.map +0 -1
- package/dist/cli/index.d.ts +0 -10
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js +0 -10
- package/dist/cli/index.js.map +0 -1
- package/dist/cli/theme.d.ts +0 -23
- package/dist/cli/theme.d.ts.map +0 -1
- package/dist/cli/theme.js +0 -25
- package/dist/cli/theme.js.map +0 -1
- package/dist/cli/types.d.ts +0 -45
- package/dist/cli/types.d.ts.map +0 -1
- package/dist/cli/types.js +0 -2
- package/dist/cli/types.js.map +0 -1
- package/dist/config/config.d.ts +0 -30
- package/dist/config/config.d.ts.map +0 -1
- package/dist/config/config.js +0 -77
- package/dist/config/config.js.map +0 -1
- package/dist/config/index.d.ts +0 -4
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/index.js +0 -3
- package/dist/config/index.js.map +0 -1
- package/dist/config/types.d.ts +0 -140
- package/dist/config/types.d.ts.map +0 -1
- package/dist/config/types.js +0 -63
- package/dist/config/types.js.map +0 -1
- package/dist/hash/hash.d.ts +0 -25
- package/dist/hash/hash.d.ts.map +0 -1
- package/dist/hash/hash.js +0 -44
- package/dist/hash/hash.js.map +0 -1
- package/dist/hash/index.d.ts +0 -2
- package/dist/hash/index.d.ts.map +0 -1
- package/dist/hash/index.js +0 -2
- package/dist/hash/index.js.map +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -2
- package/dist/index.js.map +0 -1
- package/dist/installer/classify.d.ts +0 -7
- package/dist/installer/classify.d.ts.map +0 -1
- package/dist/installer/classify.js +0 -47
- package/dist/installer/classify.js.map +0 -1
- package/dist/installer/index.d.ts +0 -6
- package/dist/installer/index.d.ts.map +0 -1
- package/dist/installer/index.js +0 -7
- package/dist/installer/index.js.map +0 -1
- package/dist/installer/install.d.ts +0 -13
- package/dist/installer/install.d.ts.map +0 -1
- package/dist/installer/install.js +0 -61
- package/dist/installer/install.js.map +0 -1
- package/dist/installer/io.d.ts +0 -4
- package/dist/installer/io.d.ts.map +0 -1
- package/dist/installer/io.js +0 -18
- package/dist/installer/io.js.map +0 -1
- package/dist/installer/remove.d.ts +0 -14
- package/dist/installer/remove.d.ts.map +0 -1
- package/dist/installer/remove.js +0 -37
- package/dist/installer/remove.js.map +0 -1
- package/dist/installer/types.d.ts +0 -80
- package/dist/installer/types.d.ts.map +0 -1
- package/dist/installer/types.js +0 -21
- package/dist/installer/types.js.map +0 -1
- package/dist/registry/index.d.ts +0 -12
- package/dist/registry/index.d.ts.map +0 -1
- package/dist/registry/index.js +0 -12
- package/dist/registry/index.js.map +0 -1
- package/dist/registry/registry.handlers.d.ts +0 -9
- package/dist/registry/registry.handlers.d.ts.map +0 -1
- package/dist/registry/registry.handlers.js +0 -13
- package/dist/registry/registry.handlers.js.map +0 -1
- package/dist/registry/registry.io.d.ts +0 -22
- package/dist/registry/registry.io.d.ts.map +0 -1
- package/dist/registry/registry.io.js +0 -78
- package/dist/registry/registry.io.js.map +0 -1
- package/dist/registry/registry.mutations.d.ts +0 -12
- package/dist/registry/registry.mutations.d.ts.map +0 -1
- package/dist/registry/registry.mutations.js +0 -22
- package/dist/registry/registry.mutations.js.map +0 -1
- package/dist/registry/registry.selectors.d.ts +0 -38
- package/dist/registry/registry.selectors.d.ts.map +0 -1
- package/dist/registry/registry.selectors.js +0 -61
- package/dist/registry/registry.selectors.js.map +0 -1
- package/dist/registry/registry.store.d.ts +0 -34
- package/dist/registry/registry.store.d.ts.map +0 -1
- package/dist/registry/registry.store.js +0 -27
- package/dist/registry/registry.store.js.map +0 -1
- package/dist/registry/registry.template.d.ts +0 -23
- package/dist/registry/registry.template.d.ts.map +0 -1
- package/dist/registry/registry.template.js +0 -63
- package/dist/registry/registry.template.js.map +0 -1
- package/dist/registry/types.d.ts +0 -33
- package/dist/registry/types.d.ts.map +0 -1
- package/dist/registry/types.js +0 -25
- package/dist/registry/types.js.map +0 -1
- package/dist/security/index.d.ts +0 -2
- package/dist/security/index.d.ts.map +0 -1
- package/dist/security/index.js +0 -2
- package/dist/security/index.js.map +0 -1
- package/dist/security/securityParser.d.ts +0 -14
- package/dist/security/securityParser.d.ts.map +0 -1
- package/dist/security/securityParser.js +0 -89
- package/dist/security/securityParser.js.map +0 -1
- package/dist/security/securityWorker.d.ts +0 -8
- package/dist/security/securityWorker.d.ts.map +0 -1
- package/dist/security/securityWorker.js +0 -158
- package/dist/security/securityWorker.js.map +0 -1
- package/dist/utils/index.d.ts +0 -6
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js +0 -6
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/merge.d.ts +0 -6
- package/dist/utils/merge.d.ts.map +0 -1
- package/dist/utils/merge.js +0 -21
- package/dist/utils/merge.js.map +0 -1
- package/dist/utils/packageMeta.d.ts +0 -12
- package/dist/utils/packageMeta.d.ts.map +0 -1
- package/dist/utils/packageMeta.js +0 -20
- package/dist/utils/packageMeta.js.map +0 -1
- package/dist/utils/paths.d.ts +0 -16
- package/dist/utils/paths.d.ts.map +0 -1
- package/dist/utils/paths.js +0 -40
- package/dist/utils/paths.js.map +0 -1
- package/dist/utils/prompt.d.ts +0 -3
- package/dist/utils/prompt.d.ts.map +0 -1
- package/dist/utils/prompt.js +0 -8
- package/dist/utils/prompt.js.map +0 -1
- package/dist/utils/version.d.ts +0 -9
- package/dist/utils/version.d.ts.map +0 -1
- package/dist/utils/version.js +0 -103
- package/dist/utils/version.js.map +0 -1
package/README.md
ADDED
package/package.json
CHANGED
|
@@ -1,63 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@g3nomaly/core",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
6
|
-
"main": "./dist/index.js",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": {
|
|
9
|
-
"types": "./dist/index.d.ts",
|
|
10
|
-
"default": "./dist/index.js"
|
|
11
|
-
},
|
|
12
|
-
"./hash": {
|
|
13
|
-
"types": "./dist/hash/index.d.ts",
|
|
14
|
-
"default": "./dist/hash/index.js"
|
|
15
|
-
},
|
|
16
|
-
"./registry": {
|
|
17
|
-
"types": "./dist/registry/index.d.ts",
|
|
18
|
-
"default": "./dist/registry/index.js"
|
|
19
|
-
},
|
|
20
|
-
"./security": {
|
|
21
|
-
"types": "./dist/security/index.d.ts",
|
|
22
|
-
"default": "./dist/security/index.js"
|
|
23
|
-
},
|
|
24
|
-
"./config": {
|
|
25
|
-
"types": "./dist/config/index.d.ts",
|
|
26
|
-
"default": "./dist/config/index.js"
|
|
27
|
-
},
|
|
28
|
-
"./installer": {
|
|
29
|
-
"types": "./dist/installer/index.d.ts",
|
|
30
|
-
"default": "./dist/installer/index.js"
|
|
31
|
-
},
|
|
32
|
-
"./cli": {
|
|
33
|
-
"types": "./dist/cli/index.d.ts",
|
|
34
|
-
"default": "./dist/cli/index.js"
|
|
35
|
-
},
|
|
36
|
-
"./utils": {
|
|
37
|
-
"types": "./dist/utils/index.d.ts",
|
|
38
|
-
"default": "./dist/utils/index.js"
|
|
39
|
-
},
|
|
40
|
-
"./package.json": "./package.json"
|
|
41
|
-
},
|
|
42
|
-
"files": [
|
|
43
|
-
"dist"
|
|
44
|
-
],
|
|
45
|
-
"scripts": {
|
|
46
|
-
"build": "rm -rf dist && tsc --project tsconfig.build.json",
|
|
47
|
-
"typecheck": "tsc --noEmit"
|
|
48
|
-
},
|
|
49
|
-
"dependencies": {
|
|
50
|
-
"@clack/prompts": "^1.7.0",
|
|
51
|
-
"@tanstack/store": "^0.11.1",
|
|
52
|
-
"chalk": "^6.0.0",
|
|
53
|
-
"zod": "^4.4.3"
|
|
54
|
-
},
|
|
55
|
-
"devDependencies": {
|
|
56
|
-
"@types/bun": "^1.4.0",
|
|
57
|
-
"typescript": "~7.0.2"
|
|
58
|
-
},
|
|
59
|
-
"license": "Elastic-2.0",
|
|
60
|
-
"publishConfig": {
|
|
61
|
-
"access": "public"
|
|
62
|
-
}
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Placeholder. This package name is reserved; no functional release is currently published.",
|
|
5
|
+
"license": "MIT"
|
|
63
6
|
}
|
package/LICENSE
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
Copyright (c) 2026 G3NTs - G3nomaly
|
|
2
|
-
|
|
3
|
-
Elastic License 2.0
|
|
4
|
-
|
|
5
|
-
URL: https://www.elastic.co/licensing/elastic-license
|
|
6
|
-
|
|
7
|
-
## Acceptance
|
|
8
|
-
|
|
9
|
-
By using the software, you agree to all of the terms and conditions below.
|
|
10
|
-
|
|
11
|
-
## Copyright License
|
|
12
|
-
|
|
13
|
-
The licensor grants you a non-exclusive, royalty-free, worldwide,
|
|
14
|
-
non-sublicensable, non-transferable license to use, copy, distribute, make
|
|
15
|
-
available, and prepare derivative works of the software, in each case subject to
|
|
16
|
-
the limitations and conditions below.
|
|
17
|
-
|
|
18
|
-
## Limitations
|
|
19
|
-
|
|
20
|
-
You may not provide the software to third parties as a hosted or managed
|
|
21
|
-
service, where the service provides users with access to any substantial set of
|
|
22
|
-
the features or functionality of the software.
|
|
23
|
-
|
|
24
|
-
You may not move, change, disable, or circumvent the license key functionality
|
|
25
|
-
in the software, and you may not remove or obscure any functionality in the
|
|
26
|
-
software that is protected by the license key.
|
|
27
|
-
|
|
28
|
-
You may not alter, remove, or obscure any licensing, copyright, or other notices
|
|
29
|
-
of the licensor in the software. Any use of the licensor’s trademarks is subject
|
|
30
|
-
to applicable law.
|
|
31
|
-
|
|
32
|
-
## Patents
|
|
33
|
-
|
|
34
|
-
The licensor grants you a license, under any patent claims the licensor can
|
|
35
|
-
license, or becomes able to license, to make, have made, use, sell, offer for
|
|
36
|
-
sale, import and have imported the software, in each case subject to the
|
|
37
|
-
limitations and conditions in this license. This license does not cover any
|
|
38
|
-
patent claims that you cause to be infringed by modifications or additions to
|
|
39
|
-
the software. If you or your company make any written claim that the software
|
|
40
|
-
infringes or contributes to infringement of any patent, your patent license for
|
|
41
|
-
the software granted under these terms ends immediately. If your company makes
|
|
42
|
-
such a claim, your patent license ends immediately for work on behalf of your
|
|
43
|
-
company.
|
|
44
|
-
|
|
45
|
-
## Notices
|
|
46
|
-
|
|
47
|
-
You must ensure that anyone who gets a copy of any part of the software from you
|
|
48
|
-
also gets a copy of these terms.
|
|
49
|
-
|
|
50
|
-
If you modify the software, you must include in any modified copies of the
|
|
51
|
-
software prominent notices stating that you have modified the software.
|
|
52
|
-
|
|
53
|
-
## No Other Rights
|
|
54
|
-
|
|
55
|
-
These terms do not imply any licenses other than those expressly granted in
|
|
56
|
-
these terms.
|
|
57
|
-
|
|
58
|
-
## Termination
|
|
59
|
-
|
|
60
|
-
If you use the software in violation of these terms, such use is not licensed,
|
|
61
|
-
and your licenses will automatically terminate. If the licensor provides you
|
|
62
|
-
with a notice of your violation, and you cease all violation of this license no
|
|
63
|
-
later than 30 days after you receive that notice, your licenses will be
|
|
64
|
-
reinstated retroactively. However, if you violate these terms after such
|
|
65
|
-
reinstatement, any additional violation of these terms will cause your licenses
|
|
66
|
-
to terminate automatically and permanently.
|
|
67
|
-
|
|
68
|
-
## No Liability
|
|
69
|
-
|
|
70
|
-
*As far as the law allows, the software comes as is, without any warranty or
|
|
71
|
-
condition, and the licensor will not be liable to you for any damages arising
|
|
72
|
-
out of these terms or the use or nature of the software, under any kind of
|
|
73
|
-
legal claim.*
|
|
74
|
-
|
|
75
|
-
## Definitions
|
|
76
|
-
|
|
77
|
-
The **licensor** is the entity offering these terms, and the **software** is the
|
|
78
|
-
software the licensor makes available under these terms, including any portion
|
|
79
|
-
of it.
|
|
80
|
-
|
|
81
|
-
**you** refers to the individual or entity agreeing to these terms.
|
|
82
|
-
|
|
83
|
-
**your company** is any legal entity, sole proprietorship, or other kind of
|
|
84
|
-
organization that you work for, plus all organizations that have control over,
|
|
85
|
-
are under the control of, or are under common control with that
|
|
86
|
-
organization. **control** means ownership of substantially all the assets of an
|
|
87
|
-
entity, or the power to direct its management and policies by vote, contract, or
|
|
88
|
-
otherwise. Control can be direct or indirect.
|
|
89
|
-
|
|
90
|
-
**your licenses** are all the licenses granted to you for the software under
|
|
91
|
-
these terms.
|
|
92
|
-
|
|
93
|
-
**use** means anything you do with the software requiring one of your licenses.
|
|
94
|
-
|
|
95
|
-
**trademark** means trademarks, service marks, and similar rights.
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { BaseFileEntry, BaseRegistry } from "../../registry/types";
|
|
2
|
-
import type { FileSource, InstallerIO } from "../../installer/types";
|
|
3
|
-
import type { AddDialogues, EntrySource, InstallOptions, InstallTarget } from "../types";
|
|
4
|
-
/** Hash of the package's current version of a file, derived from its content. */
|
|
5
|
-
export declare function latestHashFrom(source: FileSource, io: InstallerIO): (file: BaseFileEntry) => Promise<string>;
|
|
6
|
-
export declare function pickerChoices(registry: BaseRegistry): {
|
|
7
|
-
value: string;
|
|
8
|
-
label: string;
|
|
9
|
-
}[];
|
|
10
|
-
/**
|
|
11
|
-
* Installs entries into every target, keeping locally modified files. With no
|
|
12
|
-
* keys and an `onNoValue` dialogue the user picks from the registry. Local
|
|
13
|
-
* changes prompt keep/overwrite through `onCollision` unless `--force`.
|
|
14
|
-
* The caller resolves keys before and saves each target's store after.
|
|
15
|
-
*/
|
|
16
|
-
export declare function addEntries(registry: BaseRegistry, targets: InstallTarget[], source: EntrySource, keys: string[], options?: InstallOptions, dialogues?: AddDialogues): Promise<void>;
|
|
17
|
-
//# sourceMappingURL=add.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/add.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAIxE,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIrE,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAKzF,iFAAiF;AACjF,wBAAgB,cAAc,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE,EAAE,WAAW,GAAG,CAAC,IAAI,EAAE,aAAa,KAAK,OAAO,CAAC,MAAM,CAAC,CAM5G;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,YAAY,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,CAKxF;AAED;;;;;GAKG;AACH,wBAAsB,UAAU,CAC9B,QAAQ,EAAE,YAAY,EACtB,OAAO,EAAE,aAAa,EAAE,EACxB,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,GAAE,cAAmB,EAC5B,SAAS,GAAE,YAAiB,GAC3B,OAAO,CAAC,IAAI,CAAC,CA4Cf"}
|
package/dist/cli/commands/add.js
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
// packages/core/src/cli/commands/add.ts
|
|
2
|
-
import chalk from "chalk";
|
|
3
|
-
import { z } from "zod";
|
|
4
|
-
import { get } from "../../registry/registry.selectors";
|
|
5
|
-
import { register } from "../../registry/registry.mutations";
|
|
6
|
-
import { applyClassifications, classifyFiles, recordedHashes } from "../../installer";
|
|
7
|
-
import { createInstallerIO } from "../../installer/io";
|
|
8
|
-
import { ConflictDecision, FileState } from "../../installer/types";
|
|
9
|
-
import { hashString } from "../../hash/hash";
|
|
10
|
-
import { guardCancel } from "../../utils/prompt";
|
|
11
|
-
import { runDialogueValue } from "../dialogue";
|
|
12
|
-
import { c, lineSuccess, lineWarn, lineInfo } from "../theme";
|
|
13
|
-
const KeysSchema = z.array(z.string());
|
|
14
|
-
/** Hash of the package's current version of a file, derived from its content. */
|
|
15
|
-
export function latestHashFrom(source, io) {
|
|
16
|
-
return async (file) => {
|
|
17
|
-
const content = await source(file);
|
|
18
|
-
if (content === null)
|
|
19
|
-
return "";
|
|
20
|
-
return content.kind === "copy" ? io.hashFile(content.sourcePath) : hashString(content.content);
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
export function pickerChoices(registry) {
|
|
24
|
-
return Object.entries(registry).map(([key, meta]) => ({
|
|
25
|
-
value: key,
|
|
26
|
-
label: `${c.key(key)} ${chalk.dim("—")} ${chalk.dim(meta.description ?? meta.name)}`,
|
|
27
|
-
}));
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Installs entries into every target, keeping locally modified files. With no
|
|
31
|
-
* keys and an `onNoValue` dialogue the user picks from the registry. Local
|
|
32
|
-
* changes prompt keep/overwrite through `onCollision` unless `--force`.
|
|
33
|
-
* The caller resolves keys before and saves each target's store after.
|
|
34
|
-
*/
|
|
35
|
-
export async function addEntries(registry, targets, source, keys, options = {}, dialogues = {}) {
|
|
36
|
-
const io = createInstallerIO();
|
|
37
|
-
if (keys.length === 0 && dialogues.onNoValue !== undefined) {
|
|
38
|
-
const picked = guardCancel(await runDialogueValue(dialogues.onNoValue, { keyChoices: pickerChoices(registry) }, options.answers));
|
|
39
|
-
keys = KeysSchema.parse(picked ?? []);
|
|
40
|
-
}
|
|
41
|
-
for (const target of targets) {
|
|
42
|
-
if (targets.length > 1)
|
|
43
|
-
console.log(c.header(target.label));
|
|
44
|
-
for (const key of keys) {
|
|
45
|
-
const meta = registry[key];
|
|
46
|
-
if (!meta)
|
|
47
|
-
continue;
|
|
48
|
-
const fileSource = await source(meta);
|
|
49
|
-
const classifications = await classifyFiles(meta.files, target.installDir, recordedHashes(get(target.store, key)), io, latestHashFrom(fileSource, io));
|
|
50
|
-
let decision = ConflictDecision.Keep;
|
|
51
|
-
const hasLocalChanges = classifications.some((cl) => cl.state >= FileState.UserOnly);
|
|
52
|
-
if (hasLocalChanges && !options.force && dialogues.onCollision !== undefined) {
|
|
53
|
-
const answer = await runDialogueValue(dialogues.onCollision, { key: c.key(key), target: c.target(target.label) }, options.answers);
|
|
54
|
-
if (answer === ConflictDecision.Overwrite)
|
|
55
|
-
decision = ConflictDecision.Overwrite;
|
|
56
|
-
}
|
|
57
|
-
const result = await applyClassifications(classifications, fileSource, { decision, force: options.force ?? false }, io);
|
|
58
|
-
for (const file of result.missingSource) {
|
|
59
|
-
console.log(lineWarn(`No content for ${c.file(file)} in the package source — skipped`));
|
|
60
|
-
}
|
|
61
|
-
for (const file of result.kept) {
|
|
62
|
-
console.log(lineWarn(`${c.file(file)} has local changes — kept ${chalk.dim(`(use ${c.flag("-f")} to overwrite)`)}`));
|
|
63
|
-
}
|
|
64
|
-
if (result.written.length > 0) {
|
|
65
|
-
console.log(lineSuccess(`Installed ${c.key(key)} ${chalk.dim(`(${result.written.length} file${result.written.length === 1 ? "" : "s"})`)}`));
|
|
66
|
-
}
|
|
67
|
-
else if (result.kept.length === 0) {
|
|
68
|
-
console.log(lineInfo(`${c.key(key)} — already up to date`));
|
|
69
|
-
}
|
|
70
|
-
// Always record the on-disk state — its hashes are the baseline that
|
|
71
|
-
// lets later runs tell user edits from package changes.
|
|
72
|
-
register(target.store, key, { ...meta, files: result.files.map((f) => ({ ...f, version: meta.version })) });
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
//# sourceMappingURL=add.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add.js","sourceRoot":"","sources":["../../../src/cli/commands/add.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAE7D,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtF,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,EAAE,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAE9D,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;AAEvC,iFAAiF;AACjF,MAAM,UAAU,cAAc,CAAC,MAAkB,EAAE,EAAe;IAChE,OAAO,KAAK,EAAE,IAAI,EAAE,EAAE;QACpB,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,OAAO,KAAK,IAAI;YAAE,OAAO,EAAE,C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M,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QAC9G,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { BaseRegistry } from "../../registry/types";
|
|
2
|
-
import type { LSOptions } from "../types";
|
|
3
|
-
/** Lists the entries of a registry, grouped by each entry's `group`. */
|
|
4
|
-
export declare function lsEntries(registry: BaseRegistry, options?: LSOptions): void;
|
|
5
|
-
//# sourceMappingURL=ls.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ls.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/ls.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAG1C,wEAAwE;AACxE,wBAAgB,SAAS,CAAC,QAAQ,EAAE,YAAY,EAAE,OAAO,GAAE,SAAc,GAAG,IAAI,CAiB/E"}
|
package/dist/cli/commands/ls.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// packages/core/src/cli/commands/ls.ts
|
|
2
|
-
import chalk from "chalk";
|
|
3
|
-
import { c } from "../theme";
|
|
4
|
-
/** Lists the entries of a registry, grouped by each entry's `group`. */
|
|
5
|
-
export function lsEntries(registry, options = {}) {
|
|
6
|
-
if (options.json === true) {
|
|
7
|
-
console.log(JSON.stringify(registry, null, 2));
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
const byGroup = {};
|
|
11
|
-
for (const [key, meta] of Object.entries(registry))
|
|
12
|
-
(byGroup[meta.group ?? "default"] ??= []).push(key);
|
|
13
|
-
for (const group of Object.keys(byGroup).sort()) {
|
|
14
|
-
console.log(c.header(group));
|
|
15
|
-
for (const key of (byGroup[group] ?? []).sort()) {
|
|
16
|
-
const meta = registry[key];
|
|
17
|
-
console.log(` ${c.key(key.padEnd(26))} ${chalk.dim(meta?.description ?? "")}`);
|
|
18
|
-
}
|
|
19
|
-
console.log();
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=ls.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ls.js","sourceRoot":"","sources":["../../../src/cli/commands/ls.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAE7B,wEAAwE;AACxE,MAAM,UAAU,SAAS,CAAC,QAAsB,EAAE,OAAO,GAAc,EAAE;IACvE,IAAI,OAAO,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;QAC1B,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAC/C,OAAO;IACT,CAAC;IAED,MAAM,OAAO,GAA6B,EAAE,CAAC;IAC7C,KAAK,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC;QAAE,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,IAAI,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAExG,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;QAChD,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QAC7B,KAAK,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;YAChD,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;YAC3B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,WAAW,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;QAClF,CAAC;QACD,OAAO,CAAC,GAAG,EAAE,CAAC;IAChB,CAAC;AACH,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { BaseRegistry } from "../../registry/types";
|
|
2
|
-
import type { InstallOptions, InstallTarget, RemoveDialogues } from "../types";
|
|
3
|
-
/**
|
|
4
|
-
* Removes installed entries and drops them from each target's store. With no
|
|
5
|
-
* keys and an `onNoValue` dialogue the user picks from what is installed.
|
|
6
|
-
* Removal is all-or-nothing per entry: local changes prompt keep/remove
|
|
7
|
-
* through `onCollision` (kept entirely without it), and an entry with files
|
|
8
|
-
* missing on disk proceeds only when `onIncomplete` confirms. Installed
|
|
9
|
-
* dependents (via `registryDependencies`) are offered for cascade removal
|
|
10
|
-
* through `onCascade`. The caller saves each target's store after.
|
|
11
|
-
*/
|
|
12
|
-
export declare function removeEntries(registry: BaseRegistry, targets: InstallTarget[], keys: string[], options?: InstallOptions, dialogues?: RemoveDialogues): Promise<void>;
|
|
13
|
-
//# sourceMappingURL=remove.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remove.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/remove.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAqB,MAAM,sBAAsB,CAAC;AAO5E,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AA0B/E;;;;;;;;GAQG;AACH,wBAAsB,aAAa,CACjC,QAAQ,EAAE,YAAY,EACtB,OAAO,EAAE,aAAa,EAAE,EACxB,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,GAAE,cAAmB,EAC5B,SAAS,GAAE,eAAoB,GAC9B,OAAO,CAAC,IAAI,CAAC,CA4Ef"}
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
// packages/core/src/cli/commands/remove.ts
|
|
2
|
-
import chalk from "chalk";
|
|
3
|
-
import path from "node:path";
|
|
4
|
-
import { z } from "zod";
|
|
5
|
-
import { entries as storeEntries, entryDependencies, get } from "../../registry/registry.selectors";
|
|
6
|
-
import { unregister } from "../../registry/registry.mutations";
|
|
7
|
-
import { recordedHashes, removeInstalledFiles } from "../../installer";
|
|
8
|
-
import { createInstallerIO } from "../../installer/io";
|
|
9
|
-
import { ConflictDecision } from "../../installer/types";
|
|
10
|
-
import { guardCancel } from "../../utils/prompt";
|
|
11
|
-
import { runDialogueValue } from "../dialogue";
|
|
12
|
-
import { c, lineSuccess, lineWarn, lineInfo } from "../theme";
|
|
13
|
-
const KeysSchema = z.array(z.string());
|
|
14
|
-
async function diskState(entry, installDir, io) {
|
|
15
|
-
const recorded = recordedHashes(entry);
|
|
16
|
-
const missing = [];
|
|
17
|
-
const modified = [];
|
|
18
|
-
for (const file of entry.files) {
|
|
19
|
-
const destPath = path.join(installDir, file.path);
|
|
20
|
-
if (!io.exists(destPath)) {
|
|
21
|
-
missing.push(file.path);
|
|
22
|
-
continue;
|
|
23
|
-
}
|
|
24
|
-
const recordedHash = recorded[file.path];
|
|
25
|
-
if (recordedHash !== undefined && (await io.hashFile(destPath)) !== recordedHash)
|
|
26
|
-
modified.push(file.path);
|
|
27
|
-
}
|
|
28
|
-
return { missing, modified };
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Removes installed entries and drops them from each target's store. With no
|
|
32
|
-
* keys and an `onNoValue` dialogue the user picks from what is installed.
|
|
33
|
-
* Removal is all-or-nothing per entry: local changes prompt keep/remove
|
|
34
|
-
* through `onCollision` (kept entirely without it), and an entry with files
|
|
35
|
-
* missing on disk proceeds only when `onIncomplete` confirms. Installed
|
|
36
|
-
* dependents (via `registryDependencies`) are offered for cascade removal
|
|
37
|
-
* through `onCascade`. The caller saves each target's store after.
|
|
38
|
-
*/
|
|
39
|
-
export async function removeEntries(registry, targets, keys, options = {}, dialogues = {}) {
|
|
40
|
-
const io = createInstallerIO();
|
|
41
|
-
if (keys.length === 0 && dialogues.onNoValue !== undefined) {
|
|
42
|
-
const installed = [...new Set(targets.flatMap((t) => Object.keys(storeEntries(t.store))))].sort();
|
|
43
|
-
if (installed.length === 0) {
|
|
44
|
-
console.log(lineInfo("Nothing installed."));
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
const choices = installed.map((key) => ({ value: key, label: c.key(key) }));
|
|
48
|
-
const picked = guardCancel(await runDialogueValue(dialogues.onNoValue, { keyChoices: choices }, options.answers));
|
|
49
|
-
keys = KeysSchema.parse(picked ?? []);
|
|
50
|
-
}
|
|
51
|
-
for (const target of targets) {
|
|
52
|
-
if (targets.length > 1)
|
|
53
|
-
console.log(c.header(target.label));
|
|
54
|
-
const targetKeys = Object.keys(storeEntries(target.store));
|
|
55
|
-
// Mutable queue so cascade confirmations can append dependents mid-loop.
|
|
56
|
-
const queue = [...keys];
|
|
57
|
-
let i = 0;
|
|
58
|
-
while (i < queue.length) {
|
|
59
|
-
const key = queue[i++];
|
|
60
|
-
const installed = get(target.store, key);
|
|
61
|
-
if (!installed) {
|
|
62
|
-
console.log(lineInfo(`${c.key(key)} — not installed`));
|
|
63
|
-
continue;
|
|
64
|
-
}
|
|
65
|
-
const dependents = entryDependencies(key, registry, targetKeys).filter((d) => !queue.includes(d));
|
|
66
|
-
if (dependents.length > 0) {
|
|
67
|
-
console.log(lineWarn(`${dependents.map((d) => c.key(d)).join(", ")} depend${dependents.length === 1 ? "s" : ""} on ${c.key(key)}.`));
|
|
68
|
-
if (dialogues.onCascade !== undefined) {
|
|
69
|
-
const also = await runDialogueValue(dialogues.onCascade, { key: c.key(key), dependents: dependents.map((d) => c.key(d)).join(", ") }, options.answers);
|
|
70
|
-
if (also === true)
|
|
71
|
-
queue.push(...dependents);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
const state = await diskState(installed, target.installDir, io);
|
|
75
|
-
if (state.missing.length > 0 && dialogues.onIncomplete !== undefined) {
|
|
76
|
-
console.log(lineWarn(`${c.key(key)} is incomplete on disk — missing ${state.missing.map((f) => c.file(f)).join(", ")}`));
|
|
77
|
-
const proceed = await runDialogueValue(dialogues.onIncomplete, { key: c.key(key), target: c.target(target.label), missing: state.missing.map((f) => c.file(f)).join(", ") }, options.answers);
|
|
78
|
-
if (proceed !== true) {
|
|
79
|
-
console.log(lineInfo(`${c.key(key)} — skipped`));
|
|
80
|
-
continue;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
let force = options.force ?? false;
|
|
84
|
-
if (state.modified.length > 0 && !force) {
|
|
85
|
-
console.log(lineWarn(`${c.key(key)} has local changes in ${state.modified.map((f) => c.file(f)).join(", ")}`));
|
|
86
|
-
if (dialogues.onCollision !== undefined) {
|
|
87
|
-
const answer = await runDialogueValue(dialogues.onCollision, { key: c.key(key), target: c.target(target.label) }, options.answers);
|
|
88
|
-
if (answer === ConflictDecision.Overwrite)
|
|
89
|
-
force = true;
|
|
90
|
-
}
|
|
91
|
-
if (!force) {
|
|
92
|
-
console.log(lineInfo(`${c.key(key)} — kept ${chalk.dim(`(use ${c.flag("-f")} to remove)`)}`));
|
|
93
|
-
continue;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
const result = await removeInstalledFiles(installed.files, target.installDir, { force }, io);
|
|
97
|
-
if (result.removed.length > 0) {
|
|
98
|
-
console.log(lineSuccess(`Removed ${c.key(key)} ${chalk.dim(`(${result.removed.length} file${result.removed.length === 1 ? "" : "s"})`)}`));
|
|
99
|
-
}
|
|
100
|
-
if (result.kept.length === 0) {
|
|
101
|
-
unregister(target.store, key);
|
|
102
|
-
}
|
|
103
|
-
else {
|
|
104
|
-
console.log(lineInfo(`${c.key(key)} kept in manifest (some files were kept)`));
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
//# sourceMappingURL=remove.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remove.js","sourceRoot":"","sources":["../../../src/cli/commands/remove.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AACpG,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE/D,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,EAAE,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAE9D,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;AAOvC,KAAK,UAAU,SAAS,CAAC,KAAwB,EAAE,UAAkB,EAAE,EAAe;IACpF,MAAM,QAAQ,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IACvC,MAAM,OAAO,GAAc,EAAE,CAAC;IAC9B,MAAM,QAAQ,GAAa,EAAE,CAAC;IAC9B,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;QAC/B,MAAM,QAAQ,GAAG,IAAI,CAAC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,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,0CAA0C,CAAC,CAAC,CAAC;YACjF,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { BaseRegistry } from "../../registry/types";
|
|
2
|
-
import type { EntrySource, InstallOptions, InstallTarget, UpdateDialogues } from "../types";
|
|
3
|
-
/**
|
|
4
|
-
* Re-installs entries already present in a target's manifest; with no keys
|
|
5
|
-
* everything installed is updated. Local changes prompt keep/overwrite
|
|
6
|
-
* through `onCollision` unless `--force`. The caller resolves keys before
|
|
7
|
-
* and saves each target's store after.
|
|
8
|
-
*/
|
|
9
|
-
export declare function updateEntries(registry: BaseRegistry, targets: InstallTarget[], source: EntrySource, keys: string[], options?: InstallOptions, dialogues?: UpdateDialogues): Promise<void>;
|
|
10
|
-
//# sourceMappingURL=update.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/update.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAMzD,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAkB5F;;;;;GAKG;AACH,wBAAsB,aAAa,CACjC,QAAQ,EAAE,YAAY,EACtB,OAAO,EAAE,aAAa,EAAE,EACxB,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,GAAE,cAAmB,EAC5B,SAAS,GAAE,eAAoB,GAC9B,OAAO,CAAC,IAAI,CAAC,CAoEf"}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
// packages/core/src/cli/commands/update.ts
|
|
2
|
-
import chalk from "chalk";
|
|
3
|
-
import path from "node:path";
|
|
4
|
-
import { entries as storeEntries, get } from "../../registry/registry.selectors";
|
|
5
|
-
import { register } from "../../registry/registry.mutations";
|
|
6
|
-
import { applyClassifications, classifyFiles, recordedHashes, removeInstalledFiles } from "../../installer";
|
|
7
|
-
import { createInstallerIO } from "../../installer/io";
|
|
8
|
-
import { ConflictDecision, FileState } from "../../installer/types";
|
|
9
|
-
import { runDialogueValue } from "../dialogue";
|
|
10
|
-
import { c, lineSuccess, lineWarn, lineInfo } from "../theme";
|
|
11
|
-
import { latestHashFrom } from "./add";
|
|
12
|
-
const DRY_RUN_LABELS = {
|
|
13
|
-
[FileState.UpToDate]: chalk.dim("up to date"),
|
|
14
|
-
[FileState.SafeUpdate]: chalk.cyan("would update") + chalk.dim(" (package changed, file unmodified)"),
|
|
15
|
-
[FileState.UserOnly]: chalk.yellow("would keep") + chalk.dim(" — local changes"),
|
|
16
|
-
[FileState.Conflict]: chalk.red("conflict") + chalk.dim(" — keep or overwrite"),
|
|
17
|
-
};
|
|
18
|
-
function printDryRun(classifications) {
|
|
19
|
-
for (const cl of classifications) {
|
|
20
|
-
const rel = c.file(path.relative(process.cwd(), cl.destPath));
|
|
21
|
-
console.log(` ${rel.padEnd(50)} ${DRY_RUN_LABELS[cl.state]}`);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Re-installs entries already present in a target's manifest; with no keys
|
|
26
|
-
* everything installed is updated. Local changes prompt keep/overwrite
|
|
27
|
-
* through `onCollision` unless `--force`. The caller resolves keys before
|
|
28
|
-
* and saves each target's store after.
|
|
29
|
-
*/
|
|
30
|
-
export async function updateEntries(registry, targets, source, keys, options = {}, dialogues = {}) {
|
|
31
|
-
const io = createInstallerIO();
|
|
32
|
-
for (const target of targets) {
|
|
33
|
-
if (targets.length > 1)
|
|
34
|
-
console.log(c.header(target.label));
|
|
35
|
-
const targetKeys = Object.keys(storeEntries(target.store)).sort();
|
|
36
|
-
const wanted = keys.length > 0 ? targetKeys.filter((k) => keys.includes(k)) : targetKeys;
|
|
37
|
-
if (wanted.length === 0) {
|
|
38
|
-
console.log(lineInfo("Nothing to update."));
|
|
39
|
-
continue;
|
|
40
|
-
}
|
|
41
|
-
for (const key of wanted) {
|
|
42
|
-
const meta = registry[key];
|
|
43
|
-
if (!meta) {
|
|
44
|
-
console.log(lineWarn(`${c.key(key)} is installed but no longer in the package — leaving as is`));
|
|
45
|
-
continue;
|
|
46
|
-
}
|
|
47
|
-
const installed = get(target.store, key);
|
|
48
|
-
const fileSource = await source(meta);
|
|
49
|
-
const classifications = await classifyFiles(meta.files, target.installDir, recordedHashes(installed), io, latestHashFrom(fileSource, io));
|
|
50
|
-
const stale = (installed?.files ?? []).filter((f) => !meta.files.some((m) => m.path === f.path));
|
|
51
|
-
if (options.dryRun) {
|
|
52
|
-
console.log(chalk.bold(c.key(key)));
|
|
53
|
-
printDryRun(classifications);
|
|
54
|
-
for (const file of stale) {
|
|
55
|
-
console.log(` ${c.file(file.path).padEnd(50)} ${chalk.red("would remove")}${chalk.dim(" — no longer in the package")}`);
|
|
56
|
-
}
|
|
57
|
-
continue;
|
|
58
|
-
}
|
|
59
|
-
let decision = ConflictDecision.Keep;
|
|
60
|
-
const hasLocalChanges = classifications.some((cl) => cl.state >= FileState.UserOnly);
|
|
61
|
-
if (hasLocalChanges && !options.force && dialogues.onCollision !== undefined) {
|
|
62
|
-
const answer = await runDialogueValue(dialogues.onCollision, { key: c.key(key), target: c.target(target.label) }, options.answers);
|
|
63
|
-
if (answer === ConflictDecision.Overwrite)
|
|
64
|
-
decision = ConflictDecision.Overwrite;
|
|
65
|
-
}
|
|
66
|
-
const result = await applyClassifications(classifications, fileSource, { decision, force: options.force ?? false }, io);
|
|
67
|
-
if (stale.length > 0) {
|
|
68
|
-
const removal = await removeInstalledFiles(stale, target.installDir, { force: options.force }, io);
|
|
69
|
-
for (const file of removal.kept) {
|
|
70
|
-
console.log(lineWarn(`${c.file(file)} left the package but has local changes — kept ${chalk.dim(`(use ${c.flag("-f")} to remove)`)}`));
|
|
71
|
-
}
|
|
72
|
-
if (removal.removed.length > 0) {
|
|
73
|
-
console.log(lineInfo(`Removed ${removal.removed.length} file${removal.removed.length === 1 ? "" : "s"} no longer in ${c.key(key)}`));
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
for (const file of result.missingSource) {
|
|
77
|
-
console.log(lineWarn(`No content for ${c.file(file)} in the package source — skipped`));
|
|
78
|
-
}
|
|
79
|
-
if (result.kept.length > 0) {
|
|
80
|
-
console.log(lineWarn(`${c.key(key)} — kept ${result.kept.map((f) => c.file(f)).join(", ")}`));
|
|
81
|
-
}
|
|
82
|
-
if (result.written.length > 0) {
|
|
83
|
-
console.log(lineSuccess(`Updated ${c.key(key)} ${chalk.dim(`(${result.written.length} file${result.written.length === 1 ? "" : "s"})`)}`));
|
|
84
|
-
}
|
|
85
|
-
else if (result.kept.length === 0) {
|
|
86
|
-
console.log(lineInfo(`${c.key(key)} — already up to date`));
|
|
87
|
-
}
|
|
88
|
-
register(target.store, key, { ...meta, files: result.files.map((f) => ({ ...f, version: meta.version })) });
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
//# sourceMappingURL=update.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../src/cli/commands/update.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAE7D,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC5G,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEpE,OAAO,EAAE,gB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