@workflow/next 4.0.5 → 4.0.7
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/builder-deferred.d.ts.map +1 -1
- package/dist/builder-deferred.js +7 -3
- package/dist/builder-deferred.js.map +1 -1
- package/dist/builder-eager.d.ts.map +1 -1
- package/dist/builder-eager.js +8 -0
- package/dist/builder-eager.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +151 -1
- package/dist/index.js.map +1 -1
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js +27 -2
- package/dist/loader.js.map +1 -1
- package/dist/socket-server.d.ts +20 -0
- package/dist/socket-server.d.ts.map +1 -1
- package/dist/socket-server.js +28 -1
- package/dist/socket-server.js.map +1 -1
- package/docs/api-reference/with-workflow.mdx +10 -0
- package/docs/next.mdx +5 -3
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder-deferred.d.ts","sourceRoot":"","sources":["../src/builder-deferred.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"builder-deferred.d.ts","sourceRoot":"","sources":["../src/builder-deferred.ts"],"names":[],"mappings":"AAiDA,wBAAsB,sBAAsB,iBAu+D3C"}
|
package/dist/builder-deferred.js
CHANGED
|
@@ -366,6 +366,9 @@ async function getNextBuilderDeferred() {
|
|
|
366
366
|
if (this.shouldExposePublicManifest && manifestJson) {
|
|
367
367
|
const publicManifestDir = (0, node_path_1.join)(this.config.workingDir, 'public/.well-known/workflow/v1');
|
|
368
368
|
await (0, promises_1.mkdir)(publicManifestDir, { recursive: true });
|
|
369
|
+
if (process.env.VERCEL_DEPLOYMENT_ID === undefined) {
|
|
370
|
+
await this.writeFileIfChanged((0, node_path_1.join)(publicManifestDir, '.gitignore'), '*');
|
|
371
|
+
}
|
|
369
372
|
await this.copyFileIfChanged(manifestFilePath, (0, node_path_1.join)(publicManifestDir, 'manifest.json'));
|
|
370
373
|
}
|
|
371
374
|
// Notify deferred entry loaders waiting on route.js stubs.
|
|
@@ -387,8 +390,9 @@ async function getNextBuilderDeferred() {
|
|
|
387
390
|
(0, node_path_1.join)(webhookRouteDir, 'route.js.temp'),
|
|
388
391
|
(0, node_path_1.join)(workflowGeneratedDir, 'manifest.json'),
|
|
389
392
|
];
|
|
390
|
-
await Promise.all(staleArtifactPaths.map((stalePath) => (0, promises_1.rm)(stalePath, { recursive: true, force: true })));
|
|
391
393
|
await Promise.all([
|
|
394
|
+
...staleArtifactPaths.map((stalePath) => (0, promises_1.rm)(stalePath, { recursive: true, force: true })),
|
|
395
|
+
(0, socket_server_js_1.cleanupStaleSocketInfoFiles)((0, node_path_1.join)(this.config.workingDir, this.getDistDir())),
|
|
392
396
|
this.removeStaleDeferredTempFiles(flowRouteDir),
|
|
393
397
|
this.removeStaleDeferredTempFiles(stepRouteDir),
|
|
394
398
|
this.removeStaleDeferredTempFiles(webhookRouteDir),
|
|
@@ -480,7 +484,7 @@ async function getNextBuilderDeferred() {
|
|
|
480
484
|
return (0, node_path_1.join)(this.config.workingDir, this.getDistDir(), 'cache', 'workflows.json');
|
|
481
485
|
}
|
|
482
486
|
getSocketInfoFilePath() {
|
|
483
|
-
return (0, node_path_1.join)(this.config.workingDir, this.getDistDir(),
|
|
487
|
+
return (0, node_path_1.join)(this.config.workingDir, this.getDistDir(), socket_server_js_1.SOCKET_INFO_FILENAME);
|
|
484
488
|
}
|
|
485
489
|
normalizeDiscoveredFilePath(filePath) {
|
|
486
490
|
return (0, node_path_1.isAbsolute)(filePath)
|
|
@@ -1326,7 +1330,7 @@ async function getNextBuilderDeferred() {
|
|
|
1326
1330
|
serdeImports
|
|
1327
1331
|
? `// Serde files for cross-context class registration\n${serdeImports}`
|
|
1328
1332
|
: '',
|
|
1329
|
-
"export { stepEntrypoint as POST } from 'workflow/runtime';",
|
|
1333
|
+
"export { stepEntrypoint as HEAD, stepEntrypoint as POST } from 'workflow/runtime';",
|
|
1330
1334
|
]
|
|
1331
1335
|
.filter(Boolean)
|
|
1332
1336
|
.join('\n');
|