@shopify/cli-kit
Version:
A set of utilities, interfaces, and models that are common across all the platform features
19 lines • 573 B
JavaScript
import { ExtendableError } from '../error.js';
import { err } from '../result.js';
export class TunnelError extends ExtendableError {
constructor(type, message) {
super(message);
this.type = type;
}
}
export const defineProvider = (input) => {
return async () => input;
};
export const startTunnel = (options) => {
return async (inputs) => {
if (inputs.provider !== options.provider)
return err(new TunnelError('invalid-provider'));
return options.action(inputs.port);
};
};
//# sourceMappingURL=tunnel.js.map