Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions alchemy/src/cloudflare/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -851,9 +851,7 @@ const _Worker = Resource(
) {
let adopt = props.adopt ?? this.scope.adopt;
const workerName =
props.name ??
this.output?.name ??
this.scope.createPhysicalName(id).toLowerCase();
props.name ?? this.output?.name ?? this.scope.createPhysicalName(id);
if (this.phase === "create" && !props.adopt) {
// it is possible that this worker already exists and was created by the old Website wrapper with a nested scope
// we need to detect this and set adopt=true so that the previous version will be adopted seamlessly
Expand Down
3 changes: 2 additions & 1 deletion alchemy/src/scope.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,8 @@ export class Scope {
const stage = this.stage;
return [app, ...this.chain.slice(2), id, stage]
.map((s) => s.replaceAll(/[^a-z0-9_-]/gi, delimiter))
.join(delimiter);
.join(delimiter)
.toLowerCase();
}

public async spawn<
Expand Down
Loading