ship-em 0.2.1 → 0.2.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/index.js +21 -34
- package/dist/lib.d.ts +0 -2
- package/dist/lib.js +11 -13
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2501,8 +2501,8 @@ async function deployCommand(options) {
|
|
|
2501
2501
|
} else {
|
|
2502
2502
|
uploadSpinner.succeed("Deployed successfully");
|
|
2503
2503
|
}
|
|
2504
|
-
liveUrl = response.data.url;
|
|
2505
|
-
projectId = response.data.projectId;
|
|
2504
|
+
liveUrl = response.data.data.url;
|
|
2505
|
+
projectId = response.data.data.projectId;
|
|
2506
2506
|
} catch (err) {
|
|
2507
2507
|
if (err instanceof AuthError || err instanceof NetworkError || err instanceof DeployError) {
|
|
2508
2508
|
throw err;
|
|
@@ -2743,63 +2743,50 @@ import chalk5 from "chalk";
|
|
|
2743
2743
|
var TEMPLATES = [
|
|
2744
2744
|
{
|
|
2745
2745
|
name: "astro-blog",
|
|
2746
|
-
description: "Astro blog with Markdown
|
|
2746
|
+
description: "Astro blog with Markdown support",
|
|
2747
2747
|
framework: "astro",
|
|
2748
|
-
createCmd: ["npm", "create", "astro@latest", "--", "--template", "blog"]
|
|
2749
|
-
postScaffold: ["npx", "astro", "add", "mdx", "--yes"]
|
|
2748
|
+
createCmd: ["npm", "create", "astro@latest", "--", "--template", "blog"]
|
|
2750
2749
|
},
|
|
2751
2750
|
{
|
|
2752
2751
|
name: "nextjs-saas",
|
|
2753
|
-
description: "Next.js SaaS starter with App Router
|
|
2752
|
+
description: "Next.js SaaS starter with App Router",
|
|
2754
2753
|
framework: "nextjs",
|
|
2755
|
-
createCmd: ["npx", "create-next-app@latest", "--", "--
|
|
2754
|
+
createCmd: ["npx", "create-next-app@latest", "--", "--app", "--ts", "--tailwind", "--eslint", "--src-dir"]
|
|
2756
2755
|
},
|
|
2757
2756
|
{
|
|
2758
2757
|
name: "vite-react",
|
|
2759
|
-
description: "Vite + React + TypeScript
|
|
2760
|
-
framework: "vite
|
|
2758
|
+
description: "Vite + React + TypeScript starter",
|
|
2759
|
+
framework: "vite",
|
|
2761
2760
|
createCmd: ["npm", "create", "vite@latest", "--", "--template", "react-ts"]
|
|
2762
2761
|
},
|
|
2763
2762
|
{
|
|
2764
2763
|
name: "sveltekit-app",
|
|
2765
|
-
description: "SvelteKit full-stack app
|
|
2764
|
+
description: "SvelteKit full-stack app",
|
|
2766
2765
|
framework: "sveltekit",
|
|
2767
|
-
createCmd: ["
|
|
2766
|
+
createCmd: ["npx", "sv", "create", "--", "--template", "minimal", "--types", "ts"]
|
|
2768
2767
|
},
|
|
2769
2768
|
{
|
|
2770
2769
|
name: "static-portfolio",
|
|
2771
|
-
description: "
|
|
2772
|
-
framework: "static
|
|
2770
|
+
description: "Simple static HTML/CSS portfolio site",
|
|
2771
|
+
framework: "static",
|
|
2773
2772
|
createCmd: []
|
|
2774
|
-
// No create tool — we scaffold manually
|
|
2775
2773
|
}
|
|
2776
2774
|
];
|
|
2777
2775
|
function getTemplate(name) {
|
|
2778
|
-
return TEMPLATES.find((t) => t.name
|
|
2776
|
+
return TEMPLATES.find((t) => t.name === name);
|
|
2779
2777
|
}
|
|
2780
2778
|
function getTemplateNames() {
|
|
2781
2779
|
return TEMPLATES.map((t) => t.name);
|
|
2782
2780
|
}
|
|
2783
2781
|
async function templatesCommand() {
|
|
2784
|
-
ui.
|
|
2785
|
-
|
|
2786
|
-
console.log(` ${brand.dim("Use with: shipem init --template <name>")}`);
|
|
2787
|
-
console.log("");
|
|
2788
|
-
const maxNameLen = Math.max(...TEMPLATES.map((t) => t.name.length));
|
|
2782
|
+
ui.section("Available templates");
|
|
2783
|
+
ui.br();
|
|
2789
2784
|
for (const tpl of TEMPLATES) {
|
|
2790
|
-
|
|
2791
|
-
console.log(
|
|
2792
|
-
` ${chalk5.cyan(tpl.name)}${padding} ${brand.dim("\u2014")} ${tpl.description}`
|
|
2793
|
-
);
|
|
2794
|
-
console.log(
|
|
2795
|
-
` ${" ".repeat(maxNameLen)} ${brand.dim(`Framework: ${tpl.framework}`)}`
|
|
2796
|
-
);
|
|
2797
|
-
console.log("");
|
|
2785
|
+
console.log(` ${chalk5.cyan(tpl.name.padEnd(20))} ${tpl.description}`);
|
|
2798
2786
|
}
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
console.log("");
|
|
2787
|
+
ui.br();
|
|
2788
|
+
ui.dim("Usage: shipem init --template <name>");
|
|
2789
|
+
ui.br();
|
|
2803
2790
|
}
|
|
2804
2791
|
|
|
2805
2792
|
// src/commands/init.ts
|
|
@@ -4016,8 +4003,8 @@ async function previewCommand(options = {}) {
|
|
|
4016
4003
|
console.log("");
|
|
4017
4004
|
console.log(` ${brand.bold("Next steps:")}`);
|
|
4018
4005
|
console.log(` ${brand.gray("Share")} \u2192 Send the preview URL to teammates`);
|
|
4019
|
-
console.log(` ${brand.gray("Update")} \u2192 ${chalk13.cyan("npx
|
|
4020
|
-
console.log(` ${brand.gray("Promote")} \u2192 Merge to main and ${chalk13.cyan("npx
|
|
4006
|
+
console.log(` ${brand.gray("Update")} \u2192 ${chalk13.cyan("npx shipem preview")} (re-deploy this branch)`);
|
|
4007
|
+
console.log(` ${brand.gray("Promote")} \u2192 Merge to main and ${chalk13.cyan("npx shipem deploy")}`);
|
|
4021
4008
|
console.log("");
|
|
4022
4009
|
}
|
|
4023
4010
|
|
package/dist/lib.d.ts
CHANGED
|
@@ -244,9 +244,7 @@ interface Template {
|
|
|
244
244
|
postScaffold?: string[];
|
|
245
245
|
}
|
|
246
246
|
declare const TEMPLATES: Template[];
|
|
247
|
-
/** Look up a template by name (case-insensitive). */
|
|
248
247
|
declare function getTemplate(name: string): Template | undefined;
|
|
249
|
-
/** List all available template names. */
|
|
250
248
|
declare function getTemplateNames(): string[];
|
|
251
249
|
|
|
252
250
|
export { type AuthConfig, AuthError, BuildError, type BuildResult, type CloudflareCredentials, CloudflarePages, ConfigError, DeployError, type DeployRecord, type DeployTarget, type DeploymentState, type EnvVar, FRAMEWORKS, type Framework, type FrameworkChoice, type MonorepoInfo, NetworkError, type PreviewRecord, type ProjectConfig, SHIPEM_API_URL, type ServerType, type ShipemConfig, ShipemError, TEMPLATES, type Template, buildProject, detectMonorepo, generateProjectName, getCloudflareCredentials, getCurrentBranch, getSessionToken, getTemplate, getTemplateNames, matchFramework, readEnvFile, readProjectConfig, runFixHeuristics, sanitizeBranchName, sanitizeProjectName, scanProject, scanSourceForEnvVars, writeProjectConfig };
|
package/dist/lib.js
CHANGED
|
@@ -1785,39 +1785,37 @@ import chalk4 from "chalk";
|
|
|
1785
1785
|
var TEMPLATES = [
|
|
1786
1786
|
{
|
|
1787
1787
|
name: "astro-blog",
|
|
1788
|
-
description: "Astro blog with Markdown
|
|
1788
|
+
description: "Astro blog with Markdown support",
|
|
1789
1789
|
framework: "astro",
|
|
1790
|
-
createCmd: ["npm", "create", "astro@latest", "--", "--template", "blog"]
|
|
1791
|
-
postScaffold: ["npx", "astro", "add", "mdx", "--yes"]
|
|
1790
|
+
createCmd: ["npm", "create", "astro@latest", "--", "--template", "blog"]
|
|
1792
1791
|
},
|
|
1793
1792
|
{
|
|
1794
1793
|
name: "nextjs-saas",
|
|
1795
|
-
description: "Next.js SaaS starter with App Router
|
|
1794
|
+
description: "Next.js SaaS starter with App Router",
|
|
1796
1795
|
framework: "nextjs",
|
|
1797
|
-
createCmd: ["npx", "create-next-app@latest", "--", "--
|
|
1796
|
+
createCmd: ["npx", "create-next-app@latest", "--", "--app", "--ts", "--tailwind", "--eslint", "--src-dir"]
|
|
1798
1797
|
},
|
|
1799
1798
|
{
|
|
1800
1799
|
name: "vite-react",
|
|
1801
|
-
description: "Vite + React + TypeScript
|
|
1802
|
-
framework: "vite
|
|
1800
|
+
description: "Vite + React + TypeScript starter",
|
|
1801
|
+
framework: "vite",
|
|
1803
1802
|
createCmd: ["npm", "create", "vite@latest", "--", "--template", "react-ts"]
|
|
1804
1803
|
},
|
|
1805
1804
|
{
|
|
1806
1805
|
name: "sveltekit-app",
|
|
1807
|
-
description: "SvelteKit full-stack app
|
|
1806
|
+
description: "SvelteKit full-stack app",
|
|
1808
1807
|
framework: "sveltekit",
|
|
1809
|
-
createCmd: ["
|
|
1808
|
+
createCmd: ["npx", "sv", "create", "--", "--template", "minimal", "--types", "ts"]
|
|
1810
1809
|
},
|
|
1811
1810
|
{
|
|
1812
1811
|
name: "static-portfolio",
|
|
1813
|
-
description: "
|
|
1814
|
-
framework: "static
|
|
1812
|
+
description: "Simple static HTML/CSS portfolio site",
|
|
1813
|
+
framework: "static",
|
|
1815
1814
|
createCmd: []
|
|
1816
|
-
// No create tool — we scaffold manually
|
|
1817
1815
|
}
|
|
1818
1816
|
];
|
|
1819
1817
|
function getTemplate(name) {
|
|
1820
|
-
return TEMPLATES.find((t) => t.name
|
|
1818
|
+
return TEMPLATES.find((t) => t.name === name);
|
|
1821
1819
|
}
|
|
1822
1820
|
function getTemplateNames() {
|
|
1823
1821
|
return TEMPLATES.map((t) => t.name);
|