create-lego-one 2.0.5 → 2.0.9
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.cjs +93 -41
- package/dist/index.cjs.map +1 -1
- package/package.json +2 -3
package/dist/index.cjs
CHANGED
|
@@ -33,9 +33,10 @@ var import_fs = __toESM(require("fs"), 1);
|
|
|
33
33
|
var import_url = require("url");
|
|
34
34
|
var import_commander = require("commander");
|
|
35
35
|
var kleur = __toESM(require("kleur"), 1);
|
|
36
|
-
var import_ora = __toESM(require("ora"), 1);
|
|
37
36
|
var import_fs_extra = __toESM(require("fs-extra"), 1);
|
|
38
37
|
var import_validate_npm_package_name = __toESM(require("validate-npm-package-name"), 1);
|
|
38
|
+
var import_prompts = __toESM(require("prompts"), 1);
|
|
39
|
+
var import_child_process = require("child_process");
|
|
39
40
|
var __dirname = import_path.default.dirname((0, import_url.fileURLToPath)(importMetaUrl));
|
|
40
41
|
var banner = `
|
|
41
42
|
${kleur.cyan("\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510")}
|
|
@@ -48,13 +49,16 @@ async function init() {
|
|
|
48
49
|
const version = getVersion();
|
|
49
50
|
console.log(kleur.gray(`create-lego-one v${version}
|
|
50
51
|
`));
|
|
51
|
-
import_commander.program.name("create-lego-one").description("Create a new Lego-One SaaS application").version(version).argument("[app-name]", "Name of your application").option("-i, --interactive", "Use interactive prompts").option("--git", "Initialize git repository", true).option("--branch <branch>", "Use specific branch").option("--template <template>", "Use specific template").action(async (appName, options) => {
|
|
52
|
+
import_commander.program.name("create-lego-one").description("Create a new Lego-One SaaS application").version(version).argument("[app-name]", "Name of your application").option("-i, --interactive", "Use interactive prompts (default when no app name provided)").option("--no-interactive", "Skip interactive prompts").option("--git", "Initialize git repository", true).option("--no-git", "Skip git initialization").option("--description <description>", "Project description").option("--author <author>", "Author name").option("--branch <branch>", "Use specific branch").option("--template <template>", "Use specific template").action(async (appName, options) => {
|
|
53
|
+
const isInteractive = options.interactive !== false && (!appName || options.interactive === true);
|
|
52
54
|
const opts = {
|
|
53
55
|
appName,
|
|
54
|
-
interactive:
|
|
55
|
-
git: options.git,
|
|
56
|
+
interactive: isInteractive,
|
|
57
|
+
git: options.git !== false,
|
|
56
58
|
branch: options.branch,
|
|
57
|
-
template: options.template
|
|
59
|
+
template: options.template,
|
|
60
|
+
description: options.description,
|
|
61
|
+
author: options.author
|
|
58
62
|
};
|
|
59
63
|
await createApp(opts);
|
|
60
64
|
});
|
|
@@ -70,37 +74,70 @@ function getVersion() {
|
|
|
70
74
|
}
|
|
71
75
|
}
|
|
72
76
|
async function createApp(options) {
|
|
73
|
-
const spinner = (0, import_ora.default)("Creating your Lego-One application...");
|
|
74
77
|
try {
|
|
75
|
-
let
|
|
76
|
-
if (
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
78
|
+
let projectConfig;
|
|
79
|
+
if (options.interactive) {
|
|
80
|
+
const responses = await (0, import_prompts.default)([
|
|
81
|
+
{
|
|
82
|
+
type: "text",
|
|
83
|
+
name: "appName",
|
|
84
|
+
message: "What is your app named?",
|
|
85
|
+
initial: options.appName || "my-saas-app",
|
|
86
|
+
validate: (value) => {
|
|
87
|
+
if (!value) return "App name is required";
|
|
88
|
+
const validation2 = (0, import_validate_npm_package_name.default)(value);
|
|
89
|
+
if (validation2.validForNewPackages) return true;
|
|
90
|
+
const errorMsg = validation2.errors?.join(", ") || validation2.warnings?.join(", ") || "unknown error";
|
|
91
|
+
return "Invalid app name: " + errorMsg;
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
type: "text",
|
|
96
|
+
name: "description",
|
|
97
|
+
message: "Project description (optional)",
|
|
98
|
+
initial: options.description || "A SaaS application built with Lego-One"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
type: "text",
|
|
102
|
+
name: "author",
|
|
103
|
+
message: "Author name (optional)",
|
|
104
|
+
initial: options.author || ""
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
type: "confirm",
|
|
108
|
+
name: "git",
|
|
109
|
+
message: "Initialize git repository?",
|
|
110
|
+
initial: options.git !== false
|
|
91
111
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
112
|
+
]);
|
|
113
|
+
projectConfig = {
|
|
114
|
+
appName: responses.appName || options.appName || "my-saas-app",
|
|
115
|
+
description: responses.description || options.description || "A SaaS application built with Lego-One",
|
|
116
|
+
author: responses.author || options.author || "",
|
|
117
|
+
git: responses.git !== false
|
|
118
|
+
};
|
|
119
|
+
} else {
|
|
120
|
+
if (!options.appName) {
|
|
121
|
+
console.error(kleur.red("Please specify an app name or use interactive mode (default)"));
|
|
122
|
+
process.exit(1);
|
|
123
|
+
}
|
|
124
|
+
projectConfig = {
|
|
125
|
+
appName: options.appName,
|
|
126
|
+
description: options.description || "A SaaS application built with Lego-One",
|
|
127
|
+
author: options.author || "",
|
|
128
|
+
git: options.git !== false
|
|
129
|
+
};
|
|
98
130
|
}
|
|
99
|
-
const validation = (0, import_validate_npm_package_name.default)(appName);
|
|
100
|
-
if (!validation.
|
|
101
|
-
|
|
131
|
+
const validation = (0, import_validate_npm_package_name.default)(projectConfig.appName);
|
|
132
|
+
if (!validation.validForNewPackages) {
|
|
133
|
+
const errorMsg = validation.errors?.join(", ") || validation.warnings?.join(", ") || "unknown error";
|
|
134
|
+
console.error(kleur.red(`Invalid app name: ${errorMsg}`));
|
|
135
|
+
if (validation.warnings && validation.warnings.length > 0) {
|
|
136
|
+
console.error(kleur.yellow(`Warnings: ${validation.warnings.join(", ")}`));
|
|
137
|
+
}
|
|
102
138
|
process.exit(1);
|
|
103
139
|
}
|
|
140
|
+
const appName = projectConfig.appName;
|
|
104
141
|
const targetDir = import_path.default.resolve(process.cwd(), appName);
|
|
105
142
|
if (await import_fs_extra.default.pathExists(targetDir)) {
|
|
106
143
|
const files = await import_fs_extra.default.readdir(targetDir);
|
|
@@ -109,9 +146,9 @@ async function createApp(options) {
|
|
|
109
146
|
process.exit(1);
|
|
110
147
|
}
|
|
111
148
|
}
|
|
112
|
-
|
|
149
|
+
console.log(kleur.cyan("Creating your Lego-One application..."));
|
|
113
150
|
await import_fs_extra.default.ensureDir(targetDir);
|
|
114
|
-
|
|
151
|
+
console.log(kleur.gray("Copying template files..."));
|
|
115
152
|
const templateDir = import_path.default.join(__dirname, "../template");
|
|
116
153
|
if (await import_fs_extra.default.pathExists(templateDir)) {
|
|
117
154
|
await import_fs_extra.default.copy(templateDir, targetDir);
|
|
@@ -119,20 +156,21 @@ async function createApp(options) {
|
|
|
119
156
|
const rootDir = import_path.default.join(__dirname, "../../..");
|
|
120
157
|
await copyTemplateFiles(rootDir, targetDir);
|
|
121
158
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
159
|
+
console.log(kleur.gray("Configuring project..."));
|
|
160
|
+
await updatePackageJson(targetDir, projectConfig);
|
|
161
|
+
if (projectConfig.git) {
|
|
162
|
+
console.log(kleur.gray("Initializing git repository..."));
|
|
125
163
|
try {
|
|
126
|
-
execSync("git init", { cwd: targetDir });
|
|
127
|
-
execSync("git add .", { cwd: targetDir });
|
|
128
|
-
execSync('git commit -m "Initial commit from Lego-One"', {
|
|
164
|
+
(0, import_child_process.execSync)("git init", { cwd: targetDir });
|
|
165
|
+
(0, import_child_process.execSync)("git add .", { cwd: targetDir });
|
|
166
|
+
(0, import_child_process.execSync)('git commit -m "Initial commit from Lego-One"', {
|
|
129
167
|
cwd: targetDir
|
|
130
168
|
});
|
|
131
169
|
} catch (error) {
|
|
132
170
|
console.warn(kleur.yellow("Could not initialize git repository"));
|
|
133
171
|
}
|
|
134
172
|
}
|
|
135
|
-
|
|
173
|
+
console.log(kleur.green("Application created successfully!"));
|
|
136
174
|
console.log("\n" + kleur.bold("Next steps:"));
|
|
137
175
|
console.log(` ${kleur.cyan("cd")} ${appName}`);
|
|
138
176
|
console.log(` ${kleur.cyan("pnpm install")}`);
|
|
@@ -147,13 +185,27 @@ async function createApp(options) {
|
|
|
147
185
|
console.log(` ${kleur.cyan("https://lego-one.dev/docs")} - Full documentation`);
|
|
148
186
|
console.log("\n" + kleur.yellow("Happy coding! \u{1F680}\n"));
|
|
149
187
|
} catch (error) {
|
|
150
|
-
|
|
188
|
+
console.error(kleur.red("Failed to create application"));
|
|
151
189
|
if (error instanceof Error) {
|
|
152
190
|
console.error(kleur.red(error.message));
|
|
153
191
|
}
|
|
154
192
|
process.exit(1);
|
|
155
193
|
}
|
|
156
194
|
}
|
|
195
|
+
async function updatePackageJson(targetDir, config) {
|
|
196
|
+
const packageJsonPath = import_path.default.join(targetDir, "package.json");
|
|
197
|
+
if (await import_fs_extra.default.pathExists(packageJsonPath)) {
|
|
198
|
+
const packageJson = JSON.parse(await import_fs_extra.default.readFile(packageJsonPath, "utf-8"));
|
|
199
|
+
packageJson.name = config.appName;
|
|
200
|
+
if (config.description) {
|
|
201
|
+
packageJson.description = config.description;
|
|
202
|
+
}
|
|
203
|
+
if (config.author) {
|
|
204
|
+
packageJson.author = config.author;
|
|
205
|
+
}
|
|
206
|
+
await import_fs_extra.default.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2) + "\n", "utf-8");
|
|
207
|
+
}
|
|
208
|
+
}
|
|
157
209
|
async function copyTemplateFiles(sourceDir, targetDir) {
|
|
158
210
|
const filesToCopy = [
|
|
159
211
|
"host",
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/.pnpm/tsup@8.5.1_@swc+core@1.15.8_4981d554a2757e4ed25c3ad5a773b01f/node_modules/tsup/assets/cjs_shims.js","../src/index.ts"],"sourcesContent":["// Shim globals in cjs bundle\n// There's a weird bug that esbuild will always inject importMetaUrl\n// if we export it as `const importMetaUrl = ... __filename ...`\n// But using a function will not cause this issue\n\nconst getImportMetaUrl = () => \n typeof document === \"undefined\" \n ? new URL(`file:${__filename}`).href \n : (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') \n ? document.currentScript.src \n : new URL(\"main.js\", document.baseURI).href;\n\nexport const importMetaUrl = /* @__PURE__ */ getImportMetaUrl()\n","#!/usr/bin/env node\n\n/**\n * create-lego-one CLI\n * Create a new Lego-One SaaS application from template\n */\n\nimport path from 'path';\nimport fs from 'fs';\nimport { fileURLToPath } from 'url';\nimport { program } from 'commander';\nimport * as kleur from 'kleur';\nimport ora from 'ora';\nimport fsExtra from 'fs-extra';\nimport decompress from 'decompress';\nimport validateProjectName from 'validate-npm-package-name';\n\nconst __dirname = path.dirname(fileURLToPath(import.meta.url));\n\ninterface CreateOptions {\n appName: string;\n interactive: boolean;\n git: boolean;\n branch?: string;\n template?: string;\n}\n\n// ASCII art banner\nconst banner = `\n${kleur.cyan('┌─────────────────────────────────────────────────────────┐')}\n${kleur.cyan('│')} ${kleur.bold().white('Lego-One')} SaaS Boilerplate ${kleur.cyan('│')}\n${kleur.cyan('│')} ${kleur.gray('Microkernel architecture with Modern.js + Garfish')} ${kleur.cyan('│')}\n${kleur.cyan('└─────────────────────────────────────────────────────────┘')}\n`;\n\nasync function init() {\n console.log(banner);\n\n const version = getVersion();\n console.log(kleur.gray(`create-lego-one v${version}\\n`));\n\n program\n .name('create-lego-one')\n .description('Create a new Lego-One SaaS application')\n .version(version)\n .argument('[app-name]', 'Name of your application')\n .option('-i, --interactive', 'Use interactive prompts')\n .option('--git', 'Initialize git repository', true)\n .option('--branch <branch>', 'Use specific branch')\n .option('--template <template>', 'Use specific template')\n .action(async (appName: string, options) => {\n const opts: CreateOptions = {\n appName,\n interactive: options.interactive,\n git: options.git,\n branch: options.branch,\n template: options.template,\n };\n await createApp(opts);\n });\n\n await program.parseAsync(process.argv);\n}\n\nfunction getVersion(): string {\n const pkgPath = path.join(__dirname, '../package.json');\n try {\n const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'));\n return pkg.version || '1.0.0';\n } catch {\n return '1.0.0';\n }\n}\n\nasync function createApp(options: CreateOptions) {\n const spinner = ora('Creating your Lego-One application...');\n\n try {\n // Get app name\n let appName = options.appName;\n if (!appName && !options.interactive) {\n console.error(kleur.red('Please specify an app name or use --interactive'));\n process.exit(1);\n }\n\n // Interactive mode for app name\n if (!appName && options.interactive) {\n const prompts = await import('prompts');\n const response = await prompts.default({\n type: 'text',\n name: 'appName',\n message: 'What is your app named?',\n initial: 'my-saas-app',\n validate: (value: string) => {\n const validation = validateProjectName(value);\n if (validation.valid) return true;\n return 'Invalid app name: ' + (validation.errors?.join(', ') || 'unknown error');\n },\n });\n appName = response.appName;\n }\n\n if (!appName) {\n console.error(kleur.red('App name is required'));\n process.exit(1);\n }\n\n // Validate app name\n const validation = validateProjectName(appName);\n if (!validation.valid) {\n console.error(kleur.red(`Invalid app name: ${validation.errors?.join(', ') || 'unknown error'}`));\n process.exit(1);\n }\n\n const targetDir = path.resolve(process.cwd(), appName);\n\n // Check if directory exists\n if (await fsExtra.pathExists(targetDir)) {\n const files = await fsExtra.readdir(targetDir);\n if (files.length > 0) {\n console.error(kleur.red(`Directory \"${appName}\" already exists and is not empty`));\n process.exit(1);\n }\n }\n\n spinner.start();\n\n // Create target directory\n await fsExtra.ensureDir(targetDir);\n\n // Copy template files\n spinner.text = 'Copying template files...';\n const templateDir = path.join(__dirname, '../template');\n if (await fsExtra.pathExists(templateDir)) {\n await fsExtra.copy(templateDir, targetDir);\n } else {\n // Fallback: copy from root (development mode)\n const rootDir = path.join(__dirname, '../../..');\n await copyTemplateFiles(rootDir, targetDir);\n }\n\n // Initialize git if requested\n if (options.git) {\n spinner.text = 'Initializing git repository...';\n const { execSync } = await import('child_process');\n try {\n execSync('git init', { cwd: targetDir });\n execSync('git add .', { cwd: targetDir });\n execSync('git commit -m \"Initial commit from Lego-One\"', {\n cwd: targetDir,\n });\n } catch (error) {\n console.warn(kleur.yellow('Could not initialize git repository'));\n }\n }\n\n spinner.succeed(kleur.green('Application created successfully!'));\n\n // Print success message\n console.log('\\n' + kleur.bold('Next steps:'));\n console.log(` ${kleur.cyan('cd')} ${appName}`);\n console.log(` ${kleur.cyan('pnpm install')}`);\n console.log(` ${kleur.cyan('pnpm run dev')}`);\n console.log('\\n' + kleur.gray('To start developing:'));\n console.log(` ${kleur.cyan('pnpm run dev')} - Start development server`);\n console.log(` ${kleur.cyan('pnpm run dev:all')} - Start all services`);\n console.log('\\n' + kleur.gray('To build for production:'));\n console.log(` ${kleur.cyan('pnpm run build')} - Build application`);\n console.log(` ${kleur.cyan('pnpm run start')} - Start production server`);\n console.log('\\n' + kleur.gray('Documentation:'));\n console.log(` ${kleur.cyan('https://lego-one.dev/docs')} - Full documentation`);\n console.log('\\n' + kleur.yellow('Happy coding! 🚀\\n'));\n } catch (error) {\n spinner.fail(kleur.red('Failed to create application'));\n if (error instanceof Error) {\n console.error(kleur.red(error.message));\n }\n process.exit(1);\n }\n}\n\nasync function copyTemplateFiles(sourceDir: string, targetDir: string) {\n // Files to copy\n const filesToCopy = [\n 'host',\n 'packages/plugins',\n 'package.json',\n 'pnpm-lock.yaml',\n 'pnpm-workspace.yaml',\n '.gitignore',\n 'tsconfig.json',\n ];\n\n // Files to exclude\n const excludePatterns = [\n 'node_modules',\n 'dist',\n '.next',\n 'coverage',\n '.cache',\n '*.log',\n ];\n\n for (const file of filesToCopy) {\n const srcPath = path.join(sourceDir, file);\n const destPath = path.join(targetDir, file);\n\n if (await fsExtra.pathExists(srcPath)) {\n await fsExtra.copy(srcPath, destPath, {\n filter: (src) => {\n const relativePath = path.relative(sourceDir, src);\n return !excludePatterns.some((pattern) =>\n relativePath.includes(pattern)\n );\n },\n });\n }\n }\n}\n\n// Run the CLI\ninit().catch((error) => {\n console.error(kleur.red('Unexpected error:'));\n console.error(error);\n process.exit(1);\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAM,mBAAmB,MACvB,OAAO,aAAa,cAChB,IAAI,IAAI,QAAQ,UAAU,EAAE,EAAE,OAC7B,SAAS,iBAAiB,SAAS,cAAc,QAAQ,YAAY,MAAM,WAC1E,SAAS,cAAc,MACvB,IAAI,IAAI,WAAW,SAAS,OAAO,EAAE;AAEtC,IAAM,gBAAgC,iCAAiB;;;ACL9D,kBAAiB;AACjB,gBAAe;AACf,iBAA8B;AAC9B,uBAAwB;AACxB,YAAuB;AACvB,iBAAgB;AAChB,sBAAoB;AAEpB,uCAAgC;AAEhC,IAAM,YAAY,YAAAA,QAAK,YAAQ,0BAAc,aAAe,CAAC;AAW7D,IAAM,SAAS;AAAA,EACP,WAAK,oWAA6D,CAAC;AAAA,EACnE,WAAK,QAAG,CAAC,IAAU,WAAK,EAAE,MAAM,UAAU,CAAC,8CAAoD,WAAK,QAAG,CAAC;AAAA,EACxG,WAAK,QAAG,CAAC,IAAU,WAAK,mDAAmD,CAAC,SAAe,WAAK,QAAG,CAAC;AAAA,EACpG,WAAK,oWAA6D,CAAC;AAAA;AAG3E,eAAe,OAAO;AACpB,UAAQ,IAAI,MAAM;AAElB,QAAM,UAAU,WAAW;AAC3B,UAAQ,IAAU,WAAK,oBAAoB,OAAO;AAAA,CAAI,CAAC;AAEvD,2BACG,KAAK,iBAAiB,EACtB,YAAY,wCAAwC,EACpD,QAAQ,OAAO,EACf,SAAS,cAAc,0BAA0B,EACjD,OAAO,qBAAqB,yBAAyB,EACrD,OAAO,SAAS,6BAA6B,IAAI,EACj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AAI,MAAM,gBAAAK,QAAQ,WAAW,OAAO,GAAG;AACrC,YAAM,gBAAAA,QAAQ,KAAK,SAAS,UAAU;AAAA,QACpC,QAAQ,CAAC,QAAQ;AACf,gBAAM,eAAe,YAAAL,QAAK,SAAS,WAAW,GAAG;AACjD,iBAAO,CAAC,gBAAgB;AAAA,YAAK,CAAC,YAC5B,aAAa,SAAS,OAAO;AAAA,UAC/B;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACF;AAGA,KAAK,EAAE,MAAM,CAAC,UAAU;AACtB,UAAQ,MAAY,UAAI,mBAAmB,CAAC;AAC5C,UAAQ,MAAM,KAAK;AACnB,UAAQ,KAAK,CAAC;AAChB,CAAC;","names":["path","fs","ora","validation","validateProjectName","fsExtra"]}
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/.pnpm/tsup@8.5.1_@swc+core@1.15.8_4981d554a2757e4ed25c3ad5a773b01f/node_modules/tsup/assets/cjs_shims.js","../src/index.ts"],"sourcesContent":["// Shim globals in cjs bundle\n// There's a weird bug that esbuild will always inject importMetaUrl\n// if we export it as `const importMetaUrl = ... __filename ...`\n// But using a function will not cause this issue\n\nconst getImportMetaUrl = () => \n typeof document === \"undefined\" \n ? new URL(`file:${__filename}`).href \n : (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') \n ? document.currentScript.src \n : new URL(\"main.js\", document.baseURI).href;\n\nexport const importMetaUrl = /* @__PURE__ */ getImportMetaUrl()\n","#!/usr/bin/env node\n\n/**\n * create-lego-one CLI\n * Create a new Lego-One SaaS application from template\n */\n\nimport path from 'path';\nimport fs from 'fs';\nimport { fileURLToPath } from 'url';\nimport { program } from 'commander';\nimport * as kleur from 'kleur';\nimport fsExtra from 'fs-extra';\nimport validateProjectName from 'validate-npm-package-name';\nimport prompts from 'prompts';\nimport { execSync } from 'child_process';\n\nconst __dirname = path.dirname(fileURLToPath(import.meta.url));\n\ninterface CreateOptions {\n appName?: string;\n interactive: boolean;\n git: boolean;\n branch?: string;\n template?: string;\n description?: string;\n author?: string;\n}\n\ninterface ProjectConfig {\n appName: string;\n description: string;\n author: string;\n git: boolean;\n}\n\n// ASCII art banner\nconst banner = `\n${kleur.cyan('┌─────────────────────────────────────────────────────────┐')}\n${kleur.cyan('│')} ${kleur.bold().white('Lego-One')} SaaS Boilerplate ${kleur.cyan('│')}\n${kleur.cyan('│')} ${kleur.gray('Microkernel architecture with Modern.js + Garfish')} ${kleur.cyan('│')}\n${kleur.cyan('└─────────────────────────────────────────────────────────┘')}\n`;\n\nasync function init() {\n console.log(banner);\n\n const version = getVersion();\n console.log(kleur.gray(`create-lego-one v${version}\\n`));\n\n program\n .name('create-lego-one')\n .description('Create a new Lego-One SaaS application')\n .version(version)\n .argument('[app-name]', 'Name of your application')\n .option('-i, --interactive', 'Use interactive prompts (default when no app name provided)')\n .option('--no-interactive', 'Skip interactive prompts')\n .option('--git', 'Initialize git repository', true)\n .option('--no-git', 'Skip git initialization')\n .option('--description <description>', 'Project description')\n .option('--author <author>', 'Author name')\n .option('--branch <branch>', 'Use specific branch')\n .option('--template <template>', 'Use specific template')\n .action(async (appName: string | undefined, options) => {\n // Default to interactive mode if no app name provided\n const isInteractive = options.interactive !== false && (!appName || options.interactive === true);\n \n const opts: CreateOptions = {\n appName,\n interactive: isInteractive,\n git: options.git !== false,\n branch: options.branch,\n template: options.template,\n description: options.description,\n author: options.author,\n };\n await createApp(opts);\n });\n\n await program.parseAsync(process.argv);\n}\n\nfunction getVersion(): string {\n const pkgPath = path.join(__dirname, '../package.json');\n try {\n const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'));\n return pkg.version || '1.0.0';\n } catch {\n return '1.0.0';\n }\n}\n\nasync function createApp(options: CreateOptions) {\n try {\n let projectConfig: ProjectConfig;\n\n // Interactive mode - collect all project information\n if (options.interactive) {\n const responses = await prompts([\n {\n type: 'text',\n name: 'appName',\n message: 'What is your app named?',\n initial: options.appName || 'my-saas-app',\n validate: (value: string) => {\n if (!value) return 'App name is required';\n const validation = validateProjectName(value);\n if (validation.validForNewPackages) return true;\n const errorMsg = validation.errors?.join(', ') || validation.warnings?.join(', ') || 'unknown error';\n return 'Invalid app name: ' + errorMsg;\n },\n },\n {\n type: 'text',\n name: 'description',\n message: 'Project description (optional)',\n initial: options.description || 'A SaaS application built with Lego-One',\n },\n {\n type: 'text',\n name: 'author',\n message: 'Author name (optional)',\n initial: options.author || '',\n },\n {\n type: 'confirm',\n name: 'git',\n message: 'Initialize git repository?',\n initial: options.git !== false,\n },\n ]);\n\n projectConfig = {\n appName: responses.appName || options.appName || 'my-saas-app',\n description: responses.description || options.description || 'A SaaS application built with Lego-One',\n author: responses.author || options.author || '',\n git: responses.git !== false,\n };\n } else {\n // Non-interactive mode - use provided values or defaults\n if (!options.appName) {\n console.error(kleur.red('Please specify an app name or use interactive mode (default)'));\n process.exit(1);\n }\n\n projectConfig = {\n appName: options.appName,\n description: options.description || 'A SaaS application built with Lego-One',\n author: options.author || '',\n git: options.git !== false,\n };\n }\n\n // Validate app name\n const validation = validateProjectName(projectConfig.appName);\n if (!validation.validForNewPackages) {\n const errorMsg = validation.errors?.join(', ') || validation.warnings?.join(', ') || 'unknown error';\n console.error(kleur.red(`Invalid app name: ${errorMsg}`));\n if (validation.warnings && validation.warnings.length > 0) {\n console.error(kleur.yellow(`Warnings: ${validation.warnings.join(', ')}`));\n }\n process.exit(1);\n }\n\n const appName = projectConfig.appName;\n\n const targetDir = path.resolve(process.cwd(), appName);\n\n // Check if directory exists\n if (await fsExtra.pathExists(targetDir)) {\n const files = await fsExtra.readdir(targetDir);\n if (files.length > 0) {\n console.error(kleur.red(`Directory \"${appName}\" already exists and is not empty`));\n process.exit(1);\n }\n }\n\n console.log(kleur.cyan('Creating your Lego-One application...'));\n\n // Create target directory\n await fsExtra.ensureDir(targetDir);\n\n // Copy template files\n console.log(kleur.gray('Copying template files...'));\n const templateDir = path.join(__dirname, '../template');\n if (await fsExtra.pathExists(templateDir)) {\n await fsExtra.copy(templateDir, targetDir);\n } else {\n // Fallback: copy from root (development mode)\n const rootDir = path.join(__dirname, '../../..');\n await copyTemplateFiles(rootDir, targetDir);\n }\n\n // Update package.json with project configuration\n console.log(kleur.gray('Configuring project...'));\n await updatePackageJson(targetDir, projectConfig);\n\n // Initialize git if requested\n if (projectConfig.git) {\n console.log(kleur.gray('Initializing git repository...'));\n try {\n execSync('git init', { cwd: targetDir });\n execSync('git add .', { cwd: targetDir });\n execSync('git commit -m \"Initial commit from Lego-One\"', {\n cwd: targetDir,\n });\n } catch (error) {\n console.warn(kleur.yellow('Could not initialize git repository'));\n }\n }\n\n console.log(kleur.green('Application created successfully!'));\n\n // Print success message\n console.log('\\n' + kleur.bold('Next steps:'));\n console.log(` ${kleur.cyan('cd')} ${appName}`);\n console.log(` ${kleur.cyan('pnpm install')}`);\n console.log(` ${kleur.cyan('pnpm run dev')}`);\n console.log('\\n' + kleur.gray('To start developing:'));\n console.log(` ${kleur.cyan('pnpm run dev')} - Start development server`);\n console.log(` ${kleur.cyan('pnpm run dev:all')} - Start all services`);\n console.log('\\n' + kleur.gray('To build for production:'));\n console.log(` ${kleur.cyan('pnpm run build')} - Build application`);\n console.log(` ${kleur.cyan('pnpm run start')} - Start production server`);\n console.log('\\n' + kleur.gray('Documentation:'));\n console.log(` ${kleur.cyan('https://lego-one.dev/docs')} - Full documentation`);\n console.log('\\n' + kleur.yellow('Happy coding! 🚀\\n'));\n } catch (error) {\n console.error(kleur.red('Failed to create application'));\n if (error instanceof Error) {\n console.error(kleur.red(error.message));\n }\n process.exit(1);\n }\n}\n\nasync function updatePackageJson(targetDir: string, config: ProjectConfig) {\n const packageJsonPath = path.join(targetDir, 'package.json');\n \n if (await fsExtra.pathExists(packageJsonPath)) {\n const packageJson = JSON.parse(await fsExtra.readFile(packageJsonPath, 'utf-8'));\n \n // Update package name\n packageJson.name = config.appName;\n \n // Update description if provided\n if (config.description) {\n packageJson.description = config.description;\n }\n \n // Update author if provided\n if (config.author) {\n packageJson.author = config.author;\n }\n \n // Write updated package.json\n await fsExtra.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2) + '\\n', 'utf-8');\n }\n}\n\nasync function copyTemplateFiles(sourceDir: string, targetDir: string) {\n // Files to copy\n const filesToCopy = [\n 'host',\n 'packages/plugins',\n 'package.json',\n 'pnpm-lock.yaml',\n 'pnpm-workspace.yaml',\n '.gitignore',\n 'tsconfig.json',\n ];\n\n // Files to exclude\n const excludePatterns = [\n 'node_modules',\n 'dist',\n '.next',\n 'coverage',\n '.cache',\n '*.log',\n ];\n\n for (const file of filesToCopy) {\n const srcPath = path.join(sourceDir, file);\n const destPath = path.join(targetDir, file);\n\n if (await fsExtra.pathExists(srcPath)) {\n await fsExtra.copy(srcPath, destPath, {\n filter: (src) => {\n const relativePath = path.relative(sourceDir, src);\n return !excludePatterns.some((pattern) =>\n relativePath.includes(pattern)\n );\n },\n });\n }\n }\n}\n\n// Run the CLI\ninit().catch((error) => {\n console.error(kleur.red('Unexpected error:'));\n console.error(error);\n process.exit(1);\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAM,mBAAmB,MACvB,OAAO,aAAa,cAChB,IAAI,IAAI,QAAQ,UAAU,EAAE,EAAE,OAC7B,SAAS,iBAAiB,SAAS,cAAc,QAAQ,YAAY,MAAM,WAC1E,SAAS,cAAc,MACvB,IAAI,IAAI,WAAW,SAAS,OAAO,EAAE;AAEtC,IAAM,gBAAgC,iCAAiB;;;ACL9D,kBAAiB;AACjB,gBAAe;AACf,iBAA8B;AAC9B,uBAAwB;AACxB,YAAuB;AACvB,sBAAoB;AACpB,uCAAgC;AAChC,qBAAoB;AACpB,2BAAyB;AAEzB,IAAM,YAAY,YAAAA,QAAK,YAAQ,0BAAc,aAAe,CAAC;AAoB7D,IAAM,SAAS;AAAA,EACP,WAAK,oWAA6D,CAAC;AAAA,EACnE,WAAK,QAAG,CAAC,IAAU,WAAK,EAAE,MAAM,UAAU,CAAC,8CAA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fs","prompts","validation","validateProjectName","fsExtra"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-lego-one",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.9",
|
|
4
4
|
"description": "Create a new Lego-One SaaS application",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": "./dist/index.cjs",
|
|
@@ -26,10 +26,9 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"kleur": "^4.1.5",
|
|
29
|
-
"commander": "^
|
|
29
|
+
"commander": "^11.1.0",
|
|
30
30
|
"decompress": "^4.2.1",
|
|
31
31
|
"fs-extra": "^11.2.0",
|
|
32
|
-
"ora": "^8.1.1",
|
|
33
32
|
"prompts": "^2.4.2",
|
|
34
33
|
"template-file": "^6.0.1",
|
|
35
34
|
"validate-npm-package-name": "^5.0.0"
|