@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.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,83 @@ 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 MAXIMUM_ENTRY_PAGE_PATHS = 50;
|
|
331
|
+
var resolveStandaloneServer = Effect4.fn("nextjs.resolveStandaloneServer")(function* (projectFolder, distDir, repoRootToProject) {
|
|
332
|
+
const fs = yield* FileSystem4.FileSystem;
|
|
333
|
+
const pathService = yield* Path3.Path;
|
|
334
|
+
const standaloneRoot = pathService.join(projectFolder, distDir, "standalone");
|
|
335
|
+
const monorepoServer = pathService.join(standaloneRoot, repoRootToProject, "server.js");
|
|
336
|
+
const rootServer = pathService.join(standaloneRoot, "server.js");
|
|
337
|
+
const monorepoServerExists = yield* fs.exists(monorepoServer).pipe(Effect4.catchAll(() => Effect4.succeed(false)));
|
|
338
|
+
const serverPath = monorepoServerExists ? monorepoServer : rootServer;
|
|
339
|
+
const serverExists = yield* fs.exists(serverPath).pipe(Effect4.catchAll(() => Effect4.succeed(false)));
|
|
340
|
+
if (!serverExists) return void 0;
|
|
341
|
+
const serverDirectory = pathService.dirname(serverPath);
|
|
342
|
+
const entrypoint = toPortablePath(pathService.relative(standaloneRoot, serverPath));
|
|
343
|
+
return { standaloneRoot, serverDirectory, entrypoint };
|
|
344
|
+
});
|
|
345
|
+
var buildStandalonePublicAssets = Effect4.fn("nextjs.buildStandalonePublicAssets")(function* (projectFolder, standaloneRoot, serverDirectory) {
|
|
346
|
+
const pathService = yield* Path3.Path;
|
|
347
|
+
const publicFiles = yield* getDefaultPathMap(pathService.join(projectFolder, "public"));
|
|
348
|
+
const assetPaths = [];
|
|
349
|
+
const assetOverrides = {};
|
|
350
|
+
const filePathMap = {};
|
|
351
|
+
for (const [absolutePath, relativePath] of Object.entries(publicFiles)) {
|
|
352
|
+
const portableRelativePath = toPortablePath(relativePath);
|
|
353
|
+
const projectRelativePath = toPortablePath(pathService.relative(projectFolder, absolutePath));
|
|
354
|
+
assetPaths.push(projectRelativePath);
|
|
355
|
+
assetOverrides[projectRelativePath] = { path: portableRelativePath };
|
|
356
|
+
filePathMap[absolutePath] = toPortablePath(
|
|
357
|
+
pathService.relative(standaloneRoot, pathService.join(serverDirectory, "public", relativePath))
|
|
358
|
+
);
|
|
359
|
+
}
|
|
360
|
+
return { assetPaths, assetOverrides, filePathMap };
|
|
361
|
+
});
|
|
300
362
|
var createStaticExportConfig = Effect4.fn("nextjs.createStaticExportConfig")(function* (defaults, projectFolder) {
|
|
301
363
|
const pathService = yield* Path3.Path;
|
|
302
364
|
const outputDirectory = pathService.join(projectFolder, "out");
|
|
@@ -322,35 +384,15 @@ var createStaticExportConfig = Effect4.fn("nextjs.createStaticExportConfig")(fun
|
|
|
322
384
|
};
|
|
323
385
|
});
|
|
324
386
|
var createStandaloneConfig = Effect4.fn("nextjs.createStandaloneConfig")(function* (defaults, projectFolder, manifest) {
|
|
325
|
-
const fs = yield* FileSystem4.FileSystem;
|
|
326
387
|
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
|
-
}
|
|
388
|
+
const resolved = yield* resolveStandaloneServer(projectFolder, manifest.distDir, manifest.repoRootToProject);
|
|
389
|
+
if (!resolved) return defaults;
|
|
390
|
+
const { standaloneRoot, serverDirectory, entrypoint } = resolved;
|
|
391
|
+
const publicAssets = yield* buildStandalonePublicAssets(projectFolder, standaloneRoot, serverDirectory);
|
|
392
|
+
const assetPaths = [...publicAssets.assetPaths];
|
|
393
|
+
const assetOverrides = { ...publicAssets.assetOverrides };
|
|
394
|
+
const filePathMap = { ...publicAssets.filePathMap };
|
|
395
|
+
const staticFiles = yield* getDefaultPathMap(pathService.join(projectFolder, manifest.distDir, "static"));
|
|
354
396
|
for (const [absolutePath, relativePath] of Object.entries(staticFiles)) {
|
|
355
397
|
const portableRelativePath = toPortablePath(relativePath);
|
|
356
398
|
const projectRelativePath = toPortablePath(pathService.relative(projectFolder, absolutePath));
|
|
@@ -375,116 +417,58 @@ var createStandaloneConfig = Effect4.fn("nextjs.createStandaloneConfig")(functio
|
|
|
375
417
|
}
|
|
376
418
|
};
|
|
377
419
|
});
|
|
378
|
-
var
|
|
379
|
-
const
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
const
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
const
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
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;
|
|
420
|
+
var createStandaloneV2Config = Effect4.fn("nextjs.createStandaloneV2Config")(function* (defaults, projectFolder, manifest) {
|
|
421
|
+
const resolved = yield* resolveStandaloneServer(projectFolder, manifest.distDir, manifest.repoRootToProject);
|
|
422
|
+
if (!resolved) return defaults;
|
|
423
|
+
const { standaloneRoot, serverDirectory, entrypoint } = resolved;
|
|
424
|
+
const publicAssets = yield* buildStandalonePublicAssets(projectFolder, standaloneRoot, serverDirectory);
|
|
425
|
+
const assetPaths = [...publicAssets.assetPaths];
|
|
426
|
+
const assetOverrides = { ...publicAssets.assetOverrides };
|
|
427
|
+
const filePathMap = { ...publicAssets.filePathMap };
|
|
428
|
+
const assetPrefixes = manifest.outputs.staticAssets.map((staticAsset) => ({
|
|
429
|
+
source: staticAsset.sourceDir,
|
|
430
|
+
destination: staticAsset.urlPrefix,
|
|
431
|
+
immutable: staticAsset.immutable,
|
|
432
|
+
populateCache: true
|
|
433
|
+
}));
|
|
434
|
+
const entryPagePaths = [
|
|
435
|
+
...new Set(
|
|
436
|
+
manifest.outputs.prerenders.filter((output) => !output.fallback?.postponedState).map((output) => output.pathname).filter((pathname) => pathname.startsWith("/") && !pathname.includes("["))
|
|
437
|
+
)
|
|
438
|
+
].sort((left, right) => left.split("/").length - right.split("/").length || left.localeCompare(right)).slice(0, MAXIMUM_ENTRY_PAGE_PATHS);
|
|
439
|
+
const singleEntrypoint = {
|
|
440
|
+
displayName: "next-server",
|
|
441
|
+
path: entrypoint,
|
|
442
|
+
runtime: defaults.runtime,
|
|
443
|
+
memory: defaults.memory,
|
|
444
|
+
maxDuration: manifest.server.maxDuration ?? defaults.maxDuration,
|
|
445
|
+
streaming: true,
|
|
446
|
+
environmentVariables: {
|
|
447
|
+
NEXT_BUILD_ID: manifest.buildId,
|
|
448
|
+
...manifest.server.env
|
|
449
|
+
},
|
|
450
|
+
package: {
|
|
451
|
+
trace: false,
|
|
452
|
+
rootOverwrite: standaloneRoot,
|
|
453
|
+
filePathMap
|
|
424
454
|
}
|
|
425
|
-
|
|
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
|
-
}
|
|
464
|
-
const prerenders = manifest.outputs.prerenders.map((output) => {
|
|
465
|
-
if (!output.fallback?.filePath) return output;
|
|
466
|
-
const absolutePath = pathService.join(repoRoot, output.fallback.filePath);
|
|
467
|
-
const projectRelativePath = toPortablePath(pathService.relative(projectFolder, absolutePath));
|
|
468
|
-
if (projectRelativePath.startsWith("../")) return output;
|
|
469
|
-
const internalAssetPath = `_gigadrive/prerender/${encodeURIComponent(output.id)}.html`;
|
|
470
|
-
assetPaths.push(projectRelativePath);
|
|
471
|
-
assetOverrides[projectRelativePath] = { path: internalAssetPath };
|
|
472
|
-
return {
|
|
473
|
-
...output,
|
|
474
|
-
fallback: { ...output.fallback, filePath: `/${internalAssetPath}` }
|
|
475
|
-
};
|
|
476
|
-
});
|
|
455
|
+
};
|
|
477
456
|
const framework = {
|
|
478
457
|
mode: manifest.mode,
|
|
479
458
|
distDir: manifest.distDir,
|
|
480
459
|
repoRootToProject: manifest.repoRootToProject,
|
|
481
460
|
nextVersion: manifest.nextVersion,
|
|
482
461
|
buildId: manifest.buildId,
|
|
462
|
+
server: manifest.server,
|
|
483
463
|
config: manifest.config,
|
|
484
464
|
routing: manifest.routing,
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
465
|
+
// The prerender table is deliberately not forwarded: the standalone server
|
|
466
|
+
// serves build-time prerenders from its own bundle, so the platform only
|
|
467
|
+
// needs the warming sample below.
|
|
468
|
+
outputs: { prerenders: [], staticAssets: manifest.outputs.staticAssets },
|
|
469
|
+
entryPagePaths,
|
|
470
|
+
type: "nextjs",
|
|
471
|
+
schemaVersion: 2
|
|
488
472
|
};
|
|
489
473
|
return {
|
|
490
474
|
...defaults,
|
|
@@ -492,22 +476,27 @@ var createAdapterV2Config = Effect4.fn("nextjs.createAdapterV2Config")(function*
|
|
|
492
476
|
routes: [],
|
|
493
477
|
assetPaths,
|
|
494
478
|
assetOverrides,
|
|
479
|
+
assetPrefixes,
|
|
495
480
|
assetsDir: manifest.distDir,
|
|
496
481
|
assetsPrefixToStrip: "",
|
|
482
|
+
populateAssetCache: true,
|
|
497
483
|
package: void 0,
|
|
498
484
|
normalizedConfig: {
|
|
499
|
-
regions: [
|
|
500
|
-
entrypoints,
|
|
501
|
-
routes: [
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
485
|
+
regions: [...AVAILABLE_REGIONS],
|
|
486
|
+
entrypoints: [singleEntrypoint],
|
|
487
|
+
routes: [
|
|
488
|
+
{
|
|
489
|
+
path: "/*",
|
|
490
|
+
destination: entrypoint,
|
|
491
|
+
handler: "SERVERLESS_FUNCTION_STREAMING",
|
|
492
|
+
methods: ["ANY"],
|
|
493
|
+
headers: {}
|
|
494
|
+
}
|
|
495
|
+
],
|
|
496
|
+
framework,
|
|
508
497
|
images: manifest.config.images,
|
|
509
|
-
sharedArtifacts,
|
|
510
|
-
userArchive: { rootOverwrite:
|
|
498
|
+
sharedArtifacts: [],
|
|
499
|
+
userArchive: { rootOverwrite: standaloneRoot }
|
|
511
500
|
}
|
|
512
501
|
};
|
|
513
502
|
});
|
|
@@ -535,7 +524,7 @@ var nextjs = {
|
|
|
535
524
|
const manifest = manifestContent ? parseGigadriveNextBuildManifest(manifestContent) : void 0;
|
|
536
525
|
if (!manifest) return defaults;
|
|
537
526
|
if (manifest.version === 2) {
|
|
538
|
-
return manifest.mode === "export" ? yield* createStaticExportConfig(defaults, projectFolder) : yield*
|
|
527
|
+
return manifest.mode === "export" ? yield* createStaticExportConfig(defaults, projectFolder) : yield* createStandaloneV2Config(defaults, projectFolder, manifest);
|
|
539
528
|
}
|
|
540
529
|
return manifest.output === "export" ? yield* createStaticExportConfig(defaults, projectFolder) : yield* createStandaloneConfig(defaults, projectFolder, manifest);
|
|
541
530
|
})
|
|
@@ -696,30 +685,6 @@ var FRAMEWORK_DEFINITIONS = [
|
|
|
696
685
|
|
|
697
686
|
// src/detection/generate-config.ts
|
|
698
687
|
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
688
|
var getInstallCommand = (pm) => {
|
|
724
689
|
switch (pm) {
|
|
725
690
|
case "bun":
|
|
@@ -773,11 +738,12 @@ var generateConfig = Effect6.fn("generateConfig")(function* (framework, packageM
|
|
|
773
738
|
errors: [],
|
|
774
739
|
...defaults.normalizedConfig
|
|
775
740
|
};
|
|
776
|
-
if (defaults.assetsDir || defaults.assetPaths) {
|
|
741
|
+
if (defaults.assetsDir || defaults.assetPaths || defaults.assetPrefixes) {
|
|
777
742
|
config.assets = {
|
|
778
743
|
paths: defaults.assetPaths ? [...defaults.assetPaths] : [],
|
|
779
744
|
prefixToStrip: defaults.assetsPrefixToStrip ?? (defaults.assetsDir ? defaults.assetsDir + "/" : ""),
|
|
780
745
|
overrides: defaults.assetOverrides ? { ...defaults.assetOverrides } : void 0,
|
|
746
|
+
prefixes: defaults.assetPrefixes ? defaults.assetPrefixes.map((prefix) => ({ ...prefix })) : void 0,
|
|
781
747
|
dynamicRoutes: true,
|
|
782
748
|
populateCache: defaults.populateAssetCache ?? false
|
|
783
749
|
};
|