nept-frameworks 0.1.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 +81 -0
- package/dist/framework-defaults.d.ts +514 -0
- package/dist/index.d.ts +458 -0
- package/dist/index.js +849 -0
- package/dist/lib/dockerfile-generator.d.ts +5 -0
- package/dist/lib/index.d.ts +5 -0
- package/dist/lib/next-js/next-dockerfile-generator.d.ts +2 -0
- package/dist/types/dockerfile.d.ts +24 -0
- package/dist/types/next-dockerfile.d.ts +1 -0
- package/package.json +42 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { DockerfileParams, PackageManager } from "../types/dockerfile";
|
|
2
|
+
export declare const DOCKERIGNORE = "node_modules\n.next\n.nuxt\n.output\ndist\nbuild\n.svelte-kit\n.astro\n.git\n.env*\n!.env.example\ncoverage\n*.log\n";
|
|
3
|
+
export declare const NEXT_DOCKERIGNORE = "node_modules\n.next\n.nuxt\n.output\ndist\nbuild\n.svelte-kit\n.astro\n.git\n.env*\n!.env.example\ncoverage\n*.log\n";
|
|
4
|
+
export declare function detectPackageManager(projectDir?: string): PackageManager;
|
|
5
|
+
export declare function generateDockerfile(params: DockerfileParams): string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { detectPackageManager, DOCKERIGNORE, generateDockerfile, NEXT_DOCKERIGNORE, } from "./dockerfile-generator";
|
|
2
|
+
export { generateNextDockerfile } from "./next-js/next-dockerfile-generator";
|
|
3
|
+
export { FRAMEWORK_DEFAULTS } from "../framework-defaults";
|
|
4
|
+
export type { FrameworkDefault, FrameworkId, FrameworkStatus, StackType, } from "../framework-defaults";
|
|
5
|
+
export type { CustomDockerPlan, DockerfileParams, Framework, NextDockerfileParams, PackageManager, Runtime, } from "../types/dockerfile";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type Framework = "next" | "nuxt" | "astro" | "sveltekit" | "remix" | "qwik" | "express" | "nest" | "fastify" | "koa" | "deno" | "bun" | "django" | "flask" | "fastapi" | "python" | "go" | "gin" | "echo" | "rust" | "actix" | "rocket" | "java" | "springBoot" | "quarkus" | "ruby" | "rails" | "php" | "laravel" | "symfony" | "csharp" | "aspnet" | "other";
|
|
2
|
+
export type PackageManager = "bun" | "npm" | "pnpm" | "yarn";
|
|
3
|
+
export type Runtime = "bun" | "custom" | "deno" | "dotnet" | "go" | "java" | "node" | "php" | "python" | "ruby" | "rust";
|
|
4
|
+
export interface CustomDockerPlan {
|
|
5
|
+
buildImage: string;
|
|
6
|
+
runtimeImage: string;
|
|
7
|
+
installCommand?: string;
|
|
8
|
+
buildCommand: string;
|
|
9
|
+
artifacts: readonly (readonly [source: string, destination: string])[];
|
|
10
|
+
command: readonly [string, ...string[]];
|
|
11
|
+
port: number;
|
|
12
|
+
user: string;
|
|
13
|
+
}
|
|
14
|
+
export interface DockerfileParams {
|
|
15
|
+
outputDir: string | null;
|
|
16
|
+
installCMD: string | null;
|
|
17
|
+
buildCMD: string[] | null;
|
|
18
|
+
runCMD: string | null;
|
|
19
|
+
cmd: string | null;
|
|
20
|
+
envVars: Record<string, string>;
|
|
21
|
+
version: string;
|
|
22
|
+
framework: string;
|
|
23
|
+
}
|
|
24
|
+
export type NextDockerfileParams = Omit<DockerfileParams, "framework">;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { NextDockerfileParams, PackageManager, Runtime, } from "./dockerfile";
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "nept-frameworks",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Generate production Dockerfiles for backend and full-stack frameworks.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md"
|
|
18
|
+
],
|
|
19
|
+
"sideEffects": false,
|
|
20
|
+
"keywords": [
|
|
21
|
+
"docker",
|
|
22
|
+
"dockerfile",
|
|
23
|
+
"frameworks",
|
|
24
|
+
"deployment",
|
|
25
|
+
"containers"
|
|
26
|
+
],
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public"
|
|
29
|
+
},
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "bun build src/index.ts --outdir dist --target node --format esm && tsc -p tsconfig.build.json",
|
|
32
|
+
"prepack": "bun run build",
|
|
33
|
+
"test": "bun test",
|
|
34
|
+
"test:unit": "bun test tests/dockerfile.test.ts",
|
|
35
|
+
"test:docker": "bun test tests/docker.test.ts",
|
|
36
|
+
"typecheck": "tsc --noEmit"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@types/bun": "latest",
|
|
40
|
+
"typescript": "^5.9.3"
|
|
41
|
+
}
|
|
42
|
+
}
|