@gigadrive/network-config 3.4.17 → 4.0.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/index.d.mts +75 -61
- package/dist/index.d.ts +75 -61
- package/dist/index.js +131 -157
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +131 -157
- package/dist/index.mjs.map +1 -1
- package/dist/nextjs-adapter.d.mts +16 -4
- package/dist/nextjs-adapter.d.ts +17 -3
- package/dist/nextjs-adapter.js +81 -260
- package/dist/nextjs-adapter.js.map +1 -1
- package/dist/nextjs-adapter.mjs +78 -261
- package/dist/nextjs-adapter.mjs.map +1 -1
- package/package.json +3 -8
- package/dist/nextjs-entrypoint-templates/edge-web.mjs +0 -90
- package/dist/nextjs-entrypoint-templates/node-middleware-web.mjs +0 -98
- package/dist/nextjs-entrypoint-templates/node-route.mjs +0 -73
- package/dist/nextjs-ppr-runtime.d.mts +0 -46
- package/dist/nextjs-ppr-runtime.d.ts +0 -46
- package/dist/nextjs-ppr-runtime.js +0 -177
- package/dist/nextjs-ppr-runtime.js.map +0 -1
- package/dist/nextjs-ppr-runtime.mjs +0 -149
- package/dist/nextjs-ppr-runtime.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -268,10 +268,9 @@ var isJsonValue = (value) => {
|
|
|
268
268
|
if (Array.isArray(value)) return value.every(isJsonValue);
|
|
269
269
|
return isRecord2(value) && Object.values(value).every(isJsonValue);
|
|
270
270
|
};
|
|
271
|
-
var isRouteOutput = (value) => isRecord2(value) && typeof value.id === "string" && ["PAGES", "PAGES_API", "APP_PAGE", "APP_ROUTE", "MIDDLEWARE"].includes(String(value.type)) && isPortableRelativePath(value.filePath) && typeof value.pathname === "string" && typeof value.sourcePage === "string" && (value.runtime === "nodejs" || value.runtime === "edge") && isStringRecord(value.assets) && isRecord2(value.config);
|
|
272
271
|
var isPrerenderOutput = (value) => isRecord2(value) && value.type === "PRERENDER" && typeof value.id === "string" && typeof value.pathname === "string" && typeof value.parentOutputId === "string" && typeof value.groupId === "number" && isRecord2(value.config) && (value.fallback === void 0 || isRecord2(value.fallback) && (value.fallback.filePath === void 0 || isPortableRelativePath(value.fallback.filePath)));
|
|
273
|
-
var
|
|
274
|
-
var
|
|
272
|
+
var isStaticAssetPrefix = (value) => isRecord2(value) && isPortableRelativePath(value.sourceDir) && isPortableRelativePath(value.urlPrefix) && typeof value.immutable === "boolean";
|
|
273
|
+
var isServerDescriptor = (value) => isRecord2(value) && (value.maxDuration === void 0 || typeof value.maxDuration === "number") && (value.preferredRegion === void 0 || typeof value.preferredRegion === "string" || Array.isArray(value.preferredRegion) && value.preferredRegion.every((region) => typeof region === "string")) && (value.env === void 0 || isStringRecord(value.env));
|
|
275
274
|
var isImagePolicy = (value) => isRecord2(value) && Array.isArray(value.localPatterns) && Array.isArray(value.remotePatterns) && value.remotePatterns.every((pattern) => isRecord2(pattern) && typeof pattern.hostname === "string") && Array.isArray(value.widths) && value.widths.every((item) => typeof item === "number" && Number.isInteger(item) && item > 0) && Array.isArray(value.heights) && value.heights.every((item) => typeof item === "number" && Number.isInteger(item) && item > 0) && Array.isArray(value.qualities) && value.qualities.every((item) => typeof item === "number" && item >= 1 && item <= 100) && Array.isArray(value.formats) && value.formats.every((item) => ["image/avif", "image/webp", "image/jpeg", "image/png"].includes(String(item))) && typeof value.minimumCacheTTL === "number" && typeof value.dangerouslyAllowSVG === "boolean" && typeof value.contentSecurityPolicy === "string" && (value.contentDispositionType === "inline" || value.contentDispositionType === "attachment") && typeof value.maximumRedirects === "number" && typeof value.maximumResponseBody === "number" && isRecord2(value.variants);
|
|
276
275
|
var parseGigadriveNextBuildManifest = (content) => {
|
|
277
276
|
try {
|
|
@@ -283,20 +282,82 @@ var parseGigadriveNextBuildManifest = (content) => {
|
|
|
283
282
|
}
|
|
284
283
|
return value;
|
|
285
284
|
}
|
|
286
|
-
if (value.version
|
|
285
|
+
if (value.version === 2) {
|
|
286
|
+
if (!isPortableRelativePath(value.distDir) || !isPortableRelativePath(value.repoRootToProject, true) || typeof value.nextVersion !== "string" || typeof value.buildId !== "string") {
|
|
287
|
+
return void 0;
|
|
288
|
+
}
|
|
289
|
+
if (value.mode === "export") {
|
|
290
|
+
return value;
|
|
291
|
+
}
|
|
292
|
+
if (value.mode === "standalone-v2") {
|
|
293
|
+
if (!isServerDescriptor(value.server) || !isRecord2(value.config) || typeof value.config.basePath !== "string" || typeof value.config.trailingSlash !== "boolean" || typeof value.config.cacheComponents !== "boolean" || value.config.images !== void 0 && !isImagePolicy(value.config.images) || !isRecord2(value.routing) || !isJsonValue(value.routing) || !isRecord2(value.outputs) || !Array.isArray(value.outputs.prerenders) || !value.outputs.prerenders.every(isPrerenderOutput) || !Array.isArray(value.outputs.staticAssets) || !value.outputs.staticAssets.every(isStaticAssetPrefix)) {
|
|
294
|
+
return void 0;
|
|
295
|
+
}
|
|
296
|
+
return value;
|
|
297
|
+
}
|
|
287
298
|
return void 0;
|
|
288
299
|
}
|
|
289
|
-
|
|
290
|
-
if (Object.values(value.outputEntrypoints).some((entrypointId) => !entrypointIds.has(entrypointId)))
|
|
291
|
-
return void 0;
|
|
292
|
-
return value;
|
|
300
|
+
return void 0;
|
|
293
301
|
} catch {
|
|
294
302
|
return void 0;
|
|
295
303
|
}
|
|
296
304
|
};
|
|
297
305
|
|
|
306
|
+
// src/regions.ts
|
|
307
|
+
var REGION_DEFINITIONS = [
|
|
308
|
+
"us-east-1",
|
|
309
|
+
"us-east-2",
|
|
310
|
+
"us-west-1",
|
|
311
|
+
"us-west-2",
|
|
312
|
+
"ap-south-1",
|
|
313
|
+
"ap-northeast-3",
|
|
314
|
+
"ap-northeast-2",
|
|
315
|
+
"ap-southeast-1",
|
|
316
|
+
"ap-southeast-2",
|
|
317
|
+
"ap-northeast-1",
|
|
318
|
+
"ca-central-1",
|
|
319
|
+
"eu-central-1",
|
|
320
|
+
"eu-west-1",
|
|
321
|
+
"eu-west-2",
|
|
322
|
+
"eu-west-3",
|
|
323
|
+
"eu-north-1",
|
|
324
|
+
"sa-east-1"
|
|
325
|
+
];
|
|
326
|
+
var AVAILABLE_REGIONS = [...REGION_DEFINITIONS];
|
|
327
|
+
|
|
298
328
|
// src/detection/frameworks/nextjs.ts
|
|
299
329
|
var toPortablePath = (value) => value.replaceAll("\\", "/");
|
|
330
|
+
var resolveStandaloneServer = Effect4.fn("nextjs.resolveStandaloneServer")(function* (projectFolder, distDir, repoRootToProject) {
|
|
331
|
+
const fs = yield* FileSystem4.FileSystem;
|
|
332
|
+
const pathService = yield* Path3.Path;
|
|
333
|
+
const standaloneRoot = pathService.join(projectFolder, distDir, "standalone");
|
|
334
|
+
const monorepoServer = pathService.join(standaloneRoot, repoRootToProject, "server.js");
|
|
335
|
+
const rootServer = pathService.join(standaloneRoot, "server.js");
|
|
336
|
+
const monorepoServerExists = yield* fs.exists(monorepoServer).pipe(Effect4.catchAll(() => Effect4.succeed(false)));
|
|
337
|
+
const serverPath = monorepoServerExists ? monorepoServer : rootServer;
|
|
338
|
+
const serverExists = yield* fs.exists(serverPath).pipe(Effect4.catchAll(() => Effect4.succeed(false)));
|
|
339
|
+
if (!serverExists) return void 0;
|
|
340
|
+
const serverDirectory = pathService.dirname(serverPath);
|
|
341
|
+
const entrypoint = toPortablePath(pathService.relative(standaloneRoot, serverPath));
|
|
342
|
+
return { standaloneRoot, serverDirectory, entrypoint };
|
|
343
|
+
});
|
|
344
|
+
var buildStandalonePublicAssets = Effect4.fn("nextjs.buildStandalonePublicAssets")(function* (projectFolder, standaloneRoot, serverDirectory) {
|
|
345
|
+
const pathService = yield* Path3.Path;
|
|
346
|
+
const publicFiles = yield* getDefaultPathMap(pathService.join(projectFolder, "public"));
|
|
347
|
+
const assetPaths = [];
|
|
348
|
+
const assetOverrides = {};
|
|
349
|
+
const filePathMap = {};
|
|
350
|
+
for (const [absolutePath, relativePath] of Object.entries(publicFiles)) {
|
|
351
|
+
const portableRelativePath = toPortablePath(relativePath);
|
|
352
|
+
const projectRelativePath = toPortablePath(pathService.relative(projectFolder, absolutePath));
|
|
353
|
+
assetPaths.push(projectRelativePath);
|
|
354
|
+
assetOverrides[projectRelativePath] = { path: portableRelativePath };
|
|
355
|
+
filePathMap[absolutePath] = toPortablePath(
|
|
356
|
+
pathService.relative(standaloneRoot, pathService.join(serverDirectory, "public", relativePath))
|
|
357
|
+
);
|
|
358
|
+
}
|
|
359
|
+
return { assetPaths, assetOverrides, filePathMap };
|
|
360
|
+
});
|
|
300
361
|
var createStaticExportConfig = Effect4.fn("nextjs.createStaticExportConfig")(function* (defaults, projectFolder) {
|
|
301
362
|
const pathService = yield* Path3.Path;
|
|
302
363
|
const outputDirectory = pathService.join(projectFolder, "out");
|
|
@@ -322,35 +383,15 @@ var createStaticExportConfig = Effect4.fn("nextjs.createStaticExportConfig")(fun
|
|
|
322
383
|
};
|
|
323
384
|
});
|
|
324
385
|
var createStandaloneConfig = Effect4.fn("nextjs.createStandaloneConfig")(function* (defaults, projectFolder, manifest) {
|
|
325
|
-
const fs = yield* FileSystem4.FileSystem;
|
|
326
386
|
const pathService = yield* Path3.Path;
|
|
327
|
-
const
|
|
328
|
-
|
|
329
|
-
const
|
|
330
|
-
const
|
|
331
|
-
const
|
|
332
|
-
const
|
|
333
|
-
|
|
334
|
-
const
|
|
335
|
-
const entrypoint = toPortablePath(pathService.relative(standaloneRoot, serverPath));
|
|
336
|
-
const publicDirectory = pathService.join(projectFolder, "public");
|
|
337
|
-
const staticDirectory = pathService.join(projectFolder, manifest.distDir, "static");
|
|
338
|
-
const [publicFiles, staticFiles] = yield* Effect4.all([
|
|
339
|
-
getDefaultPathMap(publicDirectory),
|
|
340
|
-
getDefaultPathMap(staticDirectory)
|
|
341
|
-
]);
|
|
342
|
-
const assetPaths = [];
|
|
343
|
-
const assetOverrides = {};
|
|
344
|
-
const filePathMap = {};
|
|
345
|
-
for (const [absolutePath, relativePath] of Object.entries(publicFiles)) {
|
|
346
|
-
const portableRelativePath = toPortablePath(relativePath);
|
|
347
|
-
const projectRelativePath = toPortablePath(pathService.relative(projectFolder, absolutePath));
|
|
348
|
-
assetPaths.push(projectRelativePath);
|
|
349
|
-
assetOverrides[projectRelativePath] = { path: portableRelativePath };
|
|
350
|
-
filePathMap[absolutePath] = toPortablePath(
|
|
351
|
-
pathService.relative(standaloneRoot, pathService.join(serverDirectory, "public", relativePath))
|
|
352
|
-
);
|
|
353
|
-
}
|
|
387
|
+
const resolved = yield* resolveStandaloneServer(projectFolder, manifest.distDir, manifest.repoRootToProject);
|
|
388
|
+
if (!resolved) return defaults;
|
|
389
|
+
const { standaloneRoot, serverDirectory, entrypoint } = resolved;
|
|
390
|
+
const publicAssets = yield* buildStandalonePublicAssets(projectFolder, standaloneRoot, serverDirectory);
|
|
391
|
+
const assetPaths = [...publicAssets.assetPaths];
|
|
392
|
+
const assetOverrides = { ...publicAssets.assetOverrides };
|
|
393
|
+
const filePathMap = { ...publicAssets.filePathMap };
|
|
394
|
+
const staticFiles = yield* getDefaultPathMap(pathService.join(projectFolder, manifest.distDir, "static"));
|
|
354
395
|
for (const [absolutePath, relativePath] of Object.entries(staticFiles)) {
|
|
355
396
|
const portableRelativePath = toPortablePath(relativePath);
|
|
356
397
|
const projectRelativePath = toPortablePath(pathService.relative(projectFolder, absolutePath));
|
|
@@ -375,92 +416,25 @@ var createStandaloneConfig = Effect4.fn("nextjs.createStandaloneConfig")(functio
|
|
|
375
416
|
}
|
|
376
417
|
};
|
|
377
418
|
});
|
|
378
|
-
var
|
|
419
|
+
var createStandaloneV2Config = Effect4.fn("nextjs.createStandaloneV2Config")(function* (defaults, projectFolder, manifest) {
|
|
379
420
|
const pathService = yield* Path3.Path;
|
|
421
|
+
const resolved = yield* resolveStandaloneServer(projectFolder, manifest.distDir, manifest.repoRootToProject);
|
|
422
|
+
if (!resolved) return defaults;
|
|
423
|
+
const { standaloneRoot, serverDirectory, entrypoint } = resolved;
|
|
380
424
|
let repoRoot = projectFolder;
|
|
381
425
|
if (manifest.repoRootToProject !== ".") {
|
|
382
426
|
repoRoot = manifest.repoRootToProject.split("/").reduce((root) => pathService.dirname(root), repoRoot);
|
|
383
427
|
}
|
|
384
|
-
const
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
const [targetPath, sourcePath] = identity.split("\0");
|
|
395
|
-
sharedFilePathMap[pathService.join(repoRoot, sourcePath)] = targetPath;
|
|
396
|
-
}
|
|
397
|
-
const sharedArtifacts = Object.keys(sharedFilePathMap).length > 0 ? [{ id: "next-shared", filePathMap: sharedFilePathMap }] : [];
|
|
398
|
-
const executablePathByOutputId = new Map(
|
|
399
|
-
[
|
|
400
|
-
...manifest.outputs.pages,
|
|
401
|
-
...manifest.outputs.pagesApi,
|
|
402
|
-
...manifest.outputs.appPages,
|
|
403
|
-
...manifest.outputs.appRoutes,
|
|
404
|
-
...manifest.outputs.middleware ? [manifest.outputs.middleware] : []
|
|
405
|
-
].map((output) => [output.id, output.edgeRuntime?.modulePath ?? output.filePath])
|
|
406
|
-
);
|
|
407
|
-
const entrypoints = manifest.entrypoints.map((entrypoint) => {
|
|
408
|
-
const filePathMap = {};
|
|
409
|
-
for (const [targetPath, sourcePath] of Object.entries({
|
|
410
|
-
...entrypoint.assets,
|
|
411
|
-
...entrypoint.wasmAssets
|
|
412
|
-
})) {
|
|
413
|
-
const identity = `${targetPath}\0${sourcePath}`;
|
|
414
|
-
if ((artifactUseCount.get(identity) ?? 0) >= 2) continue;
|
|
415
|
-
filePathMap[pathService.join(repoRoot, sourcePath)] = targetPath;
|
|
416
|
-
}
|
|
417
|
-
for (const executablePath of new Set(
|
|
418
|
-
entrypoint.outputIds.flatMap((outputId) => {
|
|
419
|
-
const executablePath2 = executablePathByOutputId.get(outputId);
|
|
420
|
-
return executablePath2 ? [executablePath2] : [];
|
|
421
|
-
})
|
|
422
|
-
)) {
|
|
423
|
-
filePathMap[pathService.join(repoRoot, executablePath)] = executablePath;
|
|
424
|
-
}
|
|
425
|
-
filePathMap[pathService.join(repoRoot, entrypoint.filePath)] = entrypoint.filePath;
|
|
426
|
-
return {
|
|
427
|
-
displayName: entrypoint.id,
|
|
428
|
-
path: entrypoint.filePath,
|
|
429
|
-
runtime: "node-22",
|
|
430
|
-
memory: defaults.memory,
|
|
431
|
-
maxDuration: entrypoint.config.maxDuration ?? defaults.maxDuration,
|
|
432
|
-
streaming: true,
|
|
433
|
-
environmentVariables: {
|
|
434
|
-
GIGADRIVE_NEXT_ENTRYPOINT_ID: entrypoint.id,
|
|
435
|
-
GIGADRIVE_NEXT_RUNTIME: entrypoint.runtime,
|
|
436
|
-
NEXT_BUILD_ID: manifest.buildId,
|
|
437
|
-
...entrypoint.config.env
|
|
438
|
-
},
|
|
439
|
-
package: {
|
|
440
|
-
trace: false,
|
|
441
|
-
includeProjectFiles: false,
|
|
442
|
-
preserveSymlinks: true,
|
|
443
|
-
rootOverwrite: repoRoot,
|
|
444
|
-
filePathMap,
|
|
445
|
-
...sharedArtifacts.length > 0 ? { sharedArtifactIds: sharedArtifacts.map((artifact) => artifact.id) } : {}
|
|
446
|
-
}
|
|
447
|
-
};
|
|
448
|
-
});
|
|
449
|
-
const assetPaths = [];
|
|
450
|
-
const assetOverrides = {};
|
|
451
|
-
const publicFiles = yield* getDefaultPathMap(pathService.join(projectFolder, "public"));
|
|
452
|
-
for (const [absolutePath, relativePath] of Object.entries(publicFiles)) {
|
|
453
|
-
const projectRelativePath = toPortablePath(pathService.relative(projectFolder, absolutePath));
|
|
454
|
-
assetPaths.push(projectRelativePath);
|
|
455
|
-
assetOverrides[projectRelativePath] = { path: toPortablePath(relativePath) };
|
|
456
|
-
}
|
|
457
|
-
for (const output of manifest.outputs.staticFiles) {
|
|
458
|
-
const absolutePath = pathService.join(repoRoot, output.filePath);
|
|
459
|
-
const projectRelativePath = toPortablePath(pathService.relative(projectFolder, absolutePath));
|
|
460
|
-
if (projectRelativePath.startsWith("../")) continue;
|
|
461
|
-
assetPaths.push(projectRelativePath);
|
|
462
|
-
assetOverrides[projectRelativePath] = { path: output.pathname.replace(/^\//, "") };
|
|
463
|
-
}
|
|
428
|
+
const publicAssets = yield* buildStandalonePublicAssets(projectFolder, standaloneRoot, serverDirectory);
|
|
429
|
+
const assetPaths = [...publicAssets.assetPaths];
|
|
430
|
+
const assetOverrides = { ...publicAssets.assetOverrides };
|
|
431
|
+
const filePathMap = { ...publicAssets.filePathMap };
|
|
432
|
+
const assetPrefixes = manifest.outputs.staticAssets.map((staticAsset) => ({
|
|
433
|
+
source: staticAsset.sourceDir,
|
|
434
|
+
destination: staticAsset.urlPrefix,
|
|
435
|
+
immutable: staticAsset.immutable,
|
|
436
|
+
populateCache: true
|
|
437
|
+
}));
|
|
464
438
|
const prerenders = manifest.outputs.prerenders.map((output) => {
|
|
465
439
|
if (!output.fallback?.filePath) return output;
|
|
466
440
|
const absolutePath = pathService.join(repoRoot, output.fallback.filePath);
|
|
@@ -474,17 +448,35 @@ var createAdapterV2Config = Effect4.fn("nextjs.createAdapterV2Config")(function*
|
|
|
474
448
|
fallback: { ...output.fallback, filePath: `/${internalAssetPath}` }
|
|
475
449
|
};
|
|
476
450
|
});
|
|
451
|
+
const singleEntrypoint = {
|
|
452
|
+
displayName: "next-server",
|
|
453
|
+
path: entrypoint,
|
|
454
|
+
runtime: defaults.runtime,
|
|
455
|
+
memory: defaults.memory,
|
|
456
|
+
maxDuration: manifest.server.maxDuration ?? defaults.maxDuration,
|
|
457
|
+
streaming: true,
|
|
458
|
+
environmentVariables: {
|
|
459
|
+
NEXT_BUILD_ID: manifest.buildId,
|
|
460
|
+
...manifest.server.env
|
|
461
|
+
},
|
|
462
|
+
package: {
|
|
463
|
+
trace: false,
|
|
464
|
+
rootOverwrite: standaloneRoot,
|
|
465
|
+
filePathMap
|
|
466
|
+
}
|
|
467
|
+
};
|
|
477
468
|
const framework = {
|
|
478
469
|
mode: manifest.mode,
|
|
479
470
|
distDir: manifest.distDir,
|
|
480
471
|
repoRootToProject: manifest.repoRootToProject,
|
|
481
472
|
nextVersion: manifest.nextVersion,
|
|
482
473
|
buildId: manifest.buildId,
|
|
474
|
+
server: manifest.server,
|
|
483
475
|
config: manifest.config,
|
|
484
476
|
routing: manifest.routing,
|
|
485
|
-
outputs: manifest.outputs,
|
|
486
|
-
|
|
487
|
-
|
|
477
|
+
outputs: { prerenders, staticAssets: manifest.outputs.staticAssets },
|
|
478
|
+
type: "nextjs",
|
|
479
|
+
schemaVersion: 2
|
|
488
480
|
};
|
|
489
481
|
return {
|
|
490
482
|
...defaults,
|
|
@@ -492,22 +484,27 @@ var createAdapterV2Config = Effect4.fn("nextjs.createAdapterV2Config")(function*
|
|
|
492
484
|
routes: [],
|
|
493
485
|
assetPaths,
|
|
494
486
|
assetOverrides,
|
|
487
|
+
assetPrefixes,
|
|
495
488
|
assetsDir: manifest.distDir,
|
|
496
489
|
assetsPrefixToStrip: "",
|
|
490
|
+
populateAssetCache: true,
|
|
497
491
|
package: void 0,
|
|
498
492
|
normalizedConfig: {
|
|
499
|
-
regions: [
|
|
500
|
-
entrypoints,
|
|
501
|
-
routes: [
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
493
|
+
regions: [...AVAILABLE_REGIONS],
|
|
494
|
+
entrypoints: [singleEntrypoint],
|
|
495
|
+
routes: [
|
|
496
|
+
{
|
|
497
|
+
path: "/*",
|
|
498
|
+
destination: entrypoint,
|
|
499
|
+
handler: "SERVERLESS_FUNCTION_STREAMING",
|
|
500
|
+
methods: ["ANY"],
|
|
501
|
+
headers: {}
|
|
502
|
+
}
|
|
503
|
+
],
|
|
504
|
+
framework,
|
|
508
505
|
images: manifest.config.images,
|
|
509
|
-
sharedArtifacts,
|
|
510
|
-
userArchive: { rootOverwrite:
|
|
506
|
+
sharedArtifacts: [],
|
|
507
|
+
userArchive: { rootOverwrite: standaloneRoot }
|
|
511
508
|
}
|
|
512
509
|
};
|
|
513
510
|
});
|
|
@@ -535,7 +532,7 @@ var nextjs = {
|
|
|
535
532
|
const manifest = manifestContent ? parseGigadriveNextBuildManifest(manifestContent) : void 0;
|
|
536
533
|
if (!manifest) return defaults;
|
|
537
534
|
if (manifest.version === 2) {
|
|
538
|
-
return manifest.mode === "export" ? yield* createStaticExportConfig(defaults, projectFolder) : yield*
|
|
535
|
+
return manifest.mode === "export" ? yield* createStaticExportConfig(defaults, projectFolder) : yield* createStandaloneV2Config(defaults, projectFolder, manifest);
|
|
539
536
|
}
|
|
540
537
|
return manifest.output === "export" ? yield* createStaticExportConfig(defaults, projectFolder) : yield* createStandaloneConfig(defaults, projectFolder, manifest);
|
|
541
538
|
})
|
|
@@ -696,30 +693,6 @@ var FRAMEWORK_DEFINITIONS = [
|
|
|
696
693
|
|
|
697
694
|
// src/detection/generate-config.ts
|
|
698
695
|
import { Effect as Effect6 } from "effect";
|
|
699
|
-
|
|
700
|
-
// src/regions.ts
|
|
701
|
-
var REGION_DEFINITIONS = [
|
|
702
|
-
"us-east-1",
|
|
703
|
-
"us-east-2",
|
|
704
|
-
"us-west-1",
|
|
705
|
-
"us-west-2",
|
|
706
|
-
"ap-south-1",
|
|
707
|
-
"ap-northeast-3",
|
|
708
|
-
"ap-northeast-2",
|
|
709
|
-
"ap-southeast-1",
|
|
710
|
-
"ap-southeast-2",
|
|
711
|
-
"ap-northeast-1",
|
|
712
|
-
"ca-central-1",
|
|
713
|
-
"eu-central-1",
|
|
714
|
-
"eu-west-1",
|
|
715
|
-
"eu-west-2",
|
|
716
|
-
"eu-west-3",
|
|
717
|
-
"eu-north-1",
|
|
718
|
-
"sa-east-1"
|
|
719
|
-
];
|
|
720
|
-
var AVAILABLE_REGIONS = [...REGION_DEFINITIONS];
|
|
721
|
-
|
|
722
|
-
// src/detection/generate-config.ts
|
|
723
696
|
var getInstallCommand = (pm) => {
|
|
724
697
|
switch (pm) {
|
|
725
698
|
case "bun":
|
|
@@ -773,11 +746,12 @@ var generateConfig = Effect6.fn("generateConfig")(function* (framework, packageM
|
|
|
773
746
|
errors: [],
|
|
774
747
|
...defaults.normalizedConfig
|
|
775
748
|
};
|
|
776
|
-
if (defaults.assetsDir || defaults.assetPaths) {
|
|
749
|
+
if (defaults.assetsDir || defaults.assetPaths || defaults.assetPrefixes) {
|
|
777
750
|
config.assets = {
|
|
778
751
|
paths: defaults.assetPaths ? [...defaults.assetPaths] : [],
|
|
779
752
|
prefixToStrip: defaults.assetsPrefixToStrip ?? (defaults.assetsDir ? defaults.assetsDir + "/" : ""),
|
|
780
753
|
overrides: defaults.assetOverrides ? { ...defaults.assetOverrides } : void 0,
|
|
754
|
+
prefixes: defaults.assetPrefixes ? defaults.assetPrefixes.map((prefix) => ({ ...prefix })) : void 0,
|
|
781
755
|
dynamicRoutes: true,
|
|
782
756
|
populateCache: defaults.populateAssetCache ?? false
|
|
783
757
|
};
|