lamsal-kit 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lamsal-kit.js +4 -4
- package/package.json +1 -1
package/build/lamsal-kit.js
CHANGED
|
@@ -26835,7 +26835,7 @@ var require_package = __commonJS({
|
|
|
26835
26835
|
},
|
|
26836
26836
|
repository: "romanlamsal/lamsal-kit",
|
|
26837
26837
|
type: "module",
|
|
26838
|
-
version: "1.0.
|
|
26838
|
+
version: "1.0.7",
|
|
26839
26839
|
main: "build/lamsal-kit.js",
|
|
26840
26840
|
types: "build/lamsal-kit.d.ts",
|
|
26841
26841
|
scripts: {
|
|
@@ -26879,10 +26879,10 @@ import * as os from "node:os";
|
|
|
26879
26879
|
import { basename, dirname, join as join2 } from "node:path";
|
|
26880
26880
|
import process6 from "node:process";
|
|
26881
26881
|
async function getRegistry() {
|
|
26882
|
-
if (process6.env["REGISTRY_JSON"]) {
|
|
26882
|
+
if (process6.env["REGISTRY_JSON"] && !URL.canParse(process6.env["REGISTRY_JSON"])) {
|
|
26883
26883
|
return JSON.parse(readFileSync2(process6.env["REGISTRY_JSON"], "utf8"));
|
|
26884
26884
|
}
|
|
26885
|
-
return fetch("https://romanlamsal.github.io/lamsal-kit/registry.json").then((res) => res.json()).then((res) => res.entries);
|
|
26885
|
+
return fetch(process6.env["REGISTRY_JSON"] ?? "https://romanlamsal.github.io/lamsal-kit/registry.json").then((res) => res.json()).then((res) => res.entries);
|
|
26886
26886
|
}
|
|
26887
26887
|
async function getAdded() {
|
|
26888
26888
|
const registeredSources = registry2.map((regEntry) => regEntry.name);
|
|
@@ -26898,7 +26898,7 @@ async function getAdded() {
|
|
|
26898
26898
|
return dist_default2({
|
|
26899
26899
|
message: "Code to add",
|
|
26900
26900
|
choices: registeredSources
|
|
26901
|
-
});
|
|
26901
|
+
}).catch((e) => e instanceof Error && e.name === "ExitPromptError" ? process6.exit(1) : e);
|
|
26902
26902
|
} catch (err) {
|
|
26903
26903
|
if (err instanceof Error && err.name === "ExitPromptError") {
|
|
26904
26904
|
console.log("Aborted.");
|