lamsal-kit 1.0.4 → 1.0.6
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 -6
- 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.6",
|
|
26839
26839
|
main: "build/lamsal-kit.js",
|
|
26840
26840
|
types: "build/lamsal-kit.d.ts",
|
|
26841
26841
|
scripts: {
|
|
@@ -26879,12 +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(
|
|
26886
|
-
(res) => res.json()
|
|
26887
|
-
);
|
|
26885
|
+
return fetch(process6.env["REGISTRY_JSON"] ?? "https://romanlamsal.github.io/lamsal-kit/registry.json").then((res) => res.json()).then((res) => res.entries);
|
|
26888
26886
|
}
|
|
26889
26887
|
async function getAdded() {
|
|
26890
26888
|
const registeredSources = registry2.map((regEntry) => regEntry.name);
|
|
@@ -26900,7 +26898,7 @@ async function getAdded() {
|
|
|
26900
26898
|
return dist_default2({
|
|
26901
26899
|
message: "Code to add",
|
|
26902
26900
|
choices: registeredSources
|
|
26903
|
-
});
|
|
26901
|
+
}).catch((e) => e instanceof Error && e.name === "ExitPromptError" ? null : e);
|
|
26904
26902
|
} catch (err) {
|
|
26905
26903
|
if (err instanceof Error && err.name === "ExitPromptError") {
|
|
26906
26904
|
console.log("Aborted.");
|