@banzhe/dsh-devcontainer 0.0.0-stage → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.ts ADDED
@@ -0,0 +1,88 @@
1
+ import { t as ContainerOptions } from "./types-DsF9Hz5P.js";
2
+ import z from "@deepseek-ai/schemastery";
3
+ import { Context, Volatile } from "@deepseek-ai/cordis";
4
+ //#region src/index.d.ts
5
+ /** Plugin name used by the Loader row, and the settings namespace the page edits. */
6
+ declare const name = "devcontainer";
7
+ /** How the derived variants are built and labelled. */
8
+ interface PresetVariantConfig {
9
+ /** Register variants at all (default true); a false row is a pure container shell. */
10
+ enabled: boolean;
11
+ /**
12
+ * Only derive on win32 (default true): the platform where presets ship
13
+ * `pwsh` instead of `bash`. Elsewhere the variants would be duplicates.
14
+ */
15
+ win32Only: boolean;
16
+ /**
17
+ * Added to the source preset's `order` so the variant sorts right after it.
18
+ *
19
+ * The display suffix is not configurable: it is what the shell row reads back
20
+ * to know which marker a preset needs, so it is owned by `src/ids.ts`.
21
+ */
22
+ orderOffset: number;
23
+ }
24
+ /** Plugin config. */
25
+ interface Config extends ContainerOptions {
26
+ /** Source preset ids the page asked to derive a `… (devContainer)` variant from; empty derives nothing. */
27
+ sources: Volatile<readonly string[]>;
28
+ /** Source preset ids the profile asked to derive a `… (sbx)` variant from; empty derives nothing. */
29
+ sbxSources: Volatile<readonly string[]>;
30
+ presets: PresetVariantConfig;
31
+ }
32
+ /**
33
+ * The live schema the settings page edits and the Loader validates.
34
+ *
35
+ * Deliberately not annotated `z<Config>`: the interface describes the runtime
36
+ * config (`sources` is a `Volatile` reference), while the schema's own output is
37
+ * the plain field type.
38
+ */
39
+ declare const Config: z<Schemastery.ObjectS<NoInfer<{
40
+ presets: z<Schemastery.ObjectS<NoInfer<{
41
+ enabled: z<boolean, boolean, "defined">;
42
+ win32Only: z<boolean, boolean, "defined">;
43
+ orderOffset: z<number, number, "defined">;
44
+ }>>, Schemastery.ObjectT<NoInfer<{
45
+ enabled: z<boolean, boolean, "defined">;
46
+ win32Only: z<boolean, boolean, "defined">;
47
+ orderOffset: z<number, number, "defined">;
48
+ }>>, "plain">;
49
+ sources: z<NoInfer<string[]>, NoInfer<string[]>, "volatile-defined">;
50
+ sbxSources: z<NoInfer<string[]>, NoInfer<string[]>, "volatile-defined">;
51
+ shell: z<string, string, "defined">;
52
+ cli: z<"devcontainer" | "auto" | "docker" | "sbx", "devcontainer" | "auto" | "docker" | "sbx", "defined">;
53
+ ensureUp: z<boolean, boolean, "defined">;
54
+ containerTimeoutMs: z<number, number, "defined">;
55
+ requireContainer: z<boolean, boolean, "defined">;
56
+ }>>, Schemastery.ObjectT<NoInfer<{
57
+ presets: z<Schemastery.ObjectS<NoInfer<{
58
+ enabled: z<boolean, boolean, "defined">;
59
+ win32Only: z<boolean, boolean, "defined">;
60
+ orderOffset: z<number, number, "defined">;
61
+ }>>, Schemastery.ObjectT<NoInfer<{
62
+ enabled: z<boolean, boolean, "defined">;
63
+ win32Only: z<boolean, boolean, "defined">;
64
+ orderOffset: z<number, number, "defined">;
65
+ }>>, "plain">;
66
+ sources: z<NoInfer<string[]>, NoInfer<string[]>, "volatile-defined">;
67
+ sbxSources: z<NoInfer<string[]>, NoInfer<string[]>, "volatile-defined">;
68
+ shell: z<string, string, "defined">;
69
+ cli: z<"devcontainer" | "auto" | "docker" | "sbx", "devcontainer" | "auto" | "docker" | "sbx", "defined">;
70
+ ensureUp: z<boolean, boolean, "defined">;
71
+ containerTimeoutMs: z<number, number, "defined">;
72
+ requireContainer: z<boolean, boolean, "defined">;
73
+ }>>, "plain">;
74
+ /**
75
+ * Load the row: rewrite the working-directory context, and keep the derived
76
+ * preset set equal to the two stored source lists.
77
+ *
78
+ * Deliberately the module's only plugin export besides its schema and name: the
79
+ * Loader's `unwrapExports` prefers a `default` export, and a `default`-exported
80
+ * `apply` would be the whole plugin — losing this module's `Config`, so the row
81
+ * would activate with the raw (absent) config instead of the resolved one.
82
+ * @param ctx - the Host plugin context.
83
+ * @param configured - this row's resolved config; absent when the row declares none.
84
+ */
85
+ declare function apply(ctx: Context, configured?: Config): void;
86
+ //#endregion
87
+ export { Config, PresetVariantConfig, apply, name };
88
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;cAoDa;;UA4BI;;EAEf;;;;;EAKA;;;;;;;EAOA;;;UAIe,eAAe;;EAE9B,SAAS;;EAET,YAAY;EACZ,SAAS;;;;;;;;;cAUE,QAAM,EAAA,YAAA,QAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgDH,MAAM,KAAK,SAAS,aAAa"}