@theholocron/cli 3.33.1 → 3.33.2
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.mjs +17 -7
- package/dist/cli.mjs.map +1 -1
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -3688,15 +3688,17 @@ async function runSetup(input) {
|
|
|
3688
3688
|
if (loader.has("deployment")) {
|
|
3689
3689
|
const deploy = loader.get("deployment");
|
|
3690
3690
|
print(style.step("deployment"));
|
|
3691
|
-
steps.push(await runStep("deployment", `ensureProject ${config.name}`, dryRun, async () => {
|
|
3692
|
-
await deploy.ensureProject({ name: config.name });
|
|
3693
|
-
}));
|
|
3694
|
-
print(formatStep(steps[steps.length - 1]));
|
|
3695
3691
|
const deployEntry = (config.workflows ?? []).map((e) => typeof e === "string" ? { name: e } : e).find((e) => e.name === "deploy");
|
|
3696
3692
|
const previewCfg = deployEntry?.with ? extractPreviewConfig(deployEntry.with, {
|
|
3697
3693
|
org: config.org,
|
|
3698
3694
|
domain: config.domain
|
|
3699
3695
|
}) : null;
|
|
3696
|
+
if (!previewCfg) {
|
|
3697
|
+
steps.push(await runStep("deployment", `ensureProject ${config.name}`, dryRun, async () => {
|
|
3698
|
+
await deploy.ensureProject({ name: config.name });
|
|
3699
|
+
}));
|
|
3700
|
+
print(formatStep(steps[steps.length - 1]));
|
|
3701
|
+
}
|
|
3700
3702
|
if (previewCfg) {
|
|
3701
3703
|
steps.push(await runStep("deployment", `ensureProject ${previewCfg.project}`, dryRun, async () => {
|
|
3702
3704
|
await deploy.ensureProject({ name: previewCfg.project });
|
|
@@ -3704,15 +3706,23 @@ async function runSetup(input) {
|
|
|
3704
3706
|
print(formatStep(steps[steps.length - 1]));
|
|
3705
3707
|
}
|
|
3706
3708
|
if (previewCfg?.domain && deploy.ensureCustomDomain) {
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
await deploy.ensureCustomDomain(previewCfg.project, wildcardDomain);
|
|
3709
|
+
steps.push(await runStep("deployment", `ensureCustomDomain ${previewCfg.domain}`, dryRun, async () => {
|
|
3710
|
+
await deploy.ensureCustomDomain(previewCfg.project, previewCfg.domain);
|
|
3710
3711
|
}));
|
|
3711
3712
|
print(formatStep(steps[steps.length - 1]));
|
|
3712
3713
|
}
|
|
3713
3714
|
if (previewCfg?.domain && loader.has("dns")) {
|
|
3714
3715
|
const dns = loader.get("dns");
|
|
3715
3716
|
const wildcardDomain = `*.${previewCfg.domain}`;
|
|
3717
|
+
steps.push(await runStep("dns", `upsertRecord ${previewCfg.domain}`, dryRun, async () => {
|
|
3718
|
+
await dns.upsertRecord(previewCfg.domain, {
|
|
3719
|
+
type: "CNAME",
|
|
3720
|
+
name: previewCfg.domain,
|
|
3721
|
+
content: `${previewCfg.project}.pages.dev`,
|
|
3722
|
+
ttl: 1
|
|
3723
|
+
});
|
|
3724
|
+
}));
|
|
3725
|
+
print(formatStep(steps[steps.length - 1]));
|
|
3716
3726
|
steps.push(await runStep("dns", `upsertRecord ${wildcardDomain}`, dryRun, async () => {
|
|
3717
3727
|
await dns.upsertRecord(previewCfg.domain, {
|
|
3718
3728
|
type: "CNAME",
|