hatchkit 0.1.38 → 0.1.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.
- package/dist/adopt.js +6 -4
- package/dist/adopt.js.map +1 -1
- package/dist/deploy/coolify-app.d.ts +9 -9
- package/dist/deploy/coolify-app.d.ts.map +1 -1
- package/dist/deploy/coolify-app.js +14 -19
- package/dist/deploy/coolify-app.js.map +1 -1
- package/dist/deploy/coolify.d.ts.map +1 -1
- package/dist/deploy/coolify.js +6 -2
- package/dist/deploy/coolify.js.map +1 -1
- package/dist/deploy/keys.d.ts +7 -2
- package/dist/deploy/keys.d.ts.map +1 -1
- package/dist/deploy/keys.js +27 -7
- package/dist/deploy/keys.js.map +1 -1
- package/dist/deploy/regen-infra.d.ts +12 -0
- package/dist/deploy/regen-infra.d.ts.map +1 -0
- package/dist/deploy/regen-infra.js +194 -0
- package/dist/deploy/regen-infra.js.map +1 -0
- package/dist/deploy/rollback.d.ts.map +1 -1
- package/dist/deploy/rollback.js +80 -22
- package/dist/deploy/rollback.js.map +1 -1
- package/dist/deploy/sync.d.ts +10 -7
- package/dist/deploy/sync.d.ts.map +1 -1
- package/dist/deploy/sync.js +13 -9
- package/dist/deploy/sync.js.map +1 -1
- package/dist/index.js +124 -7
- package/dist/index.js.map +1 -1
- package/dist/inventory.d.ts +107 -0
- package/dist/inventory.d.ts.map +1 -0
- package/dist/inventory.js +1522 -0
- package/dist/inventory.js.map +1 -0
- package/dist/prompts.d.ts +0 -7
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +1 -7
- package/dist/prompts.js.map +1 -1
- package/dist/scaffold/app.js +1 -1
- package/dist/scaffold/app.js.map +1 -1
- package/dist/scaffold/infra.d.ts.map +1 -1
- package/dist/scaffold/infra.js +14 -6
- package/dist/scaffold/infra.js.map +1 -1
- package/dist/utils/coolify-api.d.ts +11 -0
- package/dist/utils/coolify-api.d.ts.map +1 -1
- package/dist/utils/coolify-api.js +25 -0
- package/dist/utils/coolify-api.js.map +1 -1
- package/dist/utils/coolify-server-ips.d.ts +6 -12
- package/dist/utils/coolify-server-ips.d.ts.map +1 -1
- package/dist/utils/coolify-server-ips.js +26 -81
- package/dist/utils/coolify-server-ips.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { type ProjectManifest } from "./scaffold/manifest.js";
|
|
2
|
+
export interface InventoryInput {
|
|
3
|
+
/** Project / app name. Used to match Coolify apps + buckets + clients. */
|
|
4
|
+
name?: string;
|
|
5
|
+
/** Primary public domain (e.g. "myapp.com" or "docs.myapp.com"). */
|
|
6
|
+
domain?: string;
|
|
7
|
+
/** GitHub repo slug "owner/name". */
|
|
8
|
+
repo?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface InventoryFinding {
|
|
11
|
+
provider: string;
|
|
12
|
+
/** kebab-case resource kind ("application", "bucket", "dns-record", …). */
|
|
13
|
+
kind: string;
|
|
14
|
+
/** Human label for the resource ("myapp", "myapp-assets", "myapp.com A"). */
|
|
15
|
+
identity: string;
|
|
16
|
+
/**
|
|
17
|
+
* · `present` — the resource exists, no drift detected.
|
|
18
|
+
* · `missing` — we looked for it (because something declares it) and
|
|
19
|
+
* didn't find it; the project is in an incomplete state.
|
|
20
|
+
* · `drift` — present, but a recorded/derived expectation doesn't
|
|
21
|
+
* match the live value.
|
|
22
|
+
* · `info` — neutral observation (e.g. "Coolify has 3 unrelated apps").
|
|
23
|
+
*/
|
|
24
|
+
status: "present" | "missing" | "drift" | "info";
|
|
25
|
+
detail?: string;
|
|
26
|
+
/** When status === "drift", a list of "X != Y" lines explaining the gap. */
|
|
27
|
+
drift?: string[];
|
|
28
|
+
}
|
|
29
|
+
export interface InventoryLocal {
|
|
30
|
+
cwd: string;
|
|
31
|
+
isGitRepo: boolean;
|
|
32
|
+
gitRemote?: string;
|
|
33
|
+
gitDefaultBranch?: string;
|
|
34
|
+
/** True when there's a real GitHub remote we can talk to via `gh`. */
|
|
35
|
+
hasGitHubRemote: boolean;
|
|
36
|
+
packageName?: string;
|
|
37
|
+
packageDescription?: string;
|
|
38
|
+
manifestPresent: boolean;
|
|
39
|
+
manifest?: ProjectManifest;
|
|
40
|
+
serverDir?: string;
|
|
41
|
+
clientDir?: string;
|
|
42
|
+
hasDockerfile: boolean;
|
|
43
|
+
composePath?: string;
|
|
44
|
+
/** Path to the gh-pages-deploying workflow, if any. */
|
|
45
|
+
ghPagesWorkflowPath?: string;
|
|
46
|
+
/** Path to the Coolify deploy workflow (`.github/workflows/deploy.yml`),
|
|
47
|
+
* if any. Tells us "this project is set up for hatchkit-style deploy". */
|
|
48
|
+
deployWorkflowPath?: string;
|
|
49
|
+
/** Contents of any `CNAME` file at repo root or in a docs/site subdir
|
|
50
|
+
* — GitHub Pages writes this for custom domains. */
|
|
51
|
+
cnameFile?: {
|
|
52
|
+
path: string;
|
|
53
|
+
content: string;
|
|
54
|
+
};
|
|
55
|
+
/** True when an encrypted `.env.production` exists (dotenvx header). */
|
|
56
|
+
dotenvxEncrypted: boolean;
|
|
57
|
+
/** True when a `.env.keys` file exists somewhere standard. */
|
|
58
|
+
envKeysPresent: boolean;
|
|
59
|
+
}
|
|
60
|
+
export interface InventoryReport {
|
|
61
|
+
cliVersion: string;
|
|
62
|
+
cwd: string;
|
|
63
|
+
inferred: InventoryInput;
|
|
64
|
+
/** Where each inferred identity came from. Useful for the user to
|
|
65
|
+
* trust / correct what we guessed. */
|
|
66
|
+
sources: {
|
|
67
|
+
name?: InferenceSource;
|
|
68
|
+
domain?: InferenceSource;
|
|
69
|
+
repo?: InferenceSource;
|
|
70
|
+
};
|
|
71
|
+
local: InventoryLocal;
|
|
72
|
+
findings: InventoryFinding[];
|
|
73
|
+
drifts: InventoryFinding[];
|
|
74
|
+
skipped: Array<{
|
|
75
|
+
provider: string;
|
|
76
|
+
reason: string;
|
|
77
|
+
}>;
|
|
78
|
+
summary: {
|
|
79
|
+
present: number;
|
|
80
|
+
drift: number;
|
|
81
|
+
missing: number;
|
|
82
|
+
skipped: number;
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
type InferenceSource = "manifest" | "package.json" | "git-remote" | "cname-file" | "cwd-basename" | "user" | "flag";
|
|
86
|
+
export interface RunInventoryOptions {
|
|
87
|
+
json?: boolean;
|
|
88
|
+
/** Pre-supplied identity from flags — overrides inference. */
|
|
89
|
+
input?: InventoryInput;
|
|
90
|
+
/** Skip confirmation prompts; auto-accept inferred values. */
|
|
91
|
+
yes?: boolean;
|
|
92
|
+
}
|
|
93
|
+
export declare function runInventory(cwd: string, opts?: RunInventoryOptions): Promise<void>;
|
|
94
|
+
export interface CollectInventoryOptions {
|
|
95
|
+
input?: InventoryInput;
|
|
96
|
+
/** When true, prompts the user for missing identity values and asks
|
|
97
|
+
* to confirm inferred ones. When false, takes inferred values as-is
|
|
98
|
+
* and silently skips lookups that need a value we couldn't infer. */
|
|
99
|
+
interactive?: boolean;
|
|
100
|
+
/** When true (and interactive), skip the "confirm guess" step — only
|
|
101
|
+
* prompt for fields we genuinely couldn't infer. */
|
|
102
|
+
autoAccept?: boolean;
|
|
103
|
+
}
|
|
104
|
+
export declare function collectInventory(cwd: string, opts?: CollectInventoryOptions): Promise<InventoryReport>;
|
|
105
|
+
export declare function renderInventoryHuman(report: InventoryReport): string;
|
|
106
|
+
export {};
|
|
107
|
+
//# sourceMappingURL=inventory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inventory.d.ts","sourceRoot":"","sources":["../src/inventory.ts"],"names":[],"mappings":"AAwCA,OAAO,EAAqB,KAAK,eAAe,EAAgB,MAAM,wBAAwB,CAAC;AAW/F,MAAM,WAAW,cAAc;IAC7B,0EAA0E;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qCAAqC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;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