@vercel/cervel 0.0.8 → 0.0.10
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.mjs +12 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.mjs +12 -1
- package/package.json +4 -4
package/dist/cli.mjs
CHANGED
|
@@ -252,7 +252,18 @@ const findEntrypoint = async (cwd, options) => {
|
|
|
252
252
|
const packageJson = await readFile(join(cwd, "package.json"), "utf-8");
|
|
253
253
|
const packageJsonObject = JSON.parse(packageJson);
|
|
254
254
|
const framework = frameworks.find((framework$1) => packageJsonObject.dependencies?.[framework$1]);
|
|
255
|
-
if (!framework)
|
|
255
|
+
if (!framework) {
|
|
256
|
+
for (const entrypoint of entrypoints) {
|
|
257
|
+
const entrypointPath = join(cwd, entrypoint);
|
|
258
|
+
try {
|
|
259
|
+
await readFile(entrypointPath, "utf-8");
|
|
260
|
+
return entrypoint;
|
|
261
|
+
} catch (e) {
|
|
262
|
+
continue;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
throw new Error("No entrypoint or framework found");
|
|
266
|
+
}
|
|
256
267
|
const regex = createFrameworkRegex(framework);
|
|
257
268
|
for (const entrypoint of entrypoints) {
|
|
258
269
|
const entrypointPath = join(cwd, entrypoint);
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
-
import {
|
|
2
|
+
import { ParseArgsConfig } from "util";
|
|
3
3
|
|
|
4
4
|
//#region src/find-entrypoint.d.ts
|
|
5
5
|
declare const findEntrypoint: (cwd: string, options?: {
|
|
@@ -7,6 +7,7 @@ declare const findEntrypoint: (cwd: string, options?: {
|
|
|
7
7
|
}) => Promise<string>;
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/index.d.ts
|
|
10
|
+
type ParseArgsOptionsConfig = NonNullable<ParseArgsConfig['options']>;
|
|
10
11
|
declare const getBuildSummary: (outputDir: string) => Promise<any>;
|
|
11
12
|
declare const build: (args: {
|
|
12
13
|
entrypoint?: string;
|
package/dist/index.mjs
CHANGED
|
@@ -251,7 +251,18 @@ const findEntrypoint = async (cwd, options) => {
|
|
|
251
251
|
const packageJson = await readFile(join(cwd, "package.json"), "utf-8");
|
|
252
252
|
const packageJsonObject = JSON.parse(packageJson);
|
|
253
253
|
const framework = frameworks.find((framework$1) => packageJsonObject.dependencies?.[framework$1]);
|
|
254
|
-
if (!framework)
|
|
254
|
+
if (!framework) {
|
|
255
|
+
for (const entrypoint of entrypoints) {
|
|
256
|
+
const entrypointPath = join(cwd, entrypoint);
|
|
257
|
+
try {
|
|
258
|
+
await readFile(entrypointPath, "utf-8");
|
|
259
|
+
return entrypoint;
|
|
260
|
+
} catch (e) {
|
|
261
|
+
continue;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
throw new Error("No entrypoint or framework found");
|
|
265
|
+
}
|
|
255
266
|
const regex = createFrameworkRegex(framework);
|
|
256
267
|
for (const entrypoint of entrypoints) {
|
|
257
268
|
const entrypointPath = join(cwd, entrypoint);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/cervel",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"homepage": "https://vercel.com/docs",
|
|
6
6
|
"publishConfig": {
|
|
@@ -29,15 +29,15 @@
|
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"execa": "3.2.0",
|
|
32
|
-
"rolldown": "1.0.0-beta.
|
|
32
|
+
"rolldown": "1.0.0-beta.59",
|
|
33
33
|
"srvx": "0.8.9",
|
|
34
|
-
"tsx": "4.
|
|
34
|
+
"tsx": "4.21.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"typescript": "^4.0.0 || ^5.0.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@types/node": "
|
|
40
|
+
"@types/node": "20.11.0",
|
|
41
41
|
"typescript": "4.9.5",
|
|
42
42
|
"tsdown": "0.16.3",
|
|
43
43
|
"vitest": "^2.0.1"
|