@tinyrack/dotweave 0.42.13 → 0.42.21
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 +6 -2
- package/dist/application.d.ts +0 -3
- package/dist/application.d.ts.map +1 -1
- package/dist/application.js +23 -22
- package/dist/application.js.map +1 -1
- package/dist/cli/autocomplete.d.ts +5 -4
- package/dist/cli/autocomplete.d.ts.map +1 -1
- package/dist/cli/autocomplete.js +33 -28
- package/dist/cli/autocomplete.js.map +1 -1
- package/dist/cli/cd.d.ts +2 -2
- package/dist/cli/cd.d.ts.map +1 -1
- package/dist/cli/cd.js +1 -4
- package/dist/cli/cd.js.map +1 -1
- package/dist/cli/doctor.d.ts +2 -2
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +19 -28
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/index.d.ts +1 -3
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +5 -5
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init.d.ts +2 -2
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +9 -15
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/profile/add.d.ts +4 -0
- package/dist/cli/profile/add.d.ts.map +1 -0
- package/dist/cli/profile/add.js +29 -0
- package/dist/cli/profile/add.js.map +1 -0
- package/dist/cli/profile/index.d.ts +1 -1
- package/dist/cli/profile/index.d.ts.map +1 -1
- package/dist/cli/profile/index.js +5 -1
- package/dist/cli/profile/index.js.map +1 -1
- package/dist/cli/profile/list.d.ts +2 -2
- package/dist/cli/profile/list.d.ts.map +1 -1
- package/dist/cli/profile/list.js +8 -26
- package/dist/cli/profile/list.js.map +1 -1
- package/dist/cli/profile/remove.d.ts +4 -0
- package/dist/cli/profile/remove.d.ts.map +1 -0
- package/dist/cli/profile/remove.js +29 -0
- package/dist/cli/profile/remove.js.map +1 -0
- package/dist/cli/profile/use.d.ts +2 -2
- package/dist/cli/profile/use.d.ts.map +1 -1
- package/dist/cli/profile/use.js +5 -14
- package/dist/cli/profile/use.js.map +1 -1
- package/dist/cli/pull.d.ts +2 -2
- package/dist/cli/pull.d.ts.map +1 -1
- package/dist/cli/pull.js +22 -41
- package/dist/cli/pull.js.map +1 -1
- package/dist/cli/push.d.ts +2 -2
- package/dist/cli/push.d.ts.map +1 -1
- package/dist/cli/push.js +17 -23
- package/dist/cli/push.js.map +1 -1
- package/dist/cli/root-commands.d.ts +9 -10
- package/dist/cli/root-commands.d.ts.map +1 -1
- package/dist/cli/root-commands.js +0 -4
- package/dist/cli/root-commands.js.map +1 -1
- package/dist/cli/shared-flags.d.ts +9 -0
- package/dist/cli/shared-flags.d.ts.map +1 -0
- package/dist/cli/shared-flags.js +8 -0
- package/dist/cli/shared-flags.js.map +1 -0
- package/dist/cli/status.d.ts +2 -2
- package/dist/cli/status.d.ts.map +1 -1
- package/dist/cli/status.js +26 -55
- package/dist/cli/status.js.map +1 -1
- package/dist/cli/track.d.ts +2 -2
- package/dist/cli/track.d.ts.map +1 -1
- package/dist/cli/track.js +19 -35
- package/dist/cli/track.js.map +1 -1
- package/dist/cli/untrack.d.ts +2 -2
- package/dist/cli/untrack.d.ts.map +1 -1
- package/dist/cli/untrack.js +5 -14
- package/dist/cli/untrack.js.map +1 -1
- package/dist/config/constants.d.ts +2 -2
- package/dist/config/constants.d.ts.map +1 -1
- package/dist/config/constants.js +2 -2
- package/dist/config/constants.js.map +1 -1
- package/dist/config/global-config.d.ts +3 -3
- package/dist/config/global-config.d.ts.map +1 -1
- package/dist/config/global-config.js +7 -8
- package/dist/config/global-config.js.map +1 -1
- package/dist/config/identity-file.d.ts +0 -7
- package/dist/config/identity-file.d.ts.map +1 -1
- package/dist/config/identity-file.js +2 -44
- package/dist/config/identity-file.js.map +1 -1
- package/dist/config/migration.d.ts +6 -0
- package/dist/config/migration.d.ts.map +1 -1
- package/dist/config/migration.js +35 -13
- package/dist/config/migration.js.map +1 -1
- package/dist/config/runtime-env.d.ts.map +1 -1
- package/dist/config/runtime-env.js +2 -7
- package/dist/config/runtime-env.js.map +1 -1
- package/dist/config/{sync-entry.d.ts → sync-queries.d.ts} +5 -3
- package/dist/config/sync-queries.d.ts.map +1 -0
- package/dist/config/{sync-entry.js → sync-queries.js} +15 -6
- package/dist/config/sync-queries.js.map +1 -0
- package/dist/config/sync-schema.d.ts +13 -8
- package/dist/config/sync-schema.d.ts.map +1 -1
- package/dist/config/sync-schema.js +138 -18
- package/dist/config/sync-schema.js.map +1 -1
- package/dist/config/xdg.d.ts.map +1 -1
- package/dist/config/xdg.js +15 -34
- package/dist/config/xdg.js.map +1 -1
- package/dist/lib/error.js +1 -1
- package/dist/lib/error.js.map +1 -1
- package/dist/lib/git.d.ts +3 -4
- package/dist/lib/git.d.ts.map +1 -1
- package/dist/lib/git.js +7 -48
- package/dist/lib/git.js.map +1 -1
- package/dist/lib/jsonc.d.ts +1 -1
- package/dist/lib/jsonc.d.ts.map +1 -1
- package/dist/lib/jsonc.js +1 -1
- package/dist/lib/jsonc.js.map +1 -1
- package/dist/lib/path.d.ts +3 -16
- package/dist/lib/path.d.ts.map +1 -1
- package/dist/lib/path.js +36 -19
- package/dist/lib/path.js.map +1 -1
- package/dist/lib/string.d.ts +1 -4
- package/dist/lib/string.d.ts.map +1 -1
- package/dist/lib/string.js +6 -4
- package/dist/lib/string.js.map +1 -1
- package/dist/lib/version.d.ts.map +1 -1
- package/dist/lib/version.js +2 -2
- package/dist/lib/version.js.map +1 -1
- package/dist/migrations/sync-v8.d.ts +3 -0
- package/dist/migrations/sync-v8.d.ts.map +1 -0
- package/dist/migrations/sync-v8.js +66 -0
- package/dist/migrations/sync-v8.js.map +1 -0
- package/dist/services/autocomplete.js +13 -13
- package/dist/services/autocomplete.js.map +1 -1
- package/dist/services/config-file.d.ts +6 -5
- package/dist/services/config-file.d.ts.map +1 -1
- package/dist/services/config-file.js +9 -8
- package/dist/services/config-file.js.map +1 -1
- package/dist/services/doctor.d.ts +1 -4
- package/dist/services/doctor.d.ts.map +1 -1
- package/dist/services/doctor.js +10 -37
- package/dist/services/doctor.js.map +1 -1
- package/dist/services/init.d.ts +1 -5
- package/dist/services/init.d.ts.map +1 -1
- package/dist/services/init.js +25 -59
- package/dist/services/init.js.map +1 -1
- package/dist/services/local-snapshot.d.ts +2 -7
- package/dist/services/local-snapshot.d.ts.map +1 -1
- package/dist/services/local-snapshot.js +12 -35
- package/dist/services/local-snapshot.js.map +1 -1
- package/dist/services/profile.d.ts +8 -4
- package/dist/services/profile.d.ts.map +1 -1
- package/dist/services/profile.js +110 -34
- package/dist/services/profile.js.map +1 -1
- package/dist/services/pull-apply.d.ts +30 -0
- package/dist/services/pull-apply.d.ts.map +1 -0
- package/dist/services/{local-materialization.js → pull-apply.js} +150 -210
- package/dist/services/pull-apply.js.map +1 -0
- package/dist/services/pull.d.ts +7 -10
- package/dist/services/pull.d.ts.map +1 -1
- package/dist/services/pull.js +19 -30
- package/dist/services/pull.js.map +1 -1
- package/dist/services/push.d.ts +4 -7
- package/dist/services/push.d.ts.map +1 -1
- package/dist/services/push.js +15 -38
- package/dist/services/push.js.map +1 -1
- package/dist/services/repo-artifacts.d.ts +5 -6
- package/dist/services/repo-artifacts.d.ts.map +1 -1
- package/dist/services/repo-artifacts.js +21 -60
- package/dist/services/repo-artifacts.js.map +1 -1
- package/dist/services/repo-snapshot.d.ts +2 -3
- package/dist/services/repo-snapshot.d.ts.map +1 -1
- package/dist/services/repo-snapshot.js +14 -26
- package/dist/services/repo-snapshot.js.map +1 -1
- package/dist/services/status.d.ts +1 -5
- package/dist/services/status.d.ts.map +1 -1
- package/dist/services/status.js +7 -17
- package/dist/services/status.js.map +1 -1
- package/dist/services/{runtime.d.ts → sync-context.d.ts} +9 -3
- package/dist/services/sync-context.d.ts.map +1 -0
- package/dist/services/{runtime.js → sync-context.js} +24 -8
- package/dist/services/sync-context.js.map +1 -0
- package/dist/services/{set.d.ts → sync-mode.d.ts} +7 -9
- package/dist/services/sync-mode.d.ts.map +1 -0
- package/dist/services/{set.js → sync-mode.js} +9 -23
- package/dist/services/sync-mode.js.map +1 -0
- package/dist/services/{paths.d.ts → sync-paths.d.ts} +2 -2
- package/dist/services/sync-paths.d.ts.map +1 -0
- package/dist/services/{paths.js → sync-paths.js} +4 -6
- package/dist/services/sync-paths.js.map +1 -0
- package/dist/services/terminal/logger.d.ts +30 -5
- package/dist/services/terminal/logger.d.ts.map +1 -1
- package/dist/services/terminal/logger.js +61 -14
- package/dist/services/terminal/logger.js.map +1 -1
- package/dist/services/terminal/path-completion.d.ts +2 -2
- package/dist/services/terminal/path-completion.d.ts.map +1 -1
- package/dist/services/terminal/path-completion.js +16 -13
- package/dist/services/terminal/path-completion.js.map +1 -1
- package/dist/services/terminal/shell.d.ts +1 -12
- package/dist/services/terminal/shell.d.ts.map +1 -1
- package/dist/services/terminal/shell.js +7 -160
- package/dist/services/terminal/shell.js.map +1 -1
- package/dist/services/terminal/spinner.d.ts +10 -0
- package/dist/services/terminal/spinner.d.ts.map +1 -0
- package/dist/services/terminal/spinner.js +61 -0
- package/dist/services/terminal/spinner.js.map +1 -0
- package/dist/services/terminal/theme.d.ts +31 -0
- package/dist/services/terminal/theme.d.ts.map +1 -0
- package/dist/services/terminal/theme.js +32 -0
- package/dist/services/terminal/theme.js.map +1 -0
- package/dist/services/track.d.ts +1 -3
- package/dist/services/track.d.ts.map +1 -1
- package/dist/services/track.js +27 -23
- package/dist/services/track.js.map +1 -1
- package/dist/services/untrack.d.ts +0 -2
- package/dist/services/untrack.d.ts.map +1 -1
- package/dist/services/untrack.js +4 -11
- package/dist/services/untrack.js.map +1 -1
- package/package.json +1 -2
- package/dist/config/sync-entry.d.ts.map +0 -1
- package/dist/config/sync-entry.js.map +0 -1
- package/dist/config/sync.d.ts +0 -8
- package/dist/config/sync.d.ts.map +0 -1
- package/dist/config/sync.js +0 -53
- package/dist/config/sync.js.map +0 -1
- package/dist/services/local-materialization.d.ts +0 -30
- package/dist/services/local-materialization.d.ts.map +0 -1
- package/dist/services/local-materialization.js.map +0 -1
- package/dist/services/paths.d.ts.map +0 -1
- package/dist/services/paths.js.map +0 -1
- package/dist/services/runtime.d.ts.map +0 -1
- package/dist/services/runtime.js.map +0 -1
- package/dist/services/set.d.ts.map +0 -1
- package/dist/services/set.js.map +0 -1
- package/dist/services/terminal/cli-runtime.d.ts +0 -18
- package/dist/services/terminal/cli-runtime.d.ts.map +0 -1
- package/dist/services/terminal/cli-runtime.js +0 -19
- package/dist/services/terminal/cli-runtime.js.map +0 -1
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { buildRouteMap } from "@stricli/core";
|
|
2
|
+
import profileAddCommand from "#app/cli/profile/add.ts";
|
|
2
3
|
import profileListCommand from "#app/cli/profile/list.ts";
|
|
4
|
+
import profileRemoveCommand from "#app/cli/profile/remove.ts";
|
|
3
5
|
import profileUseCommand from "#app/cli/profile/use.ts";
|
|
4
6
|
const profileRoute = buildRouteMap({
|
|
5
7
|
docs: {
|
|
6
8
|
brief: "Manage active and assigned sync profiles",
|
|
7
|
-
fullDescription: "Inspect
|
|
9
|
+
fullDescription: "Inspect, add, remove, or select manifest-registered profiles.",
|
|
8
10
|
},
|
|
9
11
|
routes: {
|
|
12
|
+
add: profileAddCommand,
|
|
10
13
|
list: profileListCommand,
|
|
14
|
+
remove: profileRemoveCommand,
|
|
11
15
|
use: profileUseCommand,
|
|
12
16
|
},
|
|
13
17
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/profile/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAC1D,OAAO,iBAAiB,MAAM,yBAAyB,CAAC;AAExD,MAAM,YAAY,GAAG,aAAa,CAAC;IACjC,IAAI,EAAE;QACJ,KAAK,EAAE,0CAA0C;QACjD,eAAe,EACb
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/profile/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,iBAAiB,MAAM,yBAAyB,CAAC;AACxD,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAC1D,OAAO,oBAAoB,MAAM,4BAA4B,CAAC;AAC9D,OAAO,iBAAiB,MAAM,yBAAyB,CAAC;AAExD,MAAM,YAAY,GAAG,aAAa,CAAC;IACjC,IAAI,EAAE;QACJ,KAAK,EAAE,0CAA0C;QACjD,eAAe,EACb,+DAA+D;KAClE;IACD,MAAM,EAAE;QACN,GAAG,EAAE,iBAAiB;QACtB,IAAI,EAAE,kBAAkB;QACxB,MAAM,EAAE,oBAAoB;QAC5B,GAAG,EAAE,iBAAiB;KACvB;CACF,CAAC,CAAC;AAEH,eAAe,YAAY,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const profileListCommand: import("@stricli/core").Command<
|
|
1
|
+
import type { ApplicationContext } from "@stricli/core";
|
|
2
|
+
declare const profileListCommand: import("@stricli/core").Command<ApplicationContext>;
|
|
3
3
|
export default profileListCommand;
|
|
4
4
|
//# sourceMappingURL=list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/cli/profile/list.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/cli/profile/list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAMxD,QAAA,MAAM,kBAAkB,qDA4BtB,CAAC;AAEH,eAAe,kBAAkB,CAAC"}
|
package/dist/cli/profile/list.js
CHANGED
|
@@ -1,41 +1,23 @@
|
|
|
1
1
|
import { buildCommand } from "@stricli/core";
|
|
2
|
-
import pc from "picocolors";
|
|
3
2
|
import { listProfiles } from "#app/services/profile.ts";
|
|
4
|
-
import { verboseFlag, } from "#app/services/terminal/cli-runtime.ts";
|
|
5
3
|
import { createCliLogger } from "#app/services/terminal/logger.ts";
|
|
6
4
|
const profileListCommand = buildCommand({
|
|
7
5
|
docs: {
|
|
8
6
|
brief: "Show configured and active sync profiles",
|
|
9
|
-
fullDescription: "List the
|
|
7
|
+
fullDescription: "List the implicit default profile and manifest-registered profiles, and show which profile is active through ~/.config/dotweave/settings.jsonc.",
|
|
10
8
|
},
|
|
11
|
-
async func(
|
|
12
|
-
const
|
|
13
|
-
const logger = createCliLogger({ verbose });
|
|
9
|
+
async func() {
|
|
10
|
+
const logger = createCliLogger();
|
|
14
11
|
const result = await listProfiles();
|
|
15
12
|
logger.info("Profiles");
|
|
16
|
-
|
|
17
|
-
logger.
|
|
18
|
-
if (result.
|
|
19
|
-
logger.warn(
|
|
20
|
-
}
|
|
21
|
-
if (verbose) {
|
|
22
|
-
logger.log(" assignments:");
|
|
23
|
-
if (result.assignments.length === 0) {
|
|
24
|
-
logger.log(pc.dim(" none"));
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
for (const assignment of result.assignments) {
|
|
28
|
-
logger.log(pc.dim(` ${assignment.entryRepoPath} → [${assignment.profiles.join(", ")}]`));
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
logger.log(pc.dim(` sync dir ${result.syncDirectory}`));
|
|
32
|
-
logger.log(pc.dim(` config ${result.globalConfigPath}`));
|
|
13
|
+
const profiles = [...result.availableProfiles];
|
|
14
|
+
logger.list(profiles.map((name) => name === result.activeProfile ? `${name} (active)` : name), { highlightLast: false });
|
|
15
|
+
if (result.activeProfileWarning !== undefined) {
|
|
16
|
+
logger.warn(result.activeProfileWarning);
|
|
33
17
|
}
|
|
34
18
|
},
|
|
35
19
|
parameters: {
|
|
36
|
-
flags: {
|
|
37
|
-
verbose: verboseFlag,
|
|
38
|
-
},
|
|
20
|
+
flags: {},
|
|
39
21
|
},
|
|
40
22
|
});
|
|
41
23
|
export default profileListCommand;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/cli/profile/list.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/cli/profile/list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAEnE,MAAM,kBAAkB,GAAG,YAAY,CAAkC;IACvE,IAAI,EAAE;QACJ,KAAK,EAAE,0CAA0C;QACjD,eAAe,EACb,iJAAiJ;KACpJ;IACD,KAAK,CAAC,IAAI;QACR,MAAM,MAAM,GAAG,eAAe,EAAE,CAAC;QAEjC,MAAM,MAAM,GAAG,MAAM,YAAY,EAAE,CAAC;QAEpC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAExB,MAAM,QAAQ,GAAG,CAAC,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;QAC/C,MAAM,CAAC,IAAI,CACT,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACpB,IAAI,KAAK,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,IAAI,WAAW,CAAC,CAAC,CAAC,IAAI,CAC1D,EACD,EAAE,aAAa,EAAE,KAAK,EAAE,CACzB,CAAC;QAEF,IAAI,MAAM,CAAC,oBAAoB,KAAK,SAAS,EAAE,CAAC;YAC9C,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;IACD,UAAU,EAAE;QACV,KAAK,EAAE,EAAE;KACV;CACF,CAAC,CAAC;AAEH,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove.d.ts","sourceRoot":"","sources":["../../../src/cli/profile/remove.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAMxD,QAAA,MAAM,oBAAoB,qDA6BxB,CAAC;AAEH,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { buildCommand } from "@stricli/core";
|
|
2
|
+
import { removeProfile } from "#app/services/profile.ts";
|
|
3
|
+
import { createCliLogger } from "#app/services/terminal/logger.ts";
|
|
4
|
+
const profileRemoveCommand = buildCommand({
|
|
5
|
+
docs: {
|
|
6
|
+
brief: "Remove a sync profile",
|
|
7
|
+
fullDescription: "Unregister an unused non-default profile from manifest.jsonc. Reassign or clear tracked entry assignments before removing a referenced profile.",
|
|
8
|
+
},
|
|
9
|
+
async func(_flags, profile) {
|
|
10
|
+
const logger = createCliLogger();
|
|
11
|
+
const result = await removeProfile(profile);
|
|
12
|
+
logger.success(`Removed profile ${result.profile}`);
|
|
13
|
+
},
|
|
14
|
+
parameters: {
|
|
15
|
+
flags: {},
|
|
16
|
+
positional: {
|
|
17
|
+
kind: "tuple",
|
|
18
|
+
parameters: [
|
|
19
|
+
{
|
|
20
|
+
brief: "Profile name to remove",
|
|
21
|
+
parse: String,
|
|
22
|
+
placeholder: "profile",
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
export default profileRemoveCommand;
|
|
29
|
+
//# sourceMappingURL=remove.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove.js","sourceRoot":"","sources":["../../../src/cli/profile/remove.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAEnE,MAAM,oBAAoB,GAAG,YAAY,CAIvC;IACA,IAAI,EAAE;QACJ,KAAK,EAAE,uBAAuB;QAC9B,eAAe,EACb,iJAAiJ;KACpJ;IACD,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO;QACxB,MAAM,MAAM,GAAG,eAAe,EAAE,CAAC;QACjC,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,OAAO,CAAC,CAAC;QAE5C,MAAM,CAAC,OAAO,CAAC,mBAAmB,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;IACtD,CAAC;IACD,UAAU,EAAE;QACV,KAAK,EAAE,EAAE;QACT,UAAU,EAAE;YACV,IAAI,EAAE,OAAO;YACb,UAAU,EAAE;gBACV;oBACE,KAAK,EAAE,wBAAwB;oBAC/B,KAAK,EAAE,MAAM;oBACb,WAAW,EAAE,SAAS;iBACvB;aACF;SACF;KACF;CACF,CAAC,CAAC;AAEH,eAAe,oBAAoB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const profileUseCommand: import("@stricli/core").Command<
|
|
1
|
+
import type { ApplicationContext } from "@stricli/core";
|
|
2
|
+
declare const profileUseCommand: import("@stricli/core").Command<ApplicationContext>;
|
|
3
3
|
export default profileUseCommand;
|
|
4
4
|
//# sourceMappingURL=use.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use.d.ts","sourceRoot":"","sources":["../../../src/cli/profile/use.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use.d.ts","sourceRoot":"","sources":["../../../src/cli/profile/use.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAMxD,QAAA,MAAM,iBAAiB,qDAsCrB,CAAC;AAEH,eAAe,iBAAiB,CAAC"}
|
package/dist/cli/profile/use.js
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import { buildCommand } from "@stricli/core";
|
|
2
|
-
import pc from "picocolors";
|
|
3
2
|
import { clearActiveProfile, setActiveProfile } from "#app/services/profile.ts";
|
|
4
|
-
import { verboseFlag, } from "#app/services/terminal/cli-runtime.ts";
|
|
5
3
|
import { createCliLogger } from "#app/services/terminal/logger.ts";
|
|
6
4
|
const profileUseCommand = buildCommand({
|
|
7
5
|
docs: {
|
|
8
6
|
brief: "Set or clear the active sync profile",
|
|
9
|
-
fullDescription: "Write ~/.config/dotweave/settings.jsonc so plain push, pull, status, and doctor commands use the selected profile
|
|
7
|
+
fullDescription: "Write ~/.config/dotweave/settings.jsonc so plain push, pull, status, and doctor commands use the selected registered profile by default. Omit the profile name to clear the active profile.",
|
|
10
8
|
},
|
|
11
|
-
async func(
|
|
12
|
-
const
|
|
13
|
-
const logger = createCliLogger({ verbose });
|
|
9
|
+
async func(_flags, profile) {
|
|
10
|
+
const logger = createCliLogger();
|
|
14
11
|
const result = profile !== undefined
|
|
15
12
|
? await setActiveProfile(profile)
|
|
16
13
|
: await clearActiveProfile();
|
|
@@ -21,17 +18,11 @@ const profileUseCommand = buildCommand({
|
|
|
21
18
|
logger.success("Active profile cleared");
|
|
22
19
|
}
|
|
23
20
|
if (result.warning) {
|
|
24
|
-
logger.warn(
|
|
25
|
-
}
|
|
26
|
-
if (verbose) {
|
|
27
|
-
logger.log(pc.dim(` sync dir ${result.syncDirectory}`));
|
|
28
|
-
logger.log(pc.dim(` config ${result.globalConfigPath}`));
|
|
21
|
+
logger.warn(result.warning);
|
|
29
22
|
}
|
|
30
23
|
},
|
|
31
24
|
parameters: {
|
|
32
|
-
flags: {
|
|
33
|
-
verbose: verboseFlag,
|
|
34
|
-
},
|
|
25
|
+
flags: {},
|
|
35
26
|
positional: {
|
|
36
27
|
kind: "tuple",
|
|
37
28
|
parameters: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use.js","sourceRoot":"","sources":["../../../src/cli/profile/use.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use.js","sour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|
-
import {
|
|
2
|
-
declare const pullCommand: import("@stricli/core").Command<
|
|
1
|
+
import type { ApplicationContext } from "@stricli/core";
|
|
2
|
+
declare const pullCommand: import("@stricli/core").Command<ApplicationContext>;
|
|
3
3
|
export default pullCommand;
|
|
4
4
|
//# sourceMappingURL=pull.d.ts.map
|
package/dist/cli/pull.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pull.d.ts","sourceRoot":"","sources":["../../src/cli/pull.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pull.d.ts","sourceRoot":"","sources":["../../src/cli/pull.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AA8BxD,QAAA,MAAM,WAAW,qDAqFf,CAAC;AAEH,eAAe,WAAW,CAAC"}
|
package/dist/cli/pull.js
CHANGED
|
@@ -1,23 +1,17 @@
|
|
|
1
1
|
import { buildCommand } from "@stricli/core";
|
|
2
|
-
import pc from "picocolors";
|
|
3
2
|
import { DotweaveError } from "#app/lib/error.ts";
|
|
4
3
|
import { ask } from "#app/lib/prompt.ts";
|
|
5
|
-
import { applyPullPlan,
|
|
6
|
-
import { verboseFlag, } from "#app/services/terminal/cli-runtime.ts";
|
|
4
|
+
import { applyPullPlan, preparePull } from "#app/services/pull.ts";
|
|
7
5
|
import { createCliLogger } from "#app/services/terminal/logger.ts";
|
|
6
|
+
import { profileFlag } from "./shared-flags.js";
|
|
8
7
|
const logPullPlanChanges = (logger, updatedLocalPaths, deletedLocalPaths) => {
|
|
9
|
-
logger.info("Planned pull changes");
|
|
10
8
|
if (updatedLocalPaths.length > 0) {
|
|
11
|
-
logger.
|
|
12
|
-
|
|
13
|
-
logger.log(pc.dim(` + ${path}`));
|
|
14
|
-
}
|
|
9
|
+
logger.section(`Update from repository (${updatedLocalPaths.length})`);
|
|
10
|
+
logger.list(updatedLocalPaths, { bullet: "+" });
|
|
15
11
|
}
|
|
16
12
|
if (deletedLocalPaths.length > 0) {
|
|
17
|
-
logger.
|
|
18
|
-
|
|
19
|
-
logger.log(pc.dim(` - ${path}`));
|
|
20
|
-
}
|
|
13
|
+
logger.section(`Remove locally (${deletedLocalPaths.length})`);
|
|
14
|
+
logger.list(deletedLocalPaths, { bullet: "-" });
|
|
21
15
|
}
|
|
22
16
|
};
|
|
23
17
|
const pullCommand = buildCommand({
|
|
@@ -26,28 +20,26 @@ const pullCommand = buildCommand({
|
|
|
26
20
|
fullDescription: "Read tracked artifacts from the sync directory and materialize them back onto local paths under your home directory. Secret artifacts are decrypted with the configured age identity before they are written locally.",
|
|
27
21
|
},
|
|
28
22
|
async func(flags) {
|
|
29
|
-
const verbose = flags.verbose ?? false;
|
|
30
23
|
const dryRun = flags.dryRun ?? false;
|
|
31
|
-
const logger = createCliLogger(
|
|
32
|
-
const
|
|
33
|
-
const prepared = await preparePull({ dryRun, profile: flags.profile }
|
|
34
|
-
const { config, plan
|
|
24
|
+
const logger = createCliLogger();
|
|
25
|
+
const spin = logger.spinner("Preparing pull...");
|
|
26
|
+
const prepared = await preparePull({ dryRun, profile: flags.profile });
|
|
27
|
+
const { config, plan } = prepared;
|
|
28
|
+
spin.stop();
|
|
35
29
|
if (plan.updatedLocalPaths.length === 0 &&
|
|
36
30
|
plan.deletedLocalPaths.length === 0) {
|
|
37
31
|
logger.info("Already up to date");
|
|
38
|
-
if (verbose) {
|
|
39
|
-
logger.log(pc.dim(` sync dir ${syncDirectory}`));
|
|
40
|
-
logger.log(pc.dim(` config ${buildPullResultFromPlan(plan, syncDirectory, dryRun).configPath}`));
|
|
41
|
-
}
|
|
42
32
|
return;
|
|
43
33
|
}
|
|
34
|
+
logger.info("Planned pull changes");
|
|
44
35
|
logPullPlanChanges(logger, plan.updatedLocalPaths, plan.deletedLocalPaths);
|
|
45
36
|
if (dryRun) {
|
|
46
|
-
logger.info(
|
|
37
|
+
logger.info("Pull preview (dry run)");
|
|
47
38
|
}
|
|
48
39
|
else if (flags.yes ?? false) {
|
|
49
|
-
|
|
50
|
-
|
|
40
|
+
const applySpin = logger.spinner("Applying pull...");
|
|
41
|
+
await applyPullPlan(config, plan);
|
|
42
|
+
applySpin.succeed("Pull complete");
|
|
51
43
|
}
|
|
52
44
|
else {
|
|
53
45
|
if (!(process.stdin.isTTY ?? false)) {
|
|
@@ -60,18 +52,14 @@ const pullCommand = buildCommand({
|
|
|
60
52
|
logger.info("Skipped pull changes");
|
|
61
53
|
return;
|
|
62
54
|
}
|
|
63
|
-
|
|
64
|
-
|
|
55
|
+
const applySpin = logger.spinner("Applying pull...");
|
|
56
|
+
await applyPullPlan(config, plan);
|
|
57
|
+
applySpin.succeed("Pull complete");
|
|
65
58
|
}
|
|
66
|
-
const result = buildPullResultFromPlan(plan, syncDirectory, dryRun);
|
|
67
59
|
const updateAction = dryRun ? "would be updated" : "updated";
|
|
68
60
|
const removeAction = dryRun ? "would be removed" : "removed";
|
|
69
|
-
logger.
|
|
70
|
-
logger.
|
|
71
|
-
if (verbose) {
|
|
72
|
-
logger.log(pc.dim(` sync dir ${result.syncDirectory}`));
|
|
73
|
-
logger.log(pc.dim(` config ${result.configPath}`));
|
|
74
|
-
}
|
|
61
|
+
logger.kv("updated", `${plan.updatedLocalPaths.length} paths ${updateAction}`);
|
|
62
|
+
logger.kv("removed", `${plan.deletedLocalPaths.length} paths ${removeAction}`);
|
|
75
63
|
},
|
|
76
64
|
parameters: {
|
|
77
65
|
flags: {
|
|
@@ -80,20 +68,13 @@ const pullCommand = buildCommand({
|
|
|
80
68
|
kind: "boolean",
|
|
81
69
|
optional: true,
|
|
82
70
|
},
|
|
83
|
-
profile:
|
|
84
|
-
brief: "Use a specific profile layer for this command",
|
|
85
|
-
kind: "parsed",
|
|
86
|
-
optional: true,
|
|
87
|
-
parse: String,
|
|
88
|
-
placeholder: "profile",
|
|
89
|
-
},
|
|
71
|
+
profile: profileFlag,
|
|
90
72
|
yes: {
|
|
91
73
|
brief: "Apply pull changes without prompting",
|
|
92
74
|
kind: "boolean",
|
|
93
75
|
optional: true,
|
|
94
76
|
withNegated: false,
|
|
95
77
|
},
|
|
96
|
-
verbose: verboseFlag,
|
|
97
78
|
},
|
|
98
79
|
aliases: {
|
|
99
80
|
y: "yes",
|
package/dist/cli/pull.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pull.js","sourceRoot":"","sources":["../../src/cli/pull.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pull.js","sourceRoot":"","sources":["../../src/cli/pull.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAQhD,MAAM,kBAAkB,GAAG,CACzB,MAA0C,EAC1C,iBAAoC,EACpC,iBAAoC,EACpC,EAAE;IACF,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACjC,MAAM,CAAC,OAAO,CAAC,2BAA2B,iBAAiB,CAAC,MAAM,GAAG,CAAC,CAAC;QACvE,MAAM,CAAC,IAAI,CAAC,iBAA6B,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACjC,MAAM,CAAC,OAAO,CAAC,mBAAmB,iBAAiB,CAAC,MAAM,GAAG,CAAC,CAAC;QAC/D,MAAM,CAAC,IAAI,CAAC,iBAA6B,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC,CAAC;AAE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AAE;YACP,CAAC,EAAE,KAAK;SACT;KACF;CACF,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC"}
|
package/dist/cli/push.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const pushCommand: import("@stricli/core").Command<
|
|
1
|
+
import type { ApplicationContext } from "@stricli/core";
|
|
2
|
+
declare const pushCommand: import("@stricli/core").Command<ApplicationContext>;
|
|
3
3
|
export default pushCommand;
|
|
4
4
|
//# sourceMappingURL=push.d.ts.map
|
package/dist/cli/push.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"push.d.ts","sourceRoot":"","sources":["../../src/cli/push.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"push.d.ts","sourceRoot":"","sources":["../../src/cli/push.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAWxD,QAAA,MAAM,WAAW,qDA2Cf,CAAC;AAEH,eAAe,WAAW,CAAC"}
|
package/dist/cli/push.js
CHANGED
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
import { buildCommand } from "@stricli/core";
|
|
2
|
-
import pc from "picocolors";
|
|
3
2
|
import { pushChanges } from "#app/services/push.ts";
|
|
4
|
-
import { verboseFlag, } from "#app/services/terminal/cli-runtime.ts";
|
|
5
3
|
import { createCliLogger } from "#app/services/terminal/logger.ts";
|
|
4
|
+
import { profileFlag } from "./shared-flags.js";
|
|
6
5
|
const pushCommand = buildCommand({
|
|
7
6
|
docs: {
|
|
8
7
|
brief: "Mirror local config into the git-backed sync directory",
|
|
9
8
|
fullDescription: "Collect the current state of tracked local files and directories, then update the sync directory artifacts to match. Secret targets are encrypted before they are written into the repository.",
|
|
10
9
|
},
|
|
11
10
|
async func(flags) {
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
const logger = createCliLogger();
|
|
12
|
+
const spin = logger.spinner("Pushing changes...");
|
|
13
|
+
const result = await pushChanges({
|
|
14
|
+
dryRun: flags.dryRun ?? false,
|
|
15
|
+
profile: flags.profile,
|
|
16
|
+
});
|
|
17
17
|
if (result.dryRun) {
|
|
18
|
-
|
|
18
|
+
spin.stop();
|
|
19
|
+
logger.info("Push preview (dry run)");
|
|
19
20
|
}
|
|
20
21
|
else {
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
logger.log(` ${stats}`);
|
|
24
|
-
logger.log(` ${result.deletedArtifactCount} stale artifacts ${result.dryRun ? "would be removed" : "removed"}`);
|
|
25
|
-
if (verbose) {
|
|
26
|
-
logger.log(pc.dim(` sync dir ${result.syncDirectory}`));
|
|
27
|
-
logger.log(pc.dim(` config ${result.configPath}`));
|
|
22
|
+
spin.succeed("Push complete");
|
|
28
23
|
}
|
|
24
|
+
logger.kv("plain", String(result.plainFileCount));
|
|
25
|
+
logger.kv("encrypted", String(result.encryptedFileCount));
|
|
26
|
+
logger.kv("symlinks", String(result.symlinkCount));
|
|
27
|
+
logger.kv("dirs", String(result.directoryCount));
|
|
28
|
+
const removalAction = result.dryRun ? "would be removed" : "removed";
|
|
29
|
+
logger.log(` ${result.deletedArtifactCount} stale artifacts ${removalAction}`);
|
|
29
30
|
},
|
|
30
31
|
parameters: {
|
|
31
32
|
flags: {
|
|
@@ -34,14 +35,7 @@ const pushCommand = buildCommand({
|
|
|
34
35
|
kind: "boolean",
|
|
35
36
|
optional: true,
|
|
36
37
|
},
|
|
37
|
-
profile:
|
|
38
|
-
brief: "Use a specific profile layer for this command",
|
|
39
|
-
kind: "parsed",
|
|
40
|
-
optional: true,
|
|
41
|
-
parse: String,
|
|
42
|
-
placeholder: "profile",
|
|
43
|
-
},
|
|
44
|
-
verbose: verboseFlag,
|
|
38
|
+
profile: profileFlag,
|
|
45
39
|
},
|
|
46
40
|
},
|
|
47
41
|
});
|
package/dist/cli/push.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"push.js","sourceRoot":"","sources":["../../src/cli/push.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"push.js","sourceRoot":"","sources":["../../src/cli/push.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAOhD,MAAM,WAAW,GAAG,YAAY,CAAoC;IAClE,IAAI,EAAE;QACJ,KAAK,EAAE,wDAAwD;QAC/D,eAAe,EACb,gMAAgM;KACnM;IACD,KAAK,CAAC,IAAI,CAAC,KAAK;QACd,MAAM,MAAM,GAAG,eAAe,EAAE,CAAC;QAEjC,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;QAElD,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC;YAC/B,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,KAAK;YAC7B,OAAO,EAAE,KAAK,CAAC,OAAO;SACvB,CAAC,CAAC;QAEH,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;YAClB,IAAI,CAAC,IAAI,EAAE,CAAC;YACZ,MAAM,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;QACxC,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;QAChC,CAAC;QAED,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC;QAClD,MAAM,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC;QAC1D,MAAM,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;QACnD,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC;QAEjD,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,SAAS,CAAC;QACrE,MAAM,CAAC,GAAG,CACR,KAAK,MAAM,CAAC,oBAAoB,oBAAoB,aAAa,EAAE,CACpE,CAAC;IACJ,CAAC;IACD,UAAU,EAAE;QACV,KAAK,EAAE;YACL,MAAM,EAAE;gBACN,KAAK,EAAE,iCAAiC;gBACxC,IAAI,EAAE,SAAS;gBACf,QAAQ,EAAE,IAAI;aACf;YACD,OAAO,EAAE,WAAW;SACrB;KACF;CACF,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
export declare const rootCommandRoutes: {
|
|
2
|
-
cd: import("@stricli/core").Command<import("
|
|
3
|
-
doctor: import("@stricli/core").Command<import("
|
|
4
|
-
init: import("@stricli/core").Command<import("
|
|
5
|
-
profile: import("@stricli/core").RouteMap<import("
|
|
6
|
-
pull: import("@stricli/core").Command<import("
|
|
7
|
-
push: import("@stricli/core").Command<import("
|
|
8
|
-
status: import("@stricli/core").Command<import("
|
|
9
|
-
track: import("@stricli/core").Command<import("
|
|
10
|
-
untrack: import("@stricli/core").Command<import("
|
|
2
|
+
cd: import("@stricli/core").Command<import("@stricli/core").ApplicationContext>;
|
|
3
|
+
doctor: import("@stricli/core").Command<import("@stricli/core").ApplicationContext>;
|
|
4
|
+
init: import("@stricli/core").Command<import("@stricli/core").ApplicationContext>;
|
|
5
|
+
profile: import("@stricli/core").RouteMap<import("@stricli/core").ApplicationContext>;
|
|
6
|
+
pull: import("@stricli/core").Command<import("@stricli/core").ApplicationContext>;
|
|
7
|
+
push: import("@stricli/core").Command<import("@stricli/core").ApplicationContext>;
|
|
8
|
+
status: import("@stricli/core").Command<import("@stricli/core").ApplicationContext>;
|
|
9
|
+
track: import("@stricli/core").Command<import("@stricli/core").ApplicationContext>;
|
|
10
|
+
untrack: import("@stricli/core").Command<import("@stricli/core").ApplicationContext>;
|
|
11
11
|
};
|
|
12
|
-
export declare const rootCommandNames: string[];
|
|
13
12
|
//# sourceMappingURL=root-commands.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root-commands.d.ts","sourceRoot":"","sources":["../../src/cli/root-commands.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,iBAAiB;;;;;;;;;;CAU7B,CAAC
|
|
1
|
+
{"version":3,"file":"root-commands.d.ts","sourceRoot":"","sources":["../../src/cli/root-commands.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,iBAAiB;;;;;;;;;;CAU7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root-commands.js","sourceRoot":"","sources":["../../src/cli/root-commands.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,YAAY,MAAM,2BAA2B,CAAC;AACrD,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAEjD,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,EAAE,EAAE,SAAS;IACb,MAAM,EAAE,aAAa;IACrB,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,YAAY;IACrB,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,WAAW;IACjB,MAAM,EAAE,aAAa;IACrB,KAAK,EAAE,YAAY;IACnB,OAAO,EAAE,cAAc;CACxB,CAAC
|
|
1
|
+
{"version":3,"file":"root-commands.js","sourceRoot":"","sources":["../../src/cli/root-commands.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,YAAY,MAAM,2BAA2B,CAAC;AACrD,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAEjD,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,EAAE,EAAE,SAAS;IACb,MAAM,EAAE,aAAa;IACrB,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,YAAY;IACrB,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,WAAW;IACjB,MAAM,EAAE,aAAa;IACrB,KAAK,EAAE,YAAY;IACnB,OAAO,EAAE,cAAc;CACxB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type NoFlags = Record<never, never>;
|
|
2
|
+
export declare const profileFlag: {
|
|
3
|
+
readonly brief: "Use a registered profile layer for this command (add non-default profiles with 'dotweave profile add')";
|
|
4
|
+
readonly kind: "parsed";
|
|
5
|
+
readonly optional: true;
|
|
6
|
+
readonly parse: StringConstructor;
|
|
7
|
+
readonly placeholder: "profile";
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=shared-flags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared-flags.d.ts","sourceRoot":"","sources":["../../src/cli/shared-flags.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAE3C,eAAO,MAAM,WAAW;;;;;;CAOd,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export const profileFlag = {
|
|
2
|
+
brief: "Use a registered profile layer for this command (add non-default profiles with 'dotweave profile add')",
|
|
3
|
+
kind: "parsed",
|
|
4
|
+
optional: true,
|
|
5
|
+
parse: String,
|
|
6
|
+
placeholder: "profile",
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=shared-flags.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared-flags.js","sourceRoot":"","sources":["../../src/cli/shared-flags.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,KAAK,EACH,wGAAwG;IAC1G,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,MAAM;IACb,WAAW,EAAE,SAAS;CACd,CAAC"}
|
package/dist/cli/status.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const statusCommand: import("@stricli/core").Command<
|
|
1
|
+
import type { ApplicationContext } from "@stricli/core";
|
|
2
|
+
declare const statusCommand: import("@stricli/core").Command<ApplicationContext>;
|
|
3
3
|
export default statusCommand;
|
|
4
4
|
//# sourceMappingURL=status.d.ts.map
|
package/dist/cli/status.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/cli/status.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/cli/status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAwHxD,QAAA,MAAM,aAAa,qDA8BjB,CAAC;AAEH,eAAe,aAAa,CAAC"}
|