@easel-sh/cli 0.1.0-alpha.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/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +195 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/create-lambda-gateway.d.ts +11 -0
- package/dist/commands/create-lambda-gateway.d.ts.map +1 -0
- package/dist/commands/create-lambda-gateway.js +409 -0
- package/dist/commands/create-lambda-gateway.js.map +1 -0
- package/dist/commands/generate-manifest.d.ts +7 -0
- package/dist/commands/generate-manifest.d.ts.map +1 -0
- package/dist/commands/generate-manifest.js +145 -0
- package/dist/commands/generate-manifest.js.map +1 -0
- package/dist/commands/list-functions.d.ts +7 -0
- package/dist/commands/list-functions.d.ts.map +1 -0
- package/dist/commands/list-functions.js +140 -0
- package/dist/commands/list-functions.js.map +1 -0
- package/dist/commands/package-functions.d.ts +9 -0
- package/dist/commands/package-functions.d.ts.map +1 -0
- package/dist/commands/package-functions.js +292 -0
- package/dist/commands/package-functions.js.map +1 -0
- package/dist/commands/upload-manifest.d.ts +7 -0
- package/dist/commands/upload-manifest.d.ts.map +1 -0
- package/dist/commands/upload-manifest.js +53 -0
- package/dist/commands/upload-manifest.js.map +1 -0
- package/dist/commands/upload-static.d.ts +7 -0
- package/dist/commands/upload-static.d.ts.map +1 -0
- package/dist/commands/upload-static.js +142 -0
- package/dist/commands/upload-static.js.map +1 -0
- package/dist/utils/types.d.ts +38 -0
- package/dist/utils/types.d.ts.map +1 -0
- package/dist/utils/types.js +2 -0
- package/dist/utils/types.js.map +1 -0
- package/dist/utils/vercel-config.d.ts +60 -0
- package/dist/utils/vercel-config.d.ts.map +1 -0
- package/dist/utils/vercel-config.js +121 -0
- package/dist/utils/vercel-config.js.map +1 -0
- package/dist/utils.d.ts +31 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +263 -0
- package/dist/utils.js.map +1 -0
- package/package.json +26 -0
package/dist/utils.js
ADDED
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import * as fs from 'fs';
|
|
2
|
+
import * as path from 'path';
|
|
3
|
+
import * as crypto from 'crypto';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
5
|
+
/**
|
|
6
|
+
* Resolve the Vercel output directory from a given path
|
|
7
|
+
* Handles cases where the path points to:
|
|
8
|
+
* - .vercel/output (use as-is)
|
|
9
|
+
* - .vercel (append 'output')
|
|
10
|
+
* - project root or other (append '.vercel/output')
|
|
11
|
+
*/
|
|
12
|
+
export function resolveVercelOutputDir(inputDir) {
|
|
13
|
+
const resolvedDir = path.resolve(inputDir);
|
|
14
|
+
const normalized = resolvedDir.replace(/\\/g, '/'); // Normalize for cross-platform
|
|
15
|
+
if (normalized.endsWith('/.vercel/output') || normalized.endsWith('\\.vercel\\output')) {
|
|
16
|
+
// Already pointing to .vercel/output, use as-is
|
|
17
|
+
return resolvedDir;
|
|
18
|
+
}
|
|
19
|
+
else if (normalized.endsWith('/.vercel') || normalized.endsWith('\\.vercel')) {
|
|
20
|
+
// Points to .vercel directory, append 'output'
|
|
21
|
+
return path.join(resolvedDir, 'output');
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
// Points to project root or something else, append '.vercel/output'
|
|
25
|
+
return path.join(resolvedDir, '.vercel', 'output');
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Find the workspace root (where the Next.js app is located)
|
|
30
|
+
*/
|
|
31
|
+
export function findWorkspaceRoot() {
|
|
32
|
+
// Get the current file's directory
|
|
33
|
+
let currentDir;
|
|
34
|
+
try {
|
|
35
|
+
// Handle ESM (import.meta.url)
|
|
36
|
+
if (typeof import.meta !== 'undefined' && import.meta.url) {
|
|
37
|
+
currentDir = path.dirname(fileURLToPath(import.meta.url));
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
// Fallback
|
|
41
|
+
currentDir = process.cwd();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
currentDir = process.cwd();
|
|
46
|
+
}
|
|
47
|
+
// Look for apps/web directory or package.json with workspaces
|
|
48
|
+
while (currentDir !== path.dirname(currentDir)) {
|
|
49
|
+
const appsWeb = path.join(currentDir, 'apps', 'web');
|
|
50
|
+
const packageJson = path.join(currentDir, 'package.json');
|
|
51
|
+
if (fs.existsSync(appsWeb)) {
|
|
52
|
+
return currentDir;
|
|
53
|
+
}
|
|
54
|
+
// Check if this is a workspace root
|
|
55
|
+
if (fs.existsSync(packageJson)) {
|
|
56
|
+
try {
|
|
57
|
+
const pkg = JSON.parse(fs.readFileSync(packageJson, 'utf8'));
|
|
58
|
+
if (pkg.workspaces) {
|
|
59
|
+
return currentDir;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
catch (e) {
|
|
63
|
+
// Continue searching
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
currentDir = path.dirname(currentDir);
|
|
67
|
+
}
|
|
68
|
+
// Fallback to process.cwd()
|
|
69
|
+
return process.cwd();
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Recursively scan a directory for .func directories that contain .vc-config.json
|
|
73
|
+
* Follows symlinks to find all functions
|
|
74
|
+
*/
|
|
75
|
+
export function scanFunctions(dir, baseDir) {
|
|
76
|
+
const functions = [];
|
|
77
|
+
const seenPaths = new Set(); // Track seen paths to avoid infinite loops with symlinks
|
|
78
|
+
function scanRecursive(currentDir, currentBaseDir) {
|
|
79
|
+
if (!fs.existsSync(currentDir)) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
// Resolve symlinks to get the real path
|
|
83
|
+
let realPath;
|
|
84
|
+
try {
|
|
85
|
+
realPath = fs.realpathSync(currentDir);
|
|
86
|
+
}
|
|
87
|
+
catch {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
// Avoid infinite loops with circular symlinks
|
|
91
|
+
if (seenPaths.has(realPath)) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
seenPaths.add(realPath);
|
|
95
|
+
const entries = fs.readdirSync(currentDir, { withFileTypes: true });
|
|
96
|
+
for (const entry of entries) {
|
|
97
|
+
const fullPath = path.join(currentDir, entry.name);
|
|
98
|
+
// Resolve symlink if this is a symlink
|
|
99
|
+
let resolvedPath = fullPath;
|
|
100
|
+
let isSymlink = false;
|
|
101
|
+
try {
|
|
102
|
+
if (entry.isSymbolicLink()) {
|
|
103
|
+
isSymlink = true;
|
|
104
|
+
resolvedPath = fs.realpathSync(fullPath);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
catch {
|
|
108
|
+
// If symlink resolution fails, skip it
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
// Check if this is a directory (either directly or via symlink)
|
|
112
|
+
const isDirectory = entry.isDirectory() || (isSymlink && fs.statSync(resolvedPath).isDirectory());
|
|
113
|
+
if (isDirectory) {
|
|
114
|
+
// Check if this directory ends with .func
|
|
115
|
+
if (entry.name.endsWith('.func')) {
|
|
116
|
+
// Use the original path (not resolved) for resource name calculation
|
|
117
|
+
const configPath = path.join(fullPath, '.vc-config.json');
|
|
118
|
+
// Check if .vc-config.json exists (try both original and resolved paths)
|
|
119
|
+
const configExists = fs.existsSync(configPath) || (isSymlink && fs.existsSync(path.join(resolvedPath, '.vc-config.json')));
|
|
120
|
+
if (configExists) {
|
|
121
|
+
// Calculate resource name relative to baseDir using the original path
|
|
122
|
+
const relativePath = path.relative(currentBaseDir, fullPath);
|
|
123
|
+
// Convert to resource name format (with forward slashes, keep .func extension)
|
|
124
|
+
const resourceName = '/' + relativePath.split(path.sep).join('/');
|
|
125
|
+
// Use resolved path for actual file operations
|
|
126
|
+
const actualConfigPath = isSymlink ? path.join(resolvedPath, '.vc-config.json') : configPath;
|
|
127
|
+
const funcDirPath = path.resolve(isSymlink ? resolvedPath : fullPath);
|
|
128
|
+
// Calculate hash for the function directory
|
|
129
|
+
let funcHash;
|
|
130
|
+
try {
|
|
131
|
+
funcHash = hashFunctionDirectory(funcDirPath);
|
|
132
|
+
}
|
|
133
|
+
catch (error) {
|
|
134
|
+
// If hashing fails, continue without hash
|
|
135
|
+
funcHash = undefined;
|
|
136
|
+
}
|
|
137
|
+
// Check for prerender config and fallback files
|
|
138
|
+
// The prerender files are in the same directory as the .func directories (the functions directory)
|
|
139
|
+
// For symlinks, prerender files are at the symlink location, not the resolved path
|
|
140
|
+
// For example: /index.func -> /index.prerender-config.json in the same directory
|
|
141
|
+
const originalFuncDir = path.dirname(fullPath); // Use original path, not resolved
|
|
142
|
+
// Use the basename of the .func directory (or symlink) to find the prerender config
|
|
143
|
+
// This handles symlinks correctly: demo.func -> demo.prerender-config.json
|
|
144
|
+
const funcBaseName = path.basename(fullPath, '.func');
|
|
145
|
+
// Look for prerender-config.json and prerender-fallback.* files
|
|
146
|
+
// Pattern: {funcBaseName}.prerender-config.json and {funcBaseName}.prerender-fallback.*
|
|
147
|
+
let prerenderConfigPath;
|
|
148
|
+
let prerenderFallbackPath;
|
|
149
|
+
// Try to find prerender config file in the functions directory
|
|
150
|
+
// The prerender config is at the same level as the .func directory
|
|
151
|
+
const prerenderConfigName = funcBaseName + '.prerender-config.json';
|
|
152
|
+
const prerenderConfigFullPath = path.join(originalFuncDir, prerenderConfigName);
|
|
153
|
+
if (fs.existsSync(prerenderConfigFullPath)) {
|
|
154
|
+
prerenderConfigPath = path.resolve(prerenderConfigFullPath);
|
|
155
|
+
}
|
|
156
|
+
// Try to find prerender fallback file (could be .html, .rsc, .body, etc.)
|
|
157
|
+
if (prerenderConfigPath) {
|
|
158
|
+
// Read the prerender config to find the fallback file name
|
|
159
|
+
try {
|
|
160
|
+
const prerenderConfig = JSON.parse(fs.readFileSync(prerenderConfigFullPath, 'utf8'));
|
|
161
|
+
if (prerenderConfig.fallback) {
|
|
162
|
+
// Fallback can be a string or an object with fsPath property
|
|
163
|
+
const fallbackFileName = typeof prerenderConfig.fallback === 'string'
|
|
164
|
+
? prerenderConfig.fallback
|
|
165
|
+
: prerenderConfig.fallback.fsPath;
|
|
166
|
+
if (fallbackFileName) {
|
|
167
|
+
// Fallback file might be relative to the config file location
|
|
168
|
+
const fallbackFullPath = path.join(originalFuncDir, fallbackFileName);
|
|
169
|
+
if (fs.existsSync(fallbackFullPath)) {
|
|
170
|
+
prerenderFallbackPath = path.resolve(fallbackFullPath);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
catch {
|
|
176
|
+
// If we can't read the config, skip fallback detection
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
functions.push({
|
|
180
|
+
resourceName,
|
|
181
|
+
configPath: path.resolve(actualConfigPath),
|
|
182
|
+
funcDir: funcDirPath,
|
|
183
|
+
hash: funcHash,
|
|
184
|
+
prerenderConfigPath,
|
|
185
|
+
prerenderFallbackPath,
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
// Recursively scan subdirectories
|
|
191
|
+
scanRecursive(fullPath, currentBaseDir);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
scanRecursive(dir, baseDir);
|
|
197
|
+
return functions;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Calculate a deterministic hash for a function directory
|
|
201
|
+
* Similar to the bash script: uses sorted file names and contents
|
|
202
|
+
*/
|
|
203
|
+
export function hashFunctionDirectory(funcDir) {
|
|
204
|
+
const hash = crypto.createHash('sha256');
|
|
205
|
+
const files = [];
|
|
206
|
+
function walkDir(dir, baseDir) {
|
|
207
|
+
if (!fs.existsSync(dir)) {
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
const entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
211
|
+
// Sort entries by name for deterministic ordering
|
|
212
|
+
entries.sort((a, b) => a.name.localeCompare(b.name, 'en', { numeric: true }));
|
|
213
|
+
for (const entry of entries) {
|
|
214
|
+
const fullPath = path.join(dir, entry.name);
|
|
215
|
+
const relativePath = path.relative(baseDir, fullPath);
|
|
216
|
+
// Skip .DS_Store and __MACOSX
|
|
217
|
+
if (entry.name === '.DS_Store' || entry.name === '__MACOSX' || relativePath.includes('/.DS_Store') || relativePath.includes('/__MACOSX')) {
|
|
218
|
+
continue;
|
|
219
|
+
}
|
|
220
|
+
if (entry.isFile()) {
|
|
221
|
+
try {
|
|
222
|
+
const content = fs.readFileSync(fullPath);
|
|
223
|
+
files.push({ path: relativePath, content });
|
|
224
|
+
}
|
|
225
|
+
catch {
|
|
226
|
+
// Skip files that can't be read
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
else if (entry.isDirectory()) {
|
|
230
|
+
walkDir(fullPath, baseDir);
|
|
231
|
+
}
|
|
232
|
+
else if (entry.isSymbolicLink()) {
|
|
233
|
+
// For symlinks, we'll use the resolved path
|
|
234
|
+
try {
|
|
235
|
+
const resolvedPath = fs.realpathSync(fullPath);
|
|
236
|
+
if (fs.statSync(resolvedPath).isFile()) {
|
|
237
|
+
const content = fs.readFileSync(resolvedPath);
|
|
238
|
+
files.push({ path: relativePath, content });
|
|
239
|
+
}
|
|
240
|
+
else if (fs.statSync(resolvedPath).isDirectory()) {
|
|
241
|
+
walkDir(resolvedPath, baseDir);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
catch {
|
|
245
|
+
// Skip symlinks that can't be resolved
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
// Walk the directory and collect all files
|
|
251
|
+
walkDir(funcDir, funcDir);
|
|
252
|
+
// Sort files by path for deterministic ordering
|
|
253
|
+
files.sort((a, b) => a.path.localeCompare(b.path, 'en', { numeric: true }));
|
|
254
|
+
// Create a deterministic representation
|
|
255
|
+
// Format: path:size:content_hash\n
|
|
256
|
+
for (const file of files) {
|
|
257
|
+
const fileHash = crypto.createHash('sha256').update(file.content).digest('hex');
|
|
258
|
+
const line = `${file.path}:${file.content.length}:${fileHash}\n`;
|
|
259
|
+
hash.update(line);
|
|
260
|
+
}
|
|
261
|
+
return hash.digest('hex');
|
|
262
|
+
}
|
|
263
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAG7B,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAO,aAAa,EAAE,MAAM,KAAK,CAAC;AAEzC;;;;;;GAMG;AACH,MAAM,UAAU,sBAAsB,CAAC,QAAgB;IACrD,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC3C,MAAM,UAAU,GAAG,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,+BAA+B;IAEnF,IAAI,UAAU,CAAC,QAAQ,CAAC,iBAAiB,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,CAAC;QACvF,gDAAgD;QAChD,OAAO,WAAW,CAAC;IACrB,CAAC;SAAM,IAAI,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;QAC/E,+CAA+C;QAC/C,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IAC1C,CAAC;SAAM,CAAC;QACN,oEAAoE;QACpE,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;IACrD,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB;IAC/B,mCAAmC;IACnC,IAAI,UAAkB,CAAC;IACvB,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type": "module",
|
|
5
|
+
"bin": {
|
|
6
|
+
"cli": "./dist/cli.js"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsc",
|
|
16
|
+
"dev": "tsc --watch"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"yargs": "^17.7.2"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@types/node": "^20.10.0",
|
|
23
|
+
"@types/yargs": "^17.0.32",
|
|
24
|
+
"typescript": "^5.3.3"
|
|
25
|
+
}
|
|
26
|
+
}
|