hatchkit 0.1.42 → 0.1.43
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.d.ts +77 -0
- package/dist/adopt.d.ts.map +1 -1
- package/dist/adopt.js +395 -157
- package/dist/adopt.js.map +1 -1
- package/dist/provision/s3-buckets.d.ts.map +1 -1
- package/dist/provision/s3-buckets.js +44 -24
- package/dist/provision/s3-buckets.js.map +1 -1
- package/dist/provision/write-env.d.ts +6 -0
- package/dist/provision/write-env.d.ts.map +1 -1
- package/dist/provision/write-env.js +17 -0
- package/dist/provision/write-env.js.map +1 -1
- package/dist/scaffold/build-pipeline.d.ts +26 -2
- package/dist/scaffold/build-pipeline.d.ts.map +1 -1
- package/dist/scaffold/build-pipeline.js +159 -6
- package/dist/scaffold/build-pipeline.js.map +1 -1
- package/dist/templates/build-pipeline/Dockerfile.nextjs-monorepo.hbs +107 -0
- package/dist/templates/build-pipeline/docker-compose.yml.hbs +14 -2
- package/package.json +1 -1
package/dist/adopt.d.ts
CHANGED
|
@@ -1,5 +1,82 @@
|
|
|
1
|
+
import type { Feature } from "./prompts.js";
|
|
2
|
+
import { type ProjectManifest } from "./scaffold/manifest.js";
|
|
3
|
+
export interface DetectedState {
|
|
4
|
+
/** Absolute path to the project root. */
|
|
5
|
+
projectDir: string;
|
|
6
|
+
/** package.json `name` if any. */
|
|
7
|
+
packageName?: string;
|
|
8
|
+
/** package.json `description` if any. Used as the default for the
|
|
9
|
+
* Coolify project / app description prompt so a project that
|
|
10
|
+
* already has a one-liner doesn't have to type it again. */
|
|
11
|
+
packageDescription?: string;
|
|
12
|
+
/** Whether `<root>/.hatchkit.json` already exists — adopt refuses
|
|
13
|
+
* to overwrite; the user should run `hatchkit update` instead. */
|
|
14
|
+
hasManifest: boolean;
|
|
15
|
+
/** Where the server's env files live, if detectable. */
|
|
16
|
+
serverDir?: string;
|
|
17
|
+
/** Where the client's env files live, if detectable. */
|
|
18
|
+
clientDir?: string;
|
|
19
|
+
/** True when the project root looks like a workspace / monorepo (a
|
|
20
|
+
* `pnpm-workspace.yaml`, a root `package.json#workspaces` field, or
|
|
21
|
+
* one of the popular orchestrator manifests — turbo.json, lerna.json,
|
|
22
|
+
* rush.json) BUT none of the conventional server/client dirs matched.
|
|
23
|
+
*
|
|
24
|
+
* This is the layout that breaks the scaffolded build pipeline: the
|
|
25
|
+
* Dockerfile templates assume a single-package project rooted at /,
|
|
26
|
+
* so for an unrecognised workspace they'd `pnpm install` an empty
|
|
27
|
+
* surface and `pnpm build` whatever the root script does — almost
|
|
28
|
+
* never the user's intent. When this is true, adopt defaults the
|
|
29
|
+
* pipeline scaffold OFF and parks the cursor on the row so the user
|
|
30
|
+
* has to opt-in explicitly. */
|
|
31
|
+
unknownWorkspaceLayout: boolean;
|
|
32
|
+
/** When `unknownWorkspaceLayout` is true, plausible standalone build
|
|
33
|
+
* directories found inside the project — first-level subdirs that
|
|
34
|
+
* carry their own `package.json` + lockfile, optionally with
|
|
35
|
+
* `.npmrc:ignore-workspace=true` (the docs/marketing-site pattern).
|
|
36
|
+
* Surfaced as a hint in the detection summary so the user knows
|
|
37
|
+
* where to point a hand-authored Dockerfile. */
|
|
38
|
+
standaloneBuildCandidates: Array<{
|
|
39
|
+
dir: string;
|
|
40
|
+
hasIgnoreWorkspace: boolean;
|
|
41
|
+
}>;
|
|
42
|
+
/** Detected feature flags (best-guess from package deps + .env keys). */
|
|
43
|
+
features: Feature[];
|
|
44
|
+
/** True if `<serverDir>/.env.production` opens with a DOTENV_PUBLIC_KEY
|
|
45
|
+
* header — the marker dotenvx writes when encrypting. */
|
|
46
|
+
prodEnvIsEncrypted: boolean;
|
|
47
|
+
/** True if a `.env.keys` file is present at <serverDir>. */
|
|
48
|
+
hasEnvKeys: boolean;
|
|
49
|
+
/** Coolify app name match, if any. */
|
|
50
|
+
coolifyAppMatch?: {
|
|
51
|
+
uuid: string;
|
|
52
|
+
name: string;
|
|
53
|
+
};
|
|
54
|
+
/** Whether Coolify is configured. When false, all `coolify*` checks
|
|
55
|
+
* below were skipped — the absence of a value doesn't mean "missing",
|
|
56
|
+
* it means "we didn't ask". */
|
|
57
|
+
coolifyConfigured: boolean;
|
|
58
|
+
/** Count of Coolify GitHub App sources. Required for private-repo
|
|
59
|
+
* app creation; zero means wireCoolify will fail with a clear
|
|
60
|
+
* hint when `setupGitHub === true`. Undefined when Coolify isn't
|
|
61
|
+
* configured at all. */
|
|
62
|
+
coolifyGithubSourceCount?: number;
|
|
63
|
+
/** Whether `<projectDir>/.git` exists. */
|
|
64
|
+
isGitRepo: boolean;
|
|
65
|
+
/** Origin URL from `git remote get-url origin`, if set. */
|
|
66
|
+
gitRemoteUrl?: string;
|
|
67
|
+
/** Visibility of the GitHub repo at `gitRemoteUrl`, when we can
|
|
68
|
+
* resolve it via `gh repo view`. Undefined when no remote is set,
|
|
69
|
+
* gh isn't authed, or the repo isn't on GitHub. Drives the default
|
|
70
|
+
* for the AdoptPlan.isPrivate stepper choice. */
|
|
71
|
+
gitRemoteIsPrivate?: boolean;
|
|
72
|
+
/** Parsed `.hatchkit.json` if a previous adopt/scaffold landed
|
|
73
|
+
* one. Used by `--resume` to pre-fill the stepper with the values
|
|
74
|
+
* the user already chose, instead of starting from blank. */
|
|
75
|
+
existingManifest?: ProjectManifest;
|
|
76
|
+
}
|
|
1
77
|
export declare function runAdopt(cwd: string, opts?: {
|
|
2
78
|
resume?: boolean;
|
|
3
79
|
regeneratePipeline?: boolean;
|
|
4
80
|
}): Promise<void>;
|
|
81
|
+
export declare function detectProject(projectDir: string): Promise<DetectedState>;
|
|
5
82
|
//# sourceMappingURL=adopt.d.ts.map
|
package/dist/adopt.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adopt.d.ts","sourceRoot":"","sources":["../src/adopt.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"adopt.d.ts","sourceRoot":"","sources":["../src/adopt.ts"],"names":[],"m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