@gigadrive/network-config 3.4.17 → 4.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/dist/index.d.mts +81 -61
- package/dist/index.d.ts +81 -61
- package/dist/index.js +140 -174
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +140 -174
- 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/dist/nextjs-cache-components-handler.js +15 -0
- package/dist/nextjs-cache-components-handler.js.map +1 -1
- package/dist/nextjs-cache-components-handler.mjs +15 -0
- package/dist/nextjs-cache-components-handler.mjs.map +1 -1
- package/dist/nextjs-cache-handler.d.mts +35 -0
- package/dist/nextjs-cache-handler.d.ts +35 -0
- package/dist/nextjs-cache-handler.js +95 -8
- package/dist/nextjs-cache-handler.js.map +1 -1
- package/dist/nextjs-cache-handler.mjs +85 -8
- package/dist/nextjs-cache-handler.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.js
CHANGED
|
@@ -335,10 +335,9 @@ var isJsonValue = (value) => {
|
|
|
335
335
|
if (Array.isArray(value)) return value.every(isJsonValue);
|
|
336
336
|
return isRecord2(value) && Object.values(value).every(isJsonValue);
|
|
337
337
|
};
|
|
338
|
-
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);
|
|
339
338
|
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)));
|
|
340
|
-
var
|
|
341
|
-
var
|
|
339
|
+
var isStaticAssetPrefix = (value) => isRecord2(value) && isPortableRelativePath(value.sourceDir) && isPortableRelativePath(value.urlPrefix) && typeof value.immutable === "boolean";
|
|
340
|
+
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));
|
|
342
341
|
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);
|
|
343
342
|
var parseGigadriveNextBuildManifest = (content) => {
|
|
344
343
|
try {
|
|
@@ -350,20 +349,83 @@ var parseGigadriveNextBuildManifest = (content) => {
|
|
|
350
349
|
}
|
|
351
350
|
return value;
|
|
352
351
|
}
|
|
353
|
-
if (value.version
|
|
352
|
+
if (value.version === 2) {
|
|
353
|
+
if (!isPortableRelativePath(value.distDir) || !isPortableRelativePath(value.repoRootToProject, true) || typeof value.nextVersion !== "string" || typeof value.buildId !== "string") {
|
|
354
|
+
return void 0;
|
|
355
|
+
}
|
|
356
|
+
if (value.mode === "export") {
|
|
357
|
+
return value;
|
|
358
|
+
}
|
|
359
|
+
if (value.mode === "standalone-v2") {
|
|
360
|
+
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)) {
|
|
361
|
+
return void 0;
|
|
362
|
+
}
|
|
363
|
+
return value;
|
|
364
|
+
}
|
|
354
365
|
return void 0;
|
|
355
366
|
}
|
|
356
|
-
|
|
357
|
-
if (Object.values(value.outputEntrypoints).some((entrypointId) => !entrypointIds.has(entrypointId)))
|
|
358
|
-
return void 0;
|
|
359
|
-
return value;
|
|
367
|
+
return void 0;
|
|
360
368
|
} catch {
|
|
361
369
|
return void 0;
|
|
362
370
|
}
|
|
363
371
|
};
|
|
364
372
|
|
|
373
|
+
// src/regions.ts
|
|
374
|
+
var REGION_DEFINITIONS = [
|
|
375
|
+
"us-east-1",
|
|
376
|
+
"us-east-2",
|
|
377
|
+
"us-west-1",
|
|
378
|
+
"us-west-2",
|
|
379
|
+
"ap-south-1",
|
|
380
|
+
"ap-northeast-3",
|
|
381
|
+
"ap-northeast-2",
|
|
382
|
+
"ap-southeast-1",
|
|
383
|
+
"ap-southeast-2",
|
|
384
|
+
"ap-northeast-1",
|
|
385
|
+
"ca-central-1",
|
|
386
|
+
"eu-central-1",
|
|
387
|
+
"eu-west-1",
|
|
388
|
+
"eu-west-2",
|
|
389
|
+
"eu-west-3",
|
|
390
|
+
"eu-north-1",
|
|
391
|
+
"sa-east-1"
|
|
392
|
+
];
|
|
393
|
+
var AVAILABLE_REGIONS = [...REGION_DEFINITIONS];
|
|
394
|
+
|
|
365
395
|
// src/detection/frameworks/nextjs.ts
|
|
366
396
|
var toPortablePath = (value) => value.replaceAll("\\", "/");
|
|
397
|
+
var MAXIMUM_ENTRY_PAGE_PATHS = 50;
|
|
398
|
+
var resolveStandaloneServer = import_effect4.Effect.fn("nextjs.resolveStandaloneServer")(function* (projectFolder, distDir, repoRootToProject) {
|
|
399
|
+
const fs = yield* import_platform4.FileSystem.FileSystem;
|
|
400
|
+
const pathService = yield* import_platform4.Path.Path;
|
|
401
|
+
const standaloneRoot = pathService.join(projectFolder, distDir, "standalone");
|
|
402
|
+
const monorepoServer = pathService.join(standaloneRoot, repoRootToProject, "server.js");
|
|
403
|
+
const rootServer = pathService.join(standaloneRoot, "server.js");
|
|
404
|
+
const monorepoServerExists = yield* fs.exists(monorepoServer).pipe(import_effect4.Effect.catchAll(() => import_effect4.Effect.succeed(false)));
|
|
405
|
+
const serverPath = monorepoServerExists ? monorepoServer : rootServer;
|
|
406
|
+
const serverExists = yield* fs.exists(serverPath).pipe(import_effect4.Effect.catchAll(() => import_effect4.Effect.succeed(false)));
|
|
407
|
+
if (!serverExists) return void 0;
|
|
408
|
+
const serverDirectory = pathService.dirname(serverPath);
|
|
409
|
+
const entrypoint = toPortablePath(pathService.relative(standaloneRoot, serverPath));
|
|
410
|
+
return { standaloneRoot, serverDirectory, entrypoint };
|
|
411
|
+
});
|
|
412
|
+
var buildStandalonePublicAssets = import_effect4.Effect.fn("nextjs.buildStandalonePublicAssets")(function* (projectFolder, standaloneRoot, serverDirectory) {
|
|
413
|
+
const pathService = yield* import_platform4.Path.Path;
|
|
414
|
+
const publicFiles = yield* getDefaultPathMap(pathService.join(projectFolder, "public"));
|
|
415
|
+
const assetPaths = [];
|
|
416
|
+
const assetOverrides = {};
|
|
417
|
+
const filePathMap = {};
|
|
418
|
+
for (const [absolutePath, relativePath] of Object.entries(publicFiles)) {
|
|
419
|
+
const portableRelativePath = toPortablePath(relativePath);
|
|
420
|
+
const projectRelativePath = toPortablePath(pathService.relative(projectFolder, absolutePath));
|
|
421
|
+
assetPaths.push(projectRelativePath);
|
|
422
|
+
assetOverrides[projectRelativePath] = { path: portableRelativePath };
|
|
423
|
+
filePathMap[absolutePath] = toPortablePath(
|
|
424
|
+
pathService.relative(standaloneRoot, pathService.join(serverDirectory, "public", relativePath))
|
|
425
|
+
);
|
|
426
|
+
}
|
|
427
|
+
return { assetPaths, assetOverrides, filePathMap };
|
|
428
|
+
});
|
|
367
429
|
var createStaticExportConfig = import_effect4.Effect.fn("nextjs.createStaticExportConfig")(function* (defaults, projectFolder) {
|
|
368
430
|
const pathService = yield* import_platform4.Path.Path;
|
|
369
431
|
const outputDirectory = pathService.join(projectFolder, "out");
|
|
@@ -389,35 +451,15 @@ var createStaticExportConfig = import_effect4.Effect.fn("nextjs.createStaticExpo
|
|
|
389
451
|
};
|
|
390
452
|
});
|
|
391
453
|
var createStandaloneConfig = import_effect4.Effect.fn("nextjs.createStandaloneConfig")(function* (defaults, projectFolder, manifest) {
|
|
392
|
-
const fs = yield* import_platform4.FileSystem.FileSystem;
|
|
393
454
|
const pathService = yield* import_platform4.Path.Path;
|
|
394
|
-
const
|
|
395
|
-
|
|
396
|
-
const
|
|
397
|
-
const
|
|
398
|
-
const
|
|
399
|
-
const
|
|
400
|
-
|
|
401
|
-
const
|
|
402
|
-
const entrypoint = toPortablePath(pathService.relative(standaloneRoot, serverPath));
|
|
403
|
-
const publicDirectory = pathService.join(projectFolder, "public");
|
|
404
|
-
const staticDirectory = pathService.join(projectFolder, manifest.distDir, "static");
|
|
405
|
-
const [publicFiles, staticFiles] = yield* import_effect4.Effect.all([
|
|
406
|
-
getDefaultPathMap(publicDirectory),
|
|
407
|
-
getDefaultPathMap(staticDirectory)
|
|
408
|
-
]);
|
|
409
|
-
const assetPaths = [];
|
|
410
|
-
const assetOverrides = {};
|
|
411
|
-
const filePathMap = {};
|
|
412
|
-
for (const [absolutePath, relativePath] of Object.entries(publicFiles)) {
|
|
413
|
-
const portableRelativePath = toPortablePath(relativePath);
|
|
414
|
-
const projectRelativePath = toPortablePath(pathService.relative(projectFolder, absolutePath));
|
|
415
|
-
assetPaths.push(projectRelativePath);
|
|
416
|
-
assetOverrides[projectRelativePath] = { path: portableRelativePath };
|
|
417
|
-
filePathMap[absolutePath] = toPortablePath(
|
|
418
|
-
pathService.relative(standaloneRoot, pathService.join(serverDirectory, "public", relativePath))
|
|
419
|
-
);
|
|
420
|
-
}
|
|
455
|
+
const resolved = yield* resolveStandaloneServer(projectFolder, manifest.distDir, manifest.repoRootToProject);
|
|
456
|
+
if (!resolved) return defaults;
|
|
457
|
+
const { standaloneRoot, serverDirectory, entrypoint } = resolved;
|
|
458
|
+
const publicAssets = yield* buildStandalonePublicAssets(projectFolder, standaloneRoot, serverDirectory);
|
|
459
|
+
const assetPaths = [...publicAssets.assetPaths];
|
|
460
|
+
const assetOverrides = { ...publicAssets.assetOverrides };
|
|
461
|
+
const filePathMap = { ...publicAssets.filePathMap };
|
|
462
|
+
const staticFiles = yield* getDefaultPathMap(pathService.join(projectFolder, manifest.distDir, "static"));
|
|
421
463
|
for (const [absolutePath, relativePath] of Object.entries(staticFiles)) {
|
|
422
464
|
const portableRelativePath = toPortablePath(relativePath);
|
|
423
465
|
const projectRelativePath = toPortablePath(pathService.relative(projectFolder, absolutePath));
|
|
@@ -442,116 +484,58 @@ var createStandaloneConfig = import_effect4.Effect.fn("nextjs.createStandaloneCo
|
|
|
442
484
|
}
|
|
443
485
|
};
|
|
444
486
|
});
|
|
445
|
-
var
|
|
446
|
-
const
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
const
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
const
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
})) {
|
|
480
|
-
const identity = `${targetPath}\0${sourcePath}`;
|
|
481
|
-
if ((artifactUseCount.get(identity) ?? 0) >= 2) continue;
|
|
482
|
-
filePathMap[pathService.join(repoRoot, sourcePath)] = targetPath;
|
|
483
|
-
}
|
|
484
|
-
for (const executablePath of new Set(
|
|
485
|
-
entrypoint.outputIds.flatMap((outputId) => {
|
|
486
|
-
const executablePath2 = executablePathByOutputId.get(outputId);
|
|
487
|
-
return executablePath2 ? [executablePath2] : [];
|
|
488
|
-
})
|
|
489
|
-
)) {
|
|
490
|
-
filePathMap[pathService.join(repoRoot, executablePath)] = executablePath;
|
|
487
|
+
var createStandaloneV2Config = import_effect4.Effect.fn("nextjs.createStandaloneV2Config")(function* (defaults, projectFolder, manifest) {
|
|
488
|
+
const resolved = yield* resolveStandaloneServer(projectFolder, manifest.distDir, manifest.repoRootToProject);
|
|
489
|
+
if (!resolved) return defaults;
|
|
490
|
+
const { standaloneRoot, serverDirectory, entrypoint } = resolved;
|
|
491
|
+
const publicAssets = yield* buildStandalonePublicAssets(projectFolder, standaloneRoot, serverDirectory);
|
|
492
|
+
const assetPaths = [...publicAssets.assetPaths];
|
|
493
|
+
const assetOverrides = { ...publicAssets.assetOverrides };
|
|
494
|
+
const filePathMap = { ...publicAssets.filePathMap };
|
|
495
|
+
const assetPrefixes = manifest.outputs.staticAssets.map((staticAsset) => ({
|
|
496
|
+
source: staticAsset.sourceDir,
|
|
497
|
+
destination: staticAsset.urlPrefix,
|
|
498
|
+
immutable: staticAsset.immutable,
|
|
499
|
+
populateCache: true
|
|
500
|
+
}));
|
|
501
|
+
const entryPagePaths = [
|
|
502
|
+
...new Set(
|
|
503
|
+
manifest.outputs.prerenders.filter((output) => !output.fallback?.postponedState).map((output) => output.pathname).filter((pathname) => pathname.startsWith("/") && !pathname.includes("["))
|
|
504
|
+
)
|
|
505
|
+
].sort((left, right) => left.split("/").length - right.split("/").length || left.localeCompare(right)).slice(0, MAXIMUM_ENTRY_PAGE_PATHS);
|
|
506
|
+
const singleEntrypoint = {
|
|
507
|
+
displayName: "next-server",
|
|
508
|
+
path: entrypoint,
|
|
509
|
+
runtime: defaults.runtime,
|
|
510
|
+
memory: defaults.memory,
|
|
511
|
+
maxDuration: manifest.server.maxDuration ?? defaults.maxDuration,
|
|
512
|
+
streaming: true,
|
|
513
|
+
environmentVariables: {
|
|
514
|
+
NEXT_BUILD_ID: manifest.buildId,
|
|
515
|
+
...manifest.server.env
|
|
516
|
+
},
|
|
517
|
+
package: {
|
|
518
|
+
trace: false,
|
|
519
|
+
rootOverwrite: standaloneRoot,
|
|
520
|
+
filePathMap
|
|
491
521
|
}
|
|
492
|
-
|
|
493
|
-
return {
|
|
494
|
-
displayName: entrypoint.id,
|
|
495
|
-
path: entrypoint.filePath,
|
|
496
|
-
runtime: "node-22",
|
|
497
|
-
memory: defaults.memory,
|
|
498
|
-
maxDuration: entrypoint.config.maxDuration ?? defaults.maxDuration,
|
|
499
|
-
streaming: true,
|
|
500
|
-
environmentVariables: {
|
|
501
|
-
GIGADRIVE_NEXT_ENTRYPOINT_ID: entrypoint.id,
|
|
502
|
-
GIGADRIVE_NEXT_RUNTIME: entrypoint.runtime,
|
|
503
|
-
NEXT_BUILD_ID: manifest.buildId,
|
|
504
|
-
...entrypoint.config.env
|
|
505
|
-
},
|
|
506
|
-
package: {
|
|
507
|
-
trace: false,
|
|
508
|
-
includeProjectFiles: false,
|
|
509
|
-
preserveSymlinks: true,
|
|
510
|
-
rootOverwrite: repoRoot,
|
|
511
|
-
filePathMap,
|
|
512
|
-
...sharedArtifacts.length > 0 ? { sharedArtifactIds: sharedArtifacts.map((artifact) => artifact.id) } : {}
|
|
513
|
-
}
|
|
514
|
-
};
|
|
515
|
-
});
|
|
516
|
-
const assetPaths = [];
|
|
517
|
-
const assetOverrides = {};
|
|
518
|
-
const publicFiles = yield* getDefaultPathMap(pathService.join(projectFolder, "public"));
|
|
519
|
-
for (const [absolutePath, relativePath] of Object.entries(publicFiles)) {
|
|
520
|
-
const projectRelativePath = toPortablePath(pathService.relative(projectFolder, absolutePath));
|
|
521
|
-
assetPaths.push(projectRelativePath);
|
|
522
|
-
assetOverrides[projectRelativePath] = { path: toPortablePath(relativePath) };
|
|
523
|
-
}
|
|
524
|
-
for (const output of manifest.outputs.staticFiles) {
|
|
525
|
-
const absolutePath = pathService.join(repoRoot, output.filePath);
|
|
526
|
-
const projectRelativePath = toPortablePath(pathService.relative(projectFolder, absolutePath));
|
|
527
|
-
if (projectRelativePath.startsWith("../")) continue;
|
|
528
|
-
assetPaths.push(projectRelativePath);
|
|
529
|
-
assetOverrides[projectRelativePath] = { path: output.pathname.replace(/^\//, "") };
|
|
530
|
-
}
|
|
531
|
-
const prerenders = manifest.outputs.prerenders.map((output) => {
|
|
532
|
-
if (!output.fallback?.filePath) return output;
|
|
533
|
-
const absolutePath = pathService.join(repoRoot, output.fallback.filePath);
|
|
534
|
-
const projectRelativePath = toPortablePath(pathService.relative(projectFolder, absolutePath));
|
|
535
|
-
if (projectRelativePath.startsWith("../")) return output;
|
|
536
|
-
const internalAssetPath = `_gigadrive/prerender/${encodeURIComponent(output.id)}.html`;
|
|
537
|
-
assetPaths.push(projectRelativePath);
|
|
538
|
-
assetOverrides[projectRelativePath] = { path: internalAssetPath };
|
|
539
|
-
return {
|
|
540
|
-
...output,
|
|
541
|
-
fallback: { ...output.fallback, filePath: `/${internalAssetPath}` }
|
|
542
|
-
};
|
|
543
|
-
});
|
|
522
|
+
};
|
|
544
523
|
const framework = {
|
|
545
524
|
mode: manifest.mode,
|
|
546
525
|
distDir: manifest.distDir,
|
|
547
526
|
repoRootToProject: manifest.repoRootToProject,
|
|
548
527
|
nextVersion: manifest.nextVersion,
|
|
549
528
|
buildId: manifest.buildId,
|
|
529
|
+
server: manifest.server,
|
|
550
530
|
config: manifest.config,
|
|
551
531
|
routing: manifest.routing,
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
532
|
+
// The prerender table is deliberately not forwarded: the standalone server
|
|
533
|
+
// serves build-time prerenders from its own bundle, so the platform only
|
|
534
|
+
// needs the warming sample below.
|
|
535
|
+
outputs: { prerenders: [], staticAssets: manifest.outputs.staticAssets },
|
|
536
|
+
entryPagePaths,
|
|
537
|
+
type: "nextjs",
|
|
538
|
+
schemaVersion: 2
|
|
555
539
|
};
|
|
556
540
|
return {
|
|
557
541
|
...defaults,
|
|
@@ -559,22 +543,27 @@ var createAdapterV2Config = import_effect4.Effect.fn("nextjs.createAdapterV2Conf
|
|
|
559
543
|
routes: [],
|
|
560
544
|
assetPaths,
|
|
561
545
|
assetOverrides,
|
|
546
|
+
assetPrefixes,
|
|
562
547
|
assetsDir: manifest.distDir,
|
|
563
548
|
assetsPrefixToStrip: "",
|
|
549
|
+
populateAssetCache: true,
|
|
564
550
|
package: void 0,
|
|
565
551
|
normalizedConfig: {
|
|
566
|
-
regions: [
|
|
567
|
-
entrypoints,
|
|
568
|
-
routes: [
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
552
|
+
regions: [...AVAILABLE_REGIONS],
|
|
553
|
+
entrypoints: [singleEntrypoint],
|
|
554
|
+
routes: [
|
|
555
|
+
{
|
|
556
|
+
path: "/*",
|
|
557
|
+
destination: entrypoint,
|
|
558
|
+
handler: "SERVERLESS_FUNCTION_STREAMING",
|
|
559
|
+
methods: ["ANY"],
|
|
560
|
+
headers: {}
|
|
561
|
+
}
|
|
562
|
+
],
|
|
563
|
+
framework,
|
|
575
564
|
images: manifest.config.images,
|
|
576
|
-
sharedArtifacts,
|
|
577
|
-
userArchive: { rootOverwrite:
|
|
565
|
+
sharedArtifacts: [],
|
|
566
|
+
userArchive: { rootOverwrite: standaloneRoot }
|
|
578
567
|
}
|
|
579
568
|
};
|
|
580
569
|
});
|
|
@@ -602,7 +591,7 @@ var nextjs = {
|
|
|
602
591
|
const manifest = manifestContent ? parseGigadriveNextBuildManifest(manifestContent) : void 0;
|
|
603
592
|
if (!manifest) return defaults;
|
|
604
593
|
if (manifest.version === 2) {
|
|
605
|
-
return manifest.mode === "export" ? yield* createStaticExportConfig(defaults, projectFolder) : yield*
|
|
594
|
+
return manifest.mode === "export" ? yield* createStaticExportConfig(defaults, projectFolder) : yield* createStandaloneV2Config(defaults, projectFolder, manifest);
|
|
606
595
|
}
|
|
607
596
|
return manifest.output === "export" ? yield* createStaticExportConfig(defaults, projectFolder) : yield* createStandaloneConfig(defaults, projectFolder, manifest);
|
|
608
597
|
})
|
|
@@ -763,30 +752,6 @@ var FRAMEWORK_DEFINITIONS = [
|
|
|
763
752
|
|
|
764
753
|
// src/detection/generate-config.ts
|
|
765
754
|
var import_effect6 = require("effect");
|
|
766
|
-
|
|
767
|
-
// src/regions.ts
|
|
768
|
-
var REGION_DEFINITIONS = [
|
|
769
|
-
"us-east-1",
|
|
770
|
-
"us-east-2",
|
|
771
|
-
"us-west-1",
|
|
772
|
-
"us-west-2",
|
|
773
|
-
"ap-south-1",
|
|
774
|
-
"ap-northeast-3",
|
|
775
|
-
"ap-northeast-2",
|
|
776
|
-
"ap-southeast-1",
|
|
777
|
-
"ap-southeast-2",
|
|
778
|
-
"ap-northeast-1",
|
|
779
|
-
"ca-central-1",
|
|
780
|
-
"eu-central-1",
|
|
781
|
-
"eu-west-1",
|
|
782
|
-
"eu-west-2",
|
|
783
|
-
"eu-west-3",
|
|
784
|
-
"eu-north-1",
|
|
785
|
-
"sa-east-1"
|
|
786
|
-
];
|
|
787
|
-
var AVAILABLE_REGIONS = [...REGION_DEFINITIONS];
|
|
788
|
-
|
|
789
|
-
// src/detection/generate-config.ts
|
|
790
755
|
var getInstallCommand = (pm) => {
|
|
791
756
|
switch (pm) {
|
|
792
757
|
case "bun":
|
|
@@ -840,11 +805,12 @@ var generateConfig = import_effect6.Effect.fn("generateConfig")(function* (frame
|
|
|
840
805
|
errors: [],
|
|
841
806
|
...defaults.normalizedConfig
|
|
842
807
|
};
|
|
843
|
-
if (defaults.assetsDir || defaults.assetPaths) {
|
|
808
|
+
if (defaults.assetsDir || defaults.assetPaths || defaults.assetPrefixes) {
|
|
844
809
|
config.assets = {
|
|
845
810
|
paths: defaults.assetPaths ? [...defaults.assetPaths] : [],
|
|
846
811
|
prefixToStrip: defaults.assetsPrefixToStrip ?? (defaults.assetsDir ? defaults.assetsDir + "/" : ""),
|
|
847
812
|
overrides: defaults.assetOverrides ? { ...defaults.assetOverrides } : void 0,
|
|
813
|
+
prefixes: defaults.assetPrefixes ? defaults.assetPrefixes.map((prefix) => ({ ...prefix })) : void 0,
|
|
848
814
|
dynamicRoutes: true,
|
|
849
815
|
populateCache: defaults.populateAssetCache ?? false
|
|
850
816
|
};
|