@cloudnux/cli 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/.deploy/aws/http/main.tf +35 -0
- package/.deploy/aws/http/variables.tf +22 -0
- package/.deploy/aws/scheduler/main.tf +47 -0
- package/.deploy/aws/scheduler/variables.tf +21 -0
- package/.deploy/aws/sqs/main.tf +38 -0
- package/.deploy/aws/sqs/variables.tf +27 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +1130 -0
- package/dist/schema/entrypoint.schema.json +131 -0
- package/dist/schema/epf.schema.json +134 -0
- package/dist/schema/schema.json +134 -0
- package/dist/templates/cloud/WIP.ts.ejs +564 -0
- package/dist/templates/cloud/entrypoint-build.ts.ejs +53 -0
- package/dist/templates/cloud/entrypoint-triggers.tf.ejs +67 -0
- package/dist/templates/cloude/entrypoint-build.ts.ejs +50 -0
- package/dist/templates/cloude/entrypoint-triggers.tf.ejs +67 -0
- package/dist/templates/develop.ts.ejs +63 -0
- package/dist/templates/entrypoint-build.ts.ejs +50 -0
- package/dist/templates/entrypoint-develop.ts.ejs +120 -0
- package/dist/templates/entrypoint-triggers.tf.ejs +67 -0
- package/dist/templates/local/dev-server.ts.ejs +106 -0
- package/dist/templates/local/module.ts.ejs +77 -0
- package/dist/templates/local/triggers/http.ts.ejs +33 -0
- package/dist/templates/local/triggers/schedule.ts.ejs +15 -0
- package/package.json +58 -0
- package/readme.md +137 -0
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cloudnux/cli",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"bin": {
|
|
6
|
+
"epf": "dist/cli.js"
|
|
7
|
+
},
|
|
8
|
+
"type": "module",
|
|
9
|
+
"engines": {
|
|
10
|
+
"node": ">=22"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"develop": "tsup --watch && chmod +x dist/cli.js",
|
|
14
|
+
"build": "tsup && chmod +x dist/cli.js",
|
|
15
|
+
"link": "yarn link"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
".deploy",
|
|
19
|
+
"dist",
|
|
20
|
+
"pakage.json",
|
|
21
|
+
"README.md"
|
|
22
|
+
],
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@inkjs/ui": "^2.0.0",
|
|
25
|
+
"@types/findup-sync": "^4.0.5",
|
|
26
|
+
"ejs": "^3.1.10",
|
|
27
|
+
"fast-glob": "^3.3.2",
|
|
28
|
+
"fastify": "^5.2.1",
|
|
29
|
+
"fastify-raw-body": "^5.0.0",
|
|
30
|
+
"findup-sync": "^5.0.0",
|
|
31
|
+
"immer": "^10.1.1",
|
|
32
|
+
"ink": "^4.1.0",
|
|
33
|
+
"ink-spinner": "^5.0.0",
|
|
34
|
+
"interpret": "^3.1.1",
|
|
35
|
+
"jsonwebtoken": "^9.0.2",
|
|
36
|
+
"meow": "^11.0.0",
|
|
37
|
+
"pino-pretty": "^13.0.0",
|
|
38
|
+
"react": "^18.2.0",
|
|
39
|
+
"rechoir": "^0.8.0",
|
|
40
|
+
"tsup": "^8.3.5",
|
|
41
|
+
"zustand": "^5.0.2"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@types/ejs": "^3.1.5",
|
|
45
|
+
"@types/findup-sync": "^4.0.5",
|
|
46
|
+
"@types/jsonwebtoken": "^9.0.7",
|
|
47
|
+
"@types/react": "^18.0.32",
|
|
48
|
+
"@types/rechoir": "^0.6.4",
|
|
49
|
+
"chalk": "^5.2.0",
|
|
50
|
+
"ink-testing-library": "^4.0.0",
|
|
51
|
+
"react-devtools-core": "^6.0.1",
|
|
52
|
+
"typescript": "^5.0.3"
|
|
53
|
+
},
|
|
54
|
+
"publishConfig": {
|
|
55
|
+
"access": "public",
|
|
56
|
+
"registry": "https://registry.npmjs.org/"
|
|
57
|
+
}
|
|
58
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# EntryPoint Framework CLI
|
|
2
|
+
|
|
3
|
+
A task-based CLI framework for managing cloud function deployments and local development.
|
|
4
|
+
|
|
5
|
+
## Configuration
|
|
6
|
+
|
|
7
|
+
Create an
|
|
8
|
+
|
|
9
|
+
`epf.config.js` or `.epfrc.js` in your project root:
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export default {
|
|
13
|
+
// Path to modules containing entrypoint.json files
|
|
14
|
+
modulesPath: './packages/modules/**/entrypoint.json',
|
|
15
|
+
|
|
16
|
+
// Cloud provider: 'aws', 'azure', or 'gcp'
|
|
17
|
+
cloudProvider: 'aws',
|
|
18
|
+
|
|
19
|
+
// Build output directory
|
|
20
|
+
workingDir: './.epf',
|
|
21
|
+
|
|
22
|
+
// Environment configurations
|
|
23
|
+
environments: {
|
|
24
|
+
develop: {
|
|
25
|
+
// Development environment tasks
|
|
26
|
+
tasks: [],
|
|
27
|
+
// Optional watch task for development
|
|
28
|
+
watch: {
|
|
29
|
+
title: "Dev Server",
|
|
30
|
+
action: async () => {
|
|
31
|
+
// Development server logic
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
prod: {
|
|
36
|
+
// Production deployment tasks
|
|
37
|
+
tasks: []
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Task System
|
|
44
|
+
|
|
45
|
+
Tasks are the core building blocks of EPF workflows. Each task has:
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
{
|
|
49
|
+
// Task display name or function returning name
|
|
50
|
+
title: string | ((params) => string),
|
|
51
|
+
|
|
52
|
+
// Optional skip condition
|
|
53
|
+
skip?: (params) => boolean,
|
|
54
|
+
|
|
55
|
+
// Main task action
|
|
56
|
+
action: (params, executeSubTasks?) => Promise<any>,
|
|
57
|
+
|
|
58
|
+
// Optional subtasks
|
|
59
|
+
children?: Task[]
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## CLI Usage
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# Run with environment
|
|
67
|
+
epf <environment>
|
|
68
|
+
|
|
69
|
+
# Specify config file
|
|
70
|
+
epf <environment> --config=./custom-config.js
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Environments
|
|
74
|
+
|
|
75
|
+
Each environment (
|
|
76
|
+
|
|
77
|
+
develop
|
|
78
|
+
|
|
79
|
+
,
|
|
80
|
+
|
|
81
|
+
prod
|
|
82
|
+
|
|
83
|
+
, etc) can define:
|
|
84
|
+
|
|
85
|
+
-
|
|
86
|
+
|
|
87
|
+
tasks
|
|
88
|
+
|
|
89
|
+
: Array of tasks to execute
|
|
90
|
+
-
|
|
91
|
+
|
|
92
|
+
watch
|
|
93
|
+
|
|
94
|
+
: Optional development server task
|
|
95
|
+
- Custom environment parameters
|
|
96
|
+
|
|
97
|
+
## Development Mode
|
|
98
|
+
|
|
99
|
+
The
|
|
100
|
+
|
|
101
|
+
watch
|
|
102
|
+
|
|
103
|
+
task enables development mode with:
|
|
104
|
+
|
|
105
|
+
- Real-time logs
|
|
106
|
+
- Local development server
|
|
107
|
+
- Hot reload capability
|
|
108
|
+
- Process runs until terminated
|
|
109
|
+
|
|
110
|
+
## Task Parameters
|
|
111
|
+
|
|
112
|
+
Tasks receive parameters including:
|
|
113
|
+
|
|
114
|
+
```typescript
|
|
115
|
+
{
|
|
116
|
+
modulesPath: string, // Path to modules
|
|
117
|
+
cloudProvider: string, // Selected cloud provider
|
|
118
|
+
workingDir: string, // Build output directory
|
|
119
|
+
environment: string, // Current environment name
|
|
120
|
+
// ...environment specific params
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Project Structure
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
.
|
|
128
|
+
├── epf.config.js # CLI configuration
|
|
129
|
+
├── packages/
|
|
130
|
+
│ └── modules/ # Function modules
|
|
131
|
+
│ └── */
|
|
132
|
+
│ └── entrypoint.json # Module definition
|
|
133
|
+
└── .epf/ # Build artifacts
|
|
134
|
+
└── <environment>/ # Environment builds
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
This CLI provides a structured way to manage cloud function development and deployment workflows across different environments and cloud providers.
|