@hype-stack/cli 0.2.4 → 0.3.0
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/dist/{cli-waqZgBpt.js → cli-CjTmOnzL.js} +18 -18
- package/dist/config/bin.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -2268,7 +2268,7 @@ var zn = 300 * 1e3, Bn = (e) => `<!doctype html><html><head><meta charset="utf-8
|
|
|
2268
2268
|
async function Vn(e = {}) {
|
|
2269
2269
|
let t = u(16).toString("hex"), n = k(), r = d.createServer(), i = await new Promise((n, i) => {
|
|
2270
2270
|
let a = setTimeout(() => {
|
|
2271
|
-
o(), i(/* @__PURE__ */ Error("Login timed out. Run `hype-stack login` again."));
|
|
2271
|
+
o(), i(/* @__PURE__ */ Error("Login timed out. Run `npx @hype-stack/cli login` again."));
|
|
2272
2272
|
}, zn);
|
|
2273
2273
|
function o() {
|
|
2274
2274
|
clearTimeout(a), r.close(), r.closeAllConnections?.();
|
|
@@ -2286,7 +2286,7 @@ async function Vn(e = {}) {
|
|
|
2286
2286
|
}), r.end(Bn(e));
|
|
2287
2287
|
};
|
|
2288
2288
|
if (a.searchParams.get("state") !== t) {
|
|
2289
|
-
s("Login failed."), o(), i(/* @__PURE__ */ Error("Login failed: state mismatch. Run `hype-stack login` again."));
|
|
2289
|
+
s("Login failed."), o(), i(/* @__PURE__ */ Error("Login failed: state mismatch. Run `npx @hype-stack/cli login` again."));
|
|
2290
2290
|
return;
|
|
2291
2291
|
}
|
|
2292
2292
|
let c = a.searchParams.get("token");
|
|
@@ -2332,14 +2332,14 @@ async function Un(e) {
|
|
|
2332
2332
|
].join("\n"), "Locked Packs");
|
|
2333
2333
|
let t = await o.confirm({ message: `Open the purchase ${e.length === 1 ? "page" : "pages"} in your browser?` });
|
|
2334
2334
|
if (o.isCancel(t) || !t) {
|
|
2335
|
-
o.log.info(L.muted("Run 'hype-stack login' after purchasing, then 'hype-stack compose' again."));
|
|
2335
|
+
o.log.info(L.muted("Run 'npx @hype-stack/cli login' after purchasing, then 'npx @hype-stack/cli compose' again."));
|
|
2336
2336
|
return;
|
|
2337
2337
|
}
|
|
2338
2338
|
for (let t of e) Rn(le(t.name));
|
|
2339
2339
|
o.log.info([
|
|
2340
2340
|
L.muted("After purchasing, run:"),
|
|
2341
|
-
` ${L.highlight("hype-stack login")}
|
|
2342
|
-
` ${L.highlight("hype-stack compose")}
|
|
2341
|
+
` ${L.highlight("npx @hype-stack/cli login")} ${L.muted("Save your access")}`,
|
|
2342
|
+
` ${L.highlight("npx @hype-stack/cli compose")} ${L.muted("Install the packs")}`
|
|
2343
2343
|
].join("\n"));
|
|
2344
2344
|
}
|
|
2345
2345
|
//#endregion
|
|
@@ -3109,7 +3109,7 @@ async function gi(e) {
|
|
|
3109
3109
|
}
|
|
3110
3110
|
async function _i(e) {
|
|
3111
3111
|
let { packs: t, config: n, projectRoot: r, slotsByPack: i } = e, a = n.paths;
|
|
3112
|
-
if (!a) throw Error("stack.json is missing 'paths' configuration. Run 'hype-stack init' to set it up.");
|
|
3112
|
+
if (!a) throw Error("stack.json is missing 'paths' configuration. Run 'npx @hype-stack/cli init' to set it up.");
|
|
3113
3113
|
let o = [], s = /* @__PURE__ */ new Set();
|
|
3114
3114
|
for (let e of t) {
|
|
3115
3115
|
let t = i?.get(e.manifest.name);
|
|
@@ -3132,7 +3132,7 @@ async function _i(e) {
|
|
|
3132
3132
|
}
|
|
3133
3133
|
async function vi(e) {
|
|
3134
3134
|
let { manifest: t, config: n, projectRoot: r, force: i, packDir: a, slots: o } = e, s = n.paths;
|
|
3135
|
-
if (!s) throw Error("stack.json is missing 'paths' configuration. Run 'hype-stack init' to set it up.");
|
|
3135
|
+
if (!s) throw Error("stack.json is missing 'paths' configuration. Run 'npx @hype-stack/cli init' to set it up.");
|
|
3136
3136
|
let c = [];
|
|
3137
3137
|
for (let e of t.files) {
|
|
3138
3138
|
if (!fi(e, o)) continue;
|
|
@@ -3149,7 +3149,7 @@ async function vi(e) {
|
|
|
3149
3149
|
}
|
|
3150
3150
|
async function yi(e) {
|
|
3151
3151
|
let { manifest: t, config: n, projectRoot: r, force: i, overwrite: a, packDir: o, slots: s } = e, c = n.paths;
|
|
3152
|
-
if (!c) throw Error("stack.json is missing 'paths' configuration. Run 'hype-stack init' to set it up.");
|
|
3152
|
+
if (!c) throw Error("stack.json is missing 'paths' configuration. Run 'npx @hype-stack/cli init' to set it up.");
|
|
3153
3153
|
let l = {
|
|
3154
3154
|
installed: [],
|
|
3155
3155
|
skipped: [],
|
|
@@ -3258,7 +3258,7 @@ async function xi(e, t, n) {
|
|
|
3258
3258
|
}
|
|
3259
3259
|
async function Si(e) {
|
|
3260
3260
|
let { manifest: t, config: n, projectRoot: r, templateDir: i } = e, a = n.paths;
|
|
3261
|
-
if (!a) throw Error("stack.json is missing 'paths' configuration. Run 'hype-stack init' to set it up.");
|
|
3261
|
+
if (!a) throw Error("stack.json is missing 'paths' configuration. Run 'npx @hype-stack/cli init' to set it up.");
|
|
3262
3262
|
let o = [], s = [];
|
|
3263
3263
|
for (let e of t.files) {
|
|
3264
3264
|
let t = await gi({
|
|
@@ -3940,7 +3940,7 @@ function Aa(e) {
|
|
|
3940
3940
|
"Pick the ones you want with the CLI:",
|
|
3941
3941
|
"",
|
|
3942
3942
|
"```bash",
|
|
3943
|
-
"npx hype-stack compose",
|
|
3943
|
+
"npx @hype-stack/cli compose",
|
|
3944
3944
|
"```",
|
|
3945
3945
|
"",
|
|
3946
3946
|
"Installed packs are tracked in `stack.json`."
|
|
@@ -4146,7 +4146,7 @@ async function Ua(a) {
|
|
|
4146
4146
|
async function Wa(e) {
|
|
4147
4147
|
let t = e.cwd ?? process.cwd(), n = e.silent ?? !1;
|
|
4148
4148
|
if (n || (qi(), o.intro(L.brandBold("Initialize Hype Stack configuration"))), !await ir(t)) {
|
|
4149
|
-
o.log.error(`This doesn't look like a Hype Stack project. ${L.muted("Expected apps/ directory and package.json")}`), o.outro(L.muted(`Run ${L.command("hype-stack create")} to scaffold a new project.`));
|
|
4149
|
+
o.log.error(`This doesn't look like a Hype Stack project. ${L.muted("Expected apps/ directory and package.json")}`), o.outro(L.muted(`Run ${L.command("npx @hype-stack/cli create")} to scaffold a new project.`));
|
|
4150
4150
|
return;
|
|
4151
4151
|
}
|
|
4152
4152
|
if (await $n(t)) {
|
|
@@ -4325,7 +4325,7 @@ async function $a(e, t) {
|
|
|
4325
4325
|
let n = [];
|
|
4326
4326
|
for (let r of e) {
|
|
4327
4327
|
let e = await ar(r), i = await or(r, t);
|
|
4328
|
-
if (i.status === "denied") throw Error(`Access to "${r}" was denied (${i.reason}). Try 'hype-stack login' or check your license.`);
|
|
4328
|
+
if (i.status === "denied") throw Error(`Access to "${r}" was denied (${i.reason}). Try 'npx @hype-stack/cli login' or check your license.`);
|
|
4329
4329
|
n.push({
|
|
4330
4330
|
manifest: e,
|
|
4331
4331
|
packDir: i.packDir
|
|
@@ -4378,9 +4378,9 @@ async function ro(e = {}) {
|
|
|
4378
4378
|
try {
|
|
4379
4379
|
r = await Qn(n ?? t);
|
|
4380
4380
|
} catch (e) {
|
|
4381
|
-
o.cancel(`Could not parse ${L.path("stack.json")}: ${$(e)} Run 'hype-stack init' to regenerate it.`), process.exit(1);
|
|
4381
|
+
o.cancel(`Could not parse ${L.path("stack.json")}: ${$(e)} Run 'npx @hype-stack/cli init' to regenerate it.`), process.exit(1);
|
|
4382
4382
|
}
|
|
4383
|
-
r || (o.cancel(n ? `Could not read ${L.path("stack.json")}. Run 'hype-stack init' to regenerate it, then run 'hype-stack compose' again.` : `No ${L.path("stack.json")}. Run 'hype-stack init' first, then 'hype-stack compose'.`), process.exit(1)), r.paths || (o.cancel(`${L.path("stack.json")} is missing ${L.path("paths")}. Run 'hype-stack init' again to regenerate it.`), process.exit(1));
|
|
4383
|
+
r || (o.cancel(n ? `Could not read ${L.path("stack.json")}. Run 'npx @hype-stack/cli init' to regenerate it, then run 'npx @hype-stack/cli compose' again.` : `No ${L.path("stack.json")}. Run 'npx @hype-stack/cli init' first, then 'npx @hype-stack/cli compose'.`), process.exit(1)), r.paths || (o.cancel(`${L.path("stack.json")} is missing ${L.path("paths")}. Run 'npx @hype-stack/cli init' again to regenerate it.`), process.exit(1));
|
|
4384
4384
|
let i = n ?? t;
|
|
4385
4385
|
o.intro(L.brandBold("Compose your stack"));
|
|
4386
4386
|
let a = o.spinner();
|
|
@@ -4645,9 +4645,9 @@ async function go(e = {}) {
|
|
|
4645
4645
|
try {
|
|
4646
4646
|
a = await Qn(n ?? t);
|
|
4647
4647
|
} catch (e) {
|
|
4648
|
-
o.cancel(`Could not parse ${L.path("stack.json")}: ${$(e)} Run 'hype-stack init' to regenerate it.`), process.exit(1);
|
|
4648
|
+
o.cancel(`Could not parse ${L.path("stack.json")}: ${$(e)} Run 'npx @hype-stack/cli init' to regenerate it.`), process.exit(1);
|
|
4649
4649
|
}
|
|
4650
|
-
a || (o.cancel(n ? `Could not read ${L.path("stack.json")}. Run 'hype-stack init' to regenerate it, then run 'hype-stack template' again.` : `No ${L.path("stack.json")}. Run 'hype-stack init' first, then 'hype-stack template'.`), process.exit(1)), a.paths || (o.cancel(`${L.path("stack.json")} is missing ${L.path("paths")}. Run 'hype-stack init' again to regenerate it.`), process.exit(1));
|
|
4650
|
+
a || (o.cancel(n ? `Could not read ${L.path("stack.json")}. Run 'npx @hype-stack/cli init' to regenerate it, then run 'npx @hype-stack/cli template' again.` : `No ${L.path("stack.json")}. Run 'npx @hype-stack/cli init' first, then 'npx @hype-stack/cli template'.`), process.exit(1)), a.paths || (o.cancel(`${L.path("stack.json")} is missing ${L.path("paths")}. Run 'npx @hype-stack/cli init' again to regenerate it.`), process.exit(1));
|
|
4651
4651
|
let c = n ?? t;
|
|
4652
4652
|
o.intro(L.brandBold("Install a template"));
|
|
4653
4653
|
let l = o.spinner();
|
|
@@ -4669,7 +4669,7 @@ async function go(e = {}) {
|
|
|
4669
4669
|
}
|
|
4670
4670
|
let v = e.templateId;
|
|
4671
4671
|
if (!v) {
|
|
4672
|
-
e.yes && (l.stop("Template id required"), o.cancel("Pass a template id with `hype-stack template <id>` (required in --yes mode)."), process.exit(1)), _.length === 0 && (l.stop("No templates available"), o.cancel("No templates are available yet. Check back later."), process.exit(1)), l.stop("Templates loaded");
|
|
4672
|
+
e.yes && (l.stop("Template id required"), o.cancel("Pass a template id with `npx @hype-stack/cli template <id>` (required in --yes mode)."), process.exit(1)), _.length === 0 && (l.stop("No templates available"), o.cancel("No templates are available yet. Check back later."), process.exit(1)), l.stop("Templates loaded");
|
|
4673
4673
|
let t = A();
|
|
4674
4674
|
o.note(_.map((e) => ` ${R.arrow} ${L.highlight(e.name)} ${ie(`${t}/templates/${e.id}`)}`).join("\n"), "Browse templates");
|
|
4675
4675
|
let n = await o.select({
|
|
@@ -4772,7 +4772,7 @@ async function go(e = {}) {
|
|
|
4772
4772
|
token: g,
|
|
4773
4773
|
licenseKey: h
|
|
4774
4774
|
});
|
|
4775
|
-
s.status === "denied" && (l.stop("Template download denied"), o.cancel(`Access to template "${y.id}" was denied (${s.reason}). Try 'hype-stack login' or check your license.`), process.exit(1)), F = s.templateDir;
|
|
4775
|
+
s.status === "denied" && (l.stop("Template download denied"), o.cancel(`Access to template "${y.id}" was denied (${s.reason}). Try 'npx @hype-stack/cli login' or check your license.`), process.exit(1)), F = s.templateDir;
|
|
4776
4776
|
let u = await Si({
|
|
4777
4777
|
manifest: n,
|
|
4778
4778
|
config: a,
|
package/dist/config/bin.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./cli-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./cli-CjTmOnzL.js";
|
|
2
2
|
export { t as composeCommand, a as createCommand, o as createProgram, e as ensureInit, r as initCommand, i as loginCommand, n as logoutCommand };
|