enact-cli 1.0.10 → 1.0.11
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 +36 -2
- package/dist/index.js +1521 -134
- package/dist/index.js.bak +1521 -134
- package/dist/mcp-server.js +3006 -303
- package/dist/mcp-server.js.bak +3006 -303
- package/dist/web/static/app.js +591 -0
- package/dist/web/static/index.html +117 -0
- package/dist/web/static/style.css +287 -0
- package/package.json +4 -3
- package/src/web/static/app.js +591 -0
- package/src/web/static/index.html +117 -0
- package/src/web/static/style.css +287 -0
- package/dist/enact +0 -0
- package/dist/enact-linux +0 -0
- package/dist/enact-macos +0 -0
- package/dist/enact-windows.exe +0 -0
- package/dist/lib/enact-direct.js +0 -8223
- package/dist/mcp-direct.js +0 -21593
- package/dist/mcp-direct.js.bak +0 -21593
- package/dist/mcp-entry.js +0 -21665
- package/dist/mcp-entry.js.bak +0 -21665
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Enact Environment Manager</title>
|
|
7
|
+
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🌐</text></svg>">
|
|
8
|
+
<link rel="stylesheet" href="/style.css">
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<header>
|
|
12
|
+
<h1>Enact Environment Manager</h1>
|
|
13
|
+
<p class="subtitle">Manage environment variables by package namespace (~/.enact/env/)</p>
|
|
14
|
+
</header>
|
|
15
|
+
|
|
16
|
+
<div id="notification" class="notification"></div>
|
|
17
|
+
|
|
18
|
+
<!-- Bulk Variables Modal -->
|
|
19
|
+
<div id="bulk-modal" class="modal">
|
|
20
|
+
<div class="modal-content">
|
|
21
|
+
<div class="modal-header">
|
|
22
|
+
<h2>Add Multiple Environment Variables</h2>
|
|
23
|
+
<span class="close-modal" id="close-modal">×</span>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<form id="bulk-form" class="modal-form">
|
|
27
|
+
<div id="bulk-variables-container">
|
|
28
|
+
<!-- Dynamically populated fields will go here -->
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<div class="modal-actions">
|
|
32
|
+
<button type="button" id="cancel-bulk">Cancel</button>
|
|
33
|
+
<button type="submit" id="save-bulk">Save All</button>
|
|
34
|
+
</div>
|
|
35
|
+
</form>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<div class="path-display">
|
|
40
|
+
Environment Directory: <span id="env-path">~/.enact/env/</span>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<div class="packages-container">
|
|
44
|
+
<div class="package-list">
|
|
45
|
+
<h2>Package Namespaces</h2>
|
|
46
|
+
<div id="package-list-content">
|
|
47
|
+
<div class="loading">Loading packages...</div>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<div class="new-package-form">
|
|
51
|
+
<h3>Create New Package</h3>
|
|
52
|
+
<div class="form-group">
|
|
53
|
+
<label for="new-package-namespace">Package Namespace</label>
|
|
54
|
+
<input type="text" id="new-package-namespace" placeholder="e.g., org/package/subpackage">
|
|
55
|
+
</div>
|
|
56
|
+
<button id="create-package-btn">Create Package</button>
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
<div class="new-package-form">
|
|
60
|
+
<h3>Generate Configuration Link</h3>
|
|
61
|
+
<p>Create a shareable link with multiple configuration variables to be filled in. The recipient can either select an existing package or create a new one.</p>
|
|
62
|
+
|
|
63
|
+
<div class="form-group">
|
|
64
|
+
<label for="vars-input">Variable Keys (one per line or comma-separated)</label>
|
|
65
|
+
<textarea id="vars-input" style="width: 100%; height: 80px; padding: 8px; border: 1px solid #ddd; border-radius: 4px; resize: vertical;" placeholder="API_KEY DATABASE_URL PASSWORD"></textarea>
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
<div class="form-group">
|
|
69
|
+
<label for="package-input">Target Package (optional)</label>
|
|
70
|
+
<input type="text" id="package-input" placeholder="org/package/subpackage">
|
|
71
|
+
<small style="color: #666; font-size: 0.9em;">If specified, variables will be pre-assigned to this package. If not, recipient can choose.</small>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<button id="generate-link-btn">Generate Link</button>
|
|
75
|
+
|
|
76
|
+
<div id="link-output-container" style="display: none; margin-top: 15px;">
|
|
77
|
+
<div style="background-color: #f1f1f1; padding: 10px; border-radius: 4px; font-family: monospace; word-break: break-all; margin-bottom: 10px;" id="link-output"></div>
|
|
78
|
+
<button id="copy-link-btn">Copy Link</button>
|
|
79
|
+
<div style="margin-top: 10px; font-size: 0.9em; color: #666;">
|
|
80
|
+
<strong>Usage:</strong> Send this link to someone who needs to configure these environment variables. They can paste values and either select an existing package or create a new one.
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
|
|
86
|
+
<div class="package-detail">
|
|
87
|
+
<div class="package-header">
|
|
88
|
+
<h2 id="selected-package-title">Select a Package</h2>
|
|
89
|
+
</div>
|
|
90
|
+
|
|
91
|
+
<div id="package-detail-content">
|
|
92
|
+
<div class="empty-state">
|
|
93
|
+
<p>Select a package from the list to view and manage its environment variables</p>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
<div id="add-var-form" style="display: none;">
|
|
98
|
+
<h3>Add/Update Environment Variable</h3>
|
|
99
|
+
<form id="env-var-form">
|
|
100
|
+
<div class="form-group">
|
|
101
|
+
<label for="var-key">Variable Name</label>
|
|
102
|
+
<input type="text" id="var-key" name="key" required>
|
|
103
|
+
</div>
|
|
104
|
+
<div class="form-group">
|
|
105
|
+
<label for="var-value">Variable Value</label>
|
|
106
|
+
<input type="text" id="var-value" name="value" required>
|
|
107
|
+
</div>
|
|
108
|
+
<button type="submit">Save Variable</button>
|
|
109
|
+
<button type="button" id="clear-form-btn">Clear</button>
|
|
110
|
+
</form>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
<script src="/app.js"></script>
|
|
116
|
+
</body>
|
|
117
|
+
</html>
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
/* Enact Environment Manager Styles */
|
|
2
|
+
body {
|
|
3
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
|
4
|
+
line-height: 1.6;
|
|
5
|
+
color: #333;
|
|
6
|
+
max-width: 1400px;
|
|
7
|
+
margin: 0 auto;
|
|
8
|
+
padding: 20px;
|
|
9
|
+
background-color: #f7f9fc;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
header {
|
|
13
|
+
margin-bottom: 30px;
|
|
14
|
+
border-bottom: 1px solid #e1e4e8;
|
|
15
|
+
padding-bottom: 10px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
h1 {
|
|
19
|
+
color: #2c3e50;
|
|
20
|
+
margin-bottom: 5px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.subtitle {
|
|
24
|
+
color: #7f8c8d;
|
|
25
|
+
font-size: 1rem;
|
|
26
|
+
margin-top: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.path-display {
|
|
30
|
+
background-color: #f1f1f1;
|
|
31
|
+
padding: 10px;
|
|
32
|
+
border-radius: 4px;
|
|
33
|
+
margin-bottom: 20px;
|
|
34
|
+
font-family: monospace;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.packages-container {
|
|
38
|
+
display: grid;
|
|
39
|
+
grid-template-columns: 1fr 2fr;
|
|
40
|
+
gap: 20px;
|
|
41
|
+
margin-bottom: 30px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.package-list {
|
|
45
|
+
background-color: white;
|
|
46
|
+
border-radius: 8px;
|
|
47
|
+
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
|
|
48
|
+
padding: 20px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.package-detail {
|
|
52
|
+
background-color: white;
|
|
53
|
+
border-radius: 8px;
|
|
54
|
+
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
|
|
55
|
+
padding: 20px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.package-item {
|
|
59
|
+
padding: 10px;
|
|
60
|
+
margin: 5px 0;
|
|
61
|
+
border-radius: 4px;
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
border-left: 4px solid transparent;
|
|
64
|
+
transition: all 0.2s ease;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.package-item:hover {
|
|
68
|
+
background-color: #f6f8fa;
|
|
69
|
+
border-left-color: #3498db;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.package-item.active {
|
|
73
|
+
background-color: #e3f2fd;
|
|
74
|
+
border-left-color: #2196f3;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.package-name {
|
|
78
|
+
font-weight: 500;
|
|
79
|
+
color: #2c3e50;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.package-path {
|
|
83
|
+
font-size: 0.85em;
|
|
84
|
+
color: #7f8c8d;
|
|
85
|
+
font-family: monospace;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.package-var-count {
|
|
89
|
+
font-size: 0.8em;
|
|
90
|
+
color: #666;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.form-group {
|
|
94
|
+
margin-bottom: 15px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
label {
|
|
98
|
+
display: block;
|
|
99
|
+
margin-bottom: 5px;
|
|
100
|
+
font-weight: 500;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
input[type="text"], select {
|
|
104
|
+
width: 100%;
|
|
105
|
+
padding: 8px 10px;
|
|
106
|
+
border: 1px solid #ddd;
|
|
107
|
+
border-radius: 4px;
|
|
108
|
+
font-size: 1rem;
|
|
109
|
+
box-sizing: border-box;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
button {
|
|
113
|
+
background-color: #3498db;
|
|
114
|
+
color: white;
|
|
115
|
+
border: none;
|
|
116
|
+
padding: 10px 15px;
|
|
117
|
+
border-radius: 4px;
|
|
118
|
+
cursor: pointer;
|
|
119
|
+
font-size: 1rem;
|
|
120
|
+
margin-right: 10px;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
button:hover {
|
|
124
|
+
background-color: #2980b9;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
button.delete {
|
|
128
|
+
background-color: #e74c3c;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
button.delete:hover {
|
|
132
|
+
background-color: #c0392b;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
button.view {
|
|
136
|
+
background-color: #2ecc71;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
button.view:hover {
|
|
140
|
+
background-color: #27ae60;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
button.hide {
|
|
144
|
+
background-color: #f39c12;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
button.hide:hover {
|
|
148
|
+
background-color: #d35400;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
table {
|
|
152
|
+
width: 100%;
|
|
153
|
+
border-collapse: collapse;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
th, td {
|
|
157
|
+
text-align: left;
|
|
158
|
+
padding: 12px;
|
|
159
|
+
border-bottom: 1px solid #e1e4e8;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
th {
|
|
163
|
+
background-color: #f6f8fa;
|
|
164
|
+
font-weight: 600;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
tr:hover {
|
|
168
|
+
background-color: #f6f8fa;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.actions {
|
|
172
|
+
display: flex;
|
|
173
|
+
gap: 10px;
|
|
174
|
+
white-space: nowrap;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.notification {
|
|
178
|
+
padding: 10px 15px;
|
|
179
|
+
margin-bottom: 20px;
|
|
180
|
+
border-radius: 4px;
|
|
181
|
+
color: white;
|
|
182
|
+
opacity: 0;
|
|
183
|
+
transition: opacity 0.3s ease;
|
|
184
|
+
position: fixed;
|
|
185
|
+
top: 20px;
|
|
186
|
+
right: 20px;
|
|
187
|
+
z-index: 1000;
|
|
188
|
+
min-width: 300px;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.notification.success {
|
|
192
|
+
background-color: #2ecc71;
|
|
193
|
+
opacity: 1;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.notification.error {
|
|
197
|
+
background-color: #e74c3c;
|
|
198
|
+
opacity: 1;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.empty-state {
|
|
202
|
+
text-align: center;
|
|
203
|
+
color: #7f8c8d;
|
|
204
|
+
padding: 40px 0;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.value-cell {
|
|
208
|
+
position: relative;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.masked-value {
|
|
212
|
+
font-family: monospace;
|
|
213
|
+
letter-spacing: 1px;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.new-package-form {
|
|
217
|
+
border-top: 1px solid #e1e4e8;
|
|
218
|
+
padding-top: 20px;
|
|
219
|
+
margin-top: 20px;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.package-header {
|
|
223
|
+
display: flex;
|
|
224
|
+
justify-content: space-between;
|
|
225
|
+
align-items: center;
|
|
226
|
+
margin-bottom: 20px;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.loading {
|
|
230
|
+
text-align: center;
|
|
231
|
+
padding: 20px;
|
|
232
|
+
color: #7f8c8d;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.modal {
|
|
236
|
+
display: none;
|
|
237
|
+
position: fixed;
|
|
238
|
+
z-index: 1000;
|
|
239
|
+
left: 0;
|
|
240
|
+
top: 0;
|
|
241
|
+
width: 100%;
|
|
242
|
+
height: 100%;
|
|
243
|
+
background-color: rgba(0,0,0,0.5);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.modal-content {
|
|
247
|
+
background-color: white;
|
|
248
|
+
margin: 5% auto;
|
|
249
|
+
padding: 0;
|
|
250
|
+
border-radius: 8px;
|
|
251
|
+
width: 90%;
|
|
252
|
+
max-width: 600px;
|
|
253
|
+
box-shadow: 0 4px 20px rgba(0,0,0,0.3);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.modal-header {
|
|
257
|
+
padding: 20px;
|
|
258
|
+
border-bottom: 1px solid #e1e4e8;
|
|
259
|
+
display: flex;
|
|
260
|
+
justify-content: space-between;
|
|
261
|
+
align-items: center;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.modal-header h2 {
|
|
265
|
+
margin: 0;
|
|
266
|
+
color: #2c3e50;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.close-modal {
|
|
270
|
+
font-size: 28px;
|
|
271
|
+
font-weight: bold;
|
|
272
|
+
cursor: pointer;
|
|
273
|
+
color: #7f8c8d;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.close-modal:hover {
|
|
277
|
+
color: #2c3e50;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.modal-form {
|
|
281
|
+
padding: 20px;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.modal-actions {
|
|
285
|
+
margin-top: 20px;
|
|
286
|
+
text-align: right;
|
|
287
|
+
}
|
package/dist/enact
DELETED
|
Binary file
|
package/dist/enact-linux
DELETED
|
Binary file
|
package/dist/enact-macos
DELETED
|
Binary file
|
package/dist/enact-windows.exe
DELETED
|
Binary file
|