Skip to content

Commit aedd152

Browse files
committed
chore: add support for 'file' uri authority in deploy modules
1 parent ce780f4 commit aedd152

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

packages/cli/src/lib/defaults/deploy-modules/http/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class HTTPDeployer implements DeployModule {
4343
}
4444

4545
let response;
46-
if (uri.authority === "fs") {
46+
if (uri.authority === "fs" || uri.authority === "file") {
4747
// URI is a FileSystem URI, so we read the directory and publish it
4848
const formData = dirToFormData(uri.path);
4949

packages/cli/src/lib/defaults/deploy-modules/ipfs/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import { Uri } from "@polywrap/core-js";
66
const IPFSClient = require("ipfs-http-client");
77
const { globSource } = IPFSClient;
88

9-
const isValidUri = (uri: Uri) => uri.authority === "fs";
9+
const isValidUri = (uri: Uri) =>
10+
uri.authority === "fs" || uri.authority === "file";
1011

1112
class IPFSDeployer implements DeployModule {
1213
async execute(uri: Uri, config?: { gatewayUri: string }): Promise<Uri> {

0 commit comments

Comments
 (0)