UNPKG

alwaysai

Version:

The alwaysAI command-line interface (CLI)

15 lines 550 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const url_1 = require("url"); // E.g. https://alwaysai-models-dev.s3.us-west-2.amazonaws.com/3cee8cd5-582d-4374-a3a0-ca034730a672.tar.gz function parsePackageUrl(packageUrl) { const url = new url_1.URL(packageUrl); const [bucketName, , awsRegion] = url.hostname.split('.'); return { bucketName, awsRegion, bucketKey: url.pathname.slice(1), }; } exports.parsePackageUrl = parsePackageUrl; //# sourceMappingURL=parse-package-url.js.map