@eventuras/app-config 0.1.4
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 +423 -0
- package/dist/cli.d.ts +7 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +29 -0
- package/dist/cli.js.map +1 -0
- package/dist/clientside.d.ts +97 -0
- package/dist/clientside.d.ts.map +1 -0
- package/dist/clientside.js +94 -0
- package/dist/clientside.js.map +1 -0
- package/dist/generator.d.ts +18 -0
- package/dist/generator.d.ts.map +1 -0
- package/dist/generator.js +48 -0
- package/dist/generator.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +277 -0
- package/dist/index.js.map +1 -0
- package/dist/loader.d.ts +59 -0
- package/dist/loader.d.ts.map +1 -0
- package/dist/next.d.ts +28 -0
- package/dist/next.d.ts.map +1 -0
- package/dist/types.d.ts +98 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/validator.d.ts +18 -0
- package/dist/validator.d.ts.map +1 -0
- package/package.json +64 -0
- package/schema/app-config.schema.json +98 -0
package/package.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@eventuras/app-config",
|
|
3
|
+
"version": "0.1.4",
|
|
4
|
+
"description": "Declarative environment configuration for Eventuras applications",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"eventuras",
|
|
7
|
+
"config",
|
|
8
|
+
"environment",
|
|
9
|
+
"validation"
|
|
10
|
+
],
|
|
11
|
+
"homepage": "https://github.com/losol/origo/tree/main/packages/app-config#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/losol/origo/issues"
|
|
14
|
+
},
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/losol/origo.git",
|
|
18
|
+
"directory": "packages/app-config"
|
|
19
|
+
},
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"type": "module",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"import": "./dist/index.js"
|
|
26
|
+
},
|
|
27
|
+
"./clientside": {
|
|
28
|
+
"types": "./dist/clientside.d.ts",
|
|
29
|
+
"import": "./dist/clientside.js"
|
|
30
|
+
},
|
|
31
|
+
"./generator": {
|
|
32
|
+
"types": "./dist/generator.d.ts",
|
|
33
|
+
"import": "./dist/generator.js"
|
|
34
|
+
},
|
|
35
|
+
"./schema": "./schema/app-config.schema.json"
|
|
36
|
+
},
|
|
37
|
+
"main": "./dist/index.js",
|
|
38
|
+
"module": "./dist/index.js",
|
|
39
|
+
"types": "./dist/index.d.ts",
|
|
40
|
+
"bin": {
|
|
41
|
+
"generate-config-types": "./dist/cli.js"
|
|
42
|
+
},
|
|
43
|
+
"files": [
|
|
44
|
+
"dist",
|
|
45
|
+
"schema"
|
|
46
|
+
],
|
|
47
|
+
"scripts": {
|
|
48
|
+
"build": "vite build",
|
|
49
|
+
"dev": "vite build --watch",
|
|
50
|
+
"lint": "eslint src",
|
|
51
|
+
"typecheck": "tsc --noEmit"
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"zod": "^4.3.6"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@eventuras/eslint-config": "workspace:*",
|
|
58
|
+
"@eventuras/typescript-config": "workspace:*",
|
|
59
|
+
"@eventuras/vite-config": "workspace:*",
|
|
60
|
+
"@types/node": "^24.12.0",
|
|
61
|
+
"typescript": "^6.0.2",
|
|
62
|
+
"vite": "^8.1.0"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://eventuras.dev/schema/app-config.schema.json",
|
|
4
|
+
"title": "Eventuras App Configuration",
|
|
5
|
+
"description": "Schema for Eventuras application configuration including environment variables",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["name", "type", "env"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "JSON Schema reference"
|
|
12
|
+
},
|
|
13
|
+
"name": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "Application package name (e.g., @eventuras/web)",
|
|
16
|
+
"pattern": "^@eventuras/[a-z0-9-]+$"
|
|
17
|
+
},
|
|
18
|
+
"type": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"enum": ["app"],
|
|
21
|
+
"description": "Configuration type (currently only 'app' is supported)"
|
|
22
|
+
},
|
|
23
|
+
"description": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"description": "Human-readable description of the application"
|
|
26
|
+
},
|
|
27
|
+
"env": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"description": "Environment variable definitions",
|
|
30
|
+
"additionalProperties": {
|
|
31
|
+
"$ref": "#/definitions/envVar"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"build": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"description": "Build configuration",
|
|
37
|
+
"properties": {
|
|
38
|
+
"outDir": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"description": "Output directory for build artifacts"
|
|
41
|
+
},
|
|
42
|
+
"target": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"description": "ECMAScript target version"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"runtime": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"description": "Runtime configuration",
|
|
51
|
+
"properties": {
|
|
52
|
+
"port": {
|
|
53
|
+
"type": "number",
|
|
54
|
+
"description": "Default port for the application"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"definitions": {
|
|
60
|
+
"envVar": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"required": ["required", "client", "type", "description"],
|
|
63
|
+
"properties": {
|
|
64
|
+
"required": {
|
|
65
|
+
"type": "boolean",
|
|
66
|
+
"description": "Whether this environment variable is required"
|
|
67
|
+
},
|
|
68
|
+
"client": {
|
|
69
|
+
"type": "boolean",
|
|
70
|
+
"description": "Whether this variable is exposed to the client (NEXT_PUBLIC_* in Next.js)"
|
|
71
|
+
},
|
|
72
|
+
"type": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"enum": ["string", "url", "int", "bool", "json"],
|
|
75
|
+
"description": "Expected type of the environment variable"
|
|
76
|
+
},
|
|
77
|
+
"description": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"description": "Human-readable description of the variable's purpose"
|
|
80
|
+
},
|
|
81
|
+
"default": {
|
|
82
|
+
"description": "Default value if not provided"
|
|
83
|
+
},
|
|
84
|
+
"pattern": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"description": "Regular expression pattern for validation"
|
|
87
|
+
},
|
|
88
|
+
"enum": {
|
|
89
|
+
"type": "array",
|
|
90
|
+
"items": {
|
|
91
|
+
"type": "string"
|
|
92
|
+
},
|
|
93
|
+
"description": "Allowed values"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|