Skip to content

Commit

Permalink
chore: fix filename generation
Browse files Browse the repository at this point in the history
  • Loading branch information
mabels committed Jan 13, 2025
1 parent f333d90 commit 6d118bd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/blockstore/register-store-protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export function registerStoreProtocol(item: SerdeOrGatewayFactoryItem): () => vo
serdegateway = async (sthis) => {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const m = await item.gateway!(sthis);
// console.log("Gateway Plug in DefSerdeGateway", m);
return new DefSerdeGateway(m);
};
} else {
Expand Down
18 changes: 9 additions & 9 deletions src/runtime/gateways/file/gateway-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ export class FileGateway implements Gateway {
getFilePath(url: URI, sthis: SuperThis): string {
const key = url.getParam(PARAM.KEY);
if (!key) throw sthis.logger.Error().Url(url).Msg(`key not found`).AsError();
const urlGen = url.getParam(PARAM.URL_GEN);
switch (urlGen) {
case "default":
return sthis.pathOps.join(getPath(url, sthis), getFileName(url, sthis));
case "fromEnv":
return sthis.pathOps.join(getPath(url, sthis), key);
default:
break;
}
// const urlGen = url.getParam(PARAM.URL_GEN);
// switch (urlGen) {
// case "default":
// return sthis.pathOps.join(getPath(url, sthis), getFileName(url, sthis));
// case "fromEnv":
// return sthis.pathOps.join(getPath(url, sthis), getFileName(url, sthis));
// default:
// break;
// }
return sthis.pathOps.join(getPath(url, sthis), getFileName(url, sthis));
}

Expand Down

0 comments on commit 6d118bd

Please sign in to comment.