@gigadrive/network-config 3.4.16 → 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 +4 -9
- package/dist/nextjs-entrypoint-templates/edge-web.mjs +0 -90
- package/dist/nextjs-entrypoint-templates/node-middleware-web.mjs +0 -87
- package/dist/nextjs-entrypoint-templates/node-route.mjs +0 -62
- 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,82 @@ 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 resolveStandaloneServer = import_effect4.Effect.fn("nextjs.resolveStandaloneServer")(function* (projectFolder, distDir, repoRootToProject) {
|
|
398
|
+
const fs = yield* import_platform4.FileSystem.FileSystem;
|
|
399
|
+
const pathService = yield* import_platform4.Path.Path;
|
|
400
|
+
const standaloneRoot = pathService.join(projectFolder, distDir, "standalone");
|
|
401
|
+
const monorepoServer = pathService.join(standaloneRoot, repoRootToProject, "server.js");
|
|
402
|
+
const rootServer = pathService.join(standaloneRoot, "server.js");
|
|
403
|
+
const monorepoServerExists = yield* fs.exists(monorepoServer).pipe(import_effect4.Effect.catchAll(() => import_effect4.Effect.succeed(false)));
|
|
404
|
+
const serverPath = monorepoServerExists ? monorepoServer : rootServer;
|
|
405
|
+
const serverExists = yield* fs.exists(serverPath).pipe(import_effect4.Effect.catchAll(() => import_effect4.Effect.succeed(false)));
|
|
406
|
+
if (!serverExists) return void 0;
|
|
407
|
+
const serverDirectory = pathService.dirname(serverPath);
|
|
408
|
+
const entrypoint = toPortablePath(pathService.relative(standaloneRoot, serverPath));
|
|
409
|
+
return { standaloneRoot, serverDirectory, entrypoint };
|
|
410
|
+
});
|
|
411
|
+
var buildStandalonePublicAssets = import_effect4.Effect.fn("nextjs.buildStandalonePublicAssets")(function* (projectFolder, standaloneRoot, serverDirectory) {
|
|
412
|
+
const pathService = yield* import_platform4.Path.Path;
|
|
413
|
+
const publicFiles = yield* getDefaultPathMap(pathService.join(projectFolder, "public"));
|
|
414
|
+
const assetPaths = [];
|
|
415
|
+
const assetOverrides = {};
|
|
416
|
+
const filePathMap = {};
|
|
417
|
+
for (const [absolutePath, relativePath] of Object.entries(publicFiles)) {
|
|
418
|
+
const portableRelativePath = toPortablePath(relativePath);
|
|
419
|
+
const projectRelativePath = toPortablePath(pathService.relative(projectFolder, absolutePath));
|
|
420
|
+
assetPaths.push(projectRelativePath);
|
|
421
|
+
assetOverrides[projectRelativePath] = { path: portableRelativePath };
|
|
422
|
+
filePathMap[absolutePath] = toPortablePath(
|
|
423
|
+
pathService.relative(standaloneRoot, pathService.join(serverDirectory, "public", relativePath))
|
|
424
|
+
);
|
|
425
|
+
}
|
|
426
|
+
return { assetPaths, assetOverrides, filePathMap };
|
|
427
|
+
});
|
|
367
428
|
var createStaticExportConfig = import_effect4.Effect.fn("nextjs.createStaticExportConfig")(function* (defaults, projectFolder) {
|
|
368
429
|
const pathService = yield* import_platform4.Path.Path;
|
|
369
430
|
const outputDirectory = pathService.join(projectFolder, "out");
|
|
@@ -389,35 +450,15 @@ var createStaticExportConfig = import_effect4.Effect.fn("nextjs.createStaticExpo
|
|
|
389
450
|
};
|
|
390
451
|
});
|
|
391
452
|
var createStandaloneConfig = import_effect4.Effect.fn("nextjs.createStandaloneConfig")(function* (defaults, projectFolder, manifest) {
|
|
392
|
-
const fs = yield* import_platform4.FileSystem.FileSystem;
|
|
393
453
|
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
|
-
}
|
|
454
|
+
const resolved = yield* resolveStandaloneServer(projectFolder, manifest.distDir, manifest.repoRootToProject);
|
|
455
|
+
if (!resolved) return defaults;
|
|
456
|
+
const { standaloneRoot, serverDirectory, entrypoint } = resolved;
|
|
457
|
+
const publicAssets = yield* buildStandalonePublicAssets(projectFolder, standaloneRoot, serverDirectory);
|
|
458
|
+
const assetPaths = [...publicAssets.assetPaths];
|
|
459
|
+
const assetOverrides = { ...publicAssets.assetOverrides };
|
|
460
|
+
const filePathMap = { ...publicAssets.filePathMap };
|
|
461
|
+
const staticFiles = yield* getDefaultPathMap(pathService.join(projectFolder, manifest.distDir, "static"));
|
|
421
462
|
for (const [absolutePath, relativePath] of Object.entries(staticFiles)) {
|
|
422
463
|
const portableRelativePath = toPortablePath(relativePath);
|
|
423
464
|
const projectRelativePath = toPortablePath(pathService.relative(projectFolder, absolutePath));
|
|
@@ -442,92 +483,25 @@ var createStandaloneConfig = import_effect4.Effect.fn("nextjs.createStandaloneCo
|
|
|
442
483
|
}
|
|
443
484
|
};
|
|
444
485
|
});
|
|
445
|
-
var
|
|
486
|
+
var createStandaloneV2Config = import_effect4.Effect.fn("nextjs.createStandaloneV2Config")(function* (defaults, projectFolder, manifest) {
|
|
446
487
|
const pathService = yield* import_platform4.Path.Path;
|
|
488
|
+
const resolved = yield* resolveStandaloneServer(projectFolder, manifest.distDir, manifest.repoRootToProject);
|
|
489
|
+
if (!resolved) return defaults;
|
|
490
|
+
const { standaloneRoot, serverDirectory, entrypoint } = resolved;
|
|
447
491
|
let repoRoot = projectFolder;
|
|
448
492
|
if (manifest.repoRootToProject !== ".") {
|
|
449
493
|
repoRoot = manifest.repoRootToProject.split("/").reduce((root) => pathService.dirname(root), repoRoot);
|
|
450
494
|
}
|
|
451
|
-
const
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
const [targetPath, sourcePath] = identity.split("\0");
|
|
462
|
-
sharedFilePathMap[pathService.join(repoRoot, sourcePath)] = targetPath;
|
|
463
|
-
}
|
|
464
|
-
const sharedArtifacts = Object.keys(sharedFilePathMap).length > 0 ? [{ id: "next-shared", filePathMap: sharedFilePathMap }] : [];
|
|
465
|
-
const executablePathByOutputId = new Map(
|
|
466
|
-
[
|
|
467
|
-
...manifest.outputs.pages,
|
|
468
|
-
...manifest.outputs.pagesApi,
|
|
469
|
-
...manifest.outputs.appPages,
|
|
470
|
-
...manifest.outputs.appRoutes,
|
|
471
|
-
...manifest.outputs.middleware ? [manifest.outputs.middleware] : []
|
|
472
|
-
].map((output) => [output.id, output.edgeRuntime?.modulePath ?? output.filePath])
|
|
473
|
-
);
|
|
474
|
-
const entrypoints = manifest.entrypoints.map((entrypoint) => {
|
|
475
|
-
const filePathMap = {};
|
|
476
|
-
for (const [targetPath, sourcePath] of Object.entries({
|
|
477
|
-
...entrypoint.assets,
|
|
478
|
-
...entrypoint.wasmAssets
|
|
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;
|
|
491
|
-
}
|
|
492
|
-
filePathMap[pathService.join(repoRoot, entrypoint.filePath)] = entrypoint.filePath;
|
|
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
|
-
}
|
|
495
|
+
const publicAssets = yield* buildStandalonePublicAssets(projectFolder, standaloneRoot, serverDirectory);
|
|
496
|
+
const assetPaths = [...publicAssets.assetPaths];
|
|
497
|
+
const assetOverrides = { ...publicAssets.assetOverrides };
|
|
498
|
+
const filePathMap = { ...publicAssets.filePathMap };
|
|
499
|
+
const assetPrefixes = manifest.outputs.staticAssets.map((staticAsset) => ({
|
|
500
|
+
source: staticAsset.sourceDir,
|
|
501
|
+
destination: staticAsset.urlPrefix,
|
|
502
|
+
immutable: staticAsset.immutable,
|
|
503
|
+
populateCache: true
|
|
504
|
+
}));
|
|
531
505
|
const prerenders = manifest.outputs.prerenders.map((output) => {
|
|
532
506
|
if (!output.fallback?.filePath) return output;
|
|
533
507
|
const absolutePath = pathService.join(repoRoot, output.fallback.filePath);
|
|
@@ -541,17 +515,35 @@ var createAdapterV2Config = import_effect4.Effect.fn("nextjs.createAdapterV2Conf
|
|
|
541
515
|
fallback: { ...output.fallback, filePath: `/${internalAssetPath}` }
|
|
542
516
|
};
|
|
543
517
|
});
|
|
518
|
+
const singleEntrypoint = {
|
|
519
|
+
displayName: "next-server",
|
|
520
|
+
path: entrypoint,
|
|
521
|
+
runtime: defaults.runtime,
|
|
522
|
+
memory: defaults.memory,
|
|
523
|
+
maxDuration: manifest.server.maxDuration ?? defaults.maxDuration,
|
|
524
|
+
streaming: true,
|
|
525
|
+
environmentVariables: {
|
|
526
|
+
NEXT_BUILD_ID: manifest.buildId,
|
|
527
|
+
...manifest.server.env
|
|
528
|
+
},
|
|
529
|
+
package: {
|
|
530
|
+
trace: false,
|
|
531
|
+
rootOverwrite: standaloneRoot,
|
|
532
|
+
filePathMap
|
|
533
|
+
}
|
|
534
|
+
};
|
|
544
535
|
const framework = {
|
|
545
536
|
mode: manifest.mode,
|
|
546
537
|
distDir: manifest.distDir,
|
|
547
538
|
repoRootToProject: manifest.repoRootToProject,
|
|
548
539
|
nextVersion: manifest.nextVersion,
|
|
549
540
|
buildId: manifest.buildId,
|
|
541
|
+
server: manifest.server,
|
|
550
542
|
config: manifest.config,
|
|
551
543
|
routing: manifest.routing,
|
|
552
|
-
outputs: manifest.outputs,
|
|
553
|
-
|
|
554
|
-
|
|
544
|
+
outputs: { prerenders, staticAssets: manifest.outputs.staticAssets },
|
|
545
|
+
type: "nextjs",
|
|
546
|
+
schemaVersion: 2
|
|
555
547
|
};
|
|
556
548
|
return {
|
|
557
549
|
...defaults,
|
|
@@ -559,22 +551,27 @@ var createAdapterV2Config = import_effect4.Effect.fn("nextjs.createAdapterV2Conf
|
|
|
559
551
|
routes: [],
|
|
560
552
|
assetPaths,
|
|
561
553
|
assetOverrides,
|
|
554
|
+
assetPrefixes,
|
|
562
555
|
assetsDir: manifest.distDir,
|
|
563
556
|
assetsPrefixToStrip: "",
|
|
557
|
+
populateAssetCache: true,
|
|
564
558
|
package: void 0,
|
|
565
559
|
normalizedConfig: {
|
|
566
|
-
regions: [
|
|
567
|
-
entrypoints,
|
|
568
|
-
routes: [
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
560
|
+
regions: [...AVAILABLE_REGIONS],
|
|
561
|
+
entrypoints: [singleEntrypoint],
|
|
562
|
+
routes: [
|
|
563
|
+
{
|
|
564
|
+
path: "/*",
|
|
565
|
+
destination: entrypoint,
|
|
566
|
+
handler: "SERVERLESS_FUNCTION_STREAMING",
|
|
567
|
+
methods: ["ANY"],
|
|
568
|
+
headers: {}
|
|
569
|
+
}
|
|
570
|
+
],
|
|
571
|
+
framework,
|
|
575
572
|
images: manifest.config.images,
|
|
576
|
-
sharedArtifacts,
|
|
577
|
-
userArchive: { rootOverwrite:
|
|
573
|
+
sharedArtifacts: [],
|
|
574
|
+
userArchive: { rootOverwrite: standaloneRoot }
|
|
578
575
|
}
|
|
579
576
|
};
|
|
580
577
|
});
|
|
@@ -602,7 +599,7 @@ var nextjs = {
|
|
|
602
599
|
const manifest = manifestContent ? parseGigadriveNextBuildManifest(manifestContent) : void 0;
|
|
603
600
|
if (!manifest) return defaults;
|
|
604
601
|
if (manifest.version === 2) {
|
|
605
|
-
return manifest.mode === "export" ? yield* createStaticExportConfig(defaults, projectFolder) : yield*
|
|
602
|
+
return manifest.mode === "export" ? yield* createStaticExportConfig(defaults, projectFolder) : yield* createStandaloneV2Config(defaults, projectFolder, manifest);
|
|
606
603
|
}
|
|
607
604
|
return manifest.output === "export" ? yield* createStaticExportConfig(defaults, projectFolder) : yield* createStandaloneConfig(defaults, projectFolder, manifest);
|
|
608
605
|
})
|
|
@@ -763,30 +760,6 @@ var FRAMEWORK_DEFINITIONS = [
|
|
|
763
760
|
|
|
764
761
|
// src/detection/generate-config.ts
|
|
765
762
|
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
763
|
var getInstallCommand = (pm) => {
|
|
791
764
|
switch (pm) {
|
|
792
765
|
case "bun":
|
|
@@ -840,11 +813,12 @@ var generateConfig = import_effect6.Effect.fn("generateConfig")(function* (frame
|
|
|
840
813
|
errors: [],
|
|
841
814
|
...defaults.normalizedConfig
|
|
842
815
|
};
|
|
843
|
-
if (defaults.assetsDir || defaults.assetPaths) {
|
|
816
|
+
if (defaults.assetsDir || defaults.assetPaths || defaults.assetPrefixes) {
|
|
844
817
|
config.assets = {
|
|
845
818
|
paths: defaults.assetPaths ? [...defaults.assetPaths] : [],
|
|
846
819
|
prefixToStrip: defaults.assetsPrefixToStrip ?? (defaults.assetsDir ? defaults.assetsDir + "/" : ""),
|
|
847
820
|
overrides: defaults.assetOverrides ? { ...defaults.assetOverrides } : void 0,
|
|
821
|
+
prefixes: defaults.assetPrefixes ? defaults.assetPrefixes.map((prefix) => ({ ...prefix })) : void 0,
|
|
848
822
|
dynamicRoutes: true,
|
|
849
823
|
populateCache: defaults.populateAssetCache ?? false
|
|
850
824
|
};
|