@bobbykim/manguito-cms-cli 0.1.0 → 0.1.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/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Bobby Kim
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/index.js CHANGED
@@ -14573,6 +14573,34 @@ function createPromptAdapter() {
14573
14573
  var _filename = fileURLToPath2(import.meta.url);
14574
14574
  var _dirname = dirname(_filename);
14575
14575
  var TEMPLATES_DIR = basename(_dirname) === "commands" ? join(_dirname, "..", "templates") : join(_dirname, "templates");
14576
+ var STORAGE_ADAPTERS = {
14577
+ "Local filesystem": {
14578
+ import: `import { createLocalAdapter } from '@bobbykim/manguito-cms-api/storage'`,
14579
+ factory: `createLocalAdapter({ upload_dir: process.env['STORAGE_LOCAL_UPLOAD_DIR'] })`,
14580
+ env: `# Local filesystem storage (files persist under this directory; defaults to ./uploads)
14581
+ # STORAGE_LOCAL_UPLOAD_DIR=./uploads`
14582
+ },
14583
+ "Amazon S3": {
14584
+ import: `import { createS3Adapter } from '@bobbykim/manguito-cms-api/storage'`,
14585
+ factory: `createS3Adapter({
14586
+ bucket: process.env['STORAGE_S3_BUCKET']!,
14587
+ region: process.env['STORAGE_S3_REGION']!,
14588
+ })`,
14589
+ env: `STORAGE_S3_BUCKET=
14590
+ STORAGE_S3_REGION=`
14591
+ },
14592
+ Cloudinary: {
14593
+ import: `import { createCloudinaryAdapter } from '@bobbykim/manguito-cms-api/storage'`,
14594
+ factory: `createCloudinaryAdapter({
14595
+ cloud_name: process.env['CLOUDINARY_CLOUD_NAME'],
14596
+ access_key_id: process.env['CLOUDINARY_API_KEY'],
14597
+ secret_access_key: process.env['CLOUDINARY_API_SECRET'],
14598
+ })`,
14599
+ env: `CLOUDINARY_CLOUD_NAME=
14600
+ CLOUDINARY_API_KEY=
14601
+ CLOUDINARY_API_SECRET=`
14602
+ }
14603
+ };
14576
14604
  function registerInit(program2) {
14577
14605
  program2.command("init [name]").description("Scaffold a new Manguito CMS project").option("--env <path>", "path to .env file to load").action(async (name, options) => {
14578
14606
  loadEnvFile(options.env);
@@ -14601,13 +14629,13 @@ async function runInit(name, deps) {
14601
14629
  "Amazon S3",
14602
14630
  "Cloudinary"
14603
14631
  ]);
14604
- const adapterMap = {
14605
- "Local filesystem": "local",
14606
- "Amazon S3": "s3",
14607
- Cloudinary: "cloudinary"
14632
+ const storage = STORAGE_ADAPTERS[adapterChoice] ?? STORAGE_ADAPTERS["Local filesystem"];
14633
+ const vars = {
14634
+ projectName,
14635
+ storageImport: storage.import,
14636
+ storageAdapter: storage.factory,
14637
+ storageEnv: storage.env
14608
14638
  };
14609
- const storageAdapter = adapterMap[adapterChoice];
14610
- const vars = { projectName, storageAdapter };
14611
14639
  const templateFiles = walkTemplates(TEMPLATES_DIR);
14612
14640
  for (const templatePath of templateFiles) {
14613
14641
  const relPath = relative(TEMPLATES_DIR, templatePath);
@@ -50338,7 +50366,7 @@ function registerUserRoutes(app, db, requirePermission, requireHierarchy) {
50338
50366
  }
50339
50367
  var API_VERSION = (() => {
50340
50368
  try {
50341
- return "0.1.0";
50369
+ return "0.1.1";
50342
50370
  } catch {
50343
50371
  return "0.0.0";
50344
50372
  }
@@ -1,9 +1,9 @@
1
1
  DB_URL=postgres://user:password@localhost:5432/mydb
2
2
 
3
3
  # Storage
4
- {{storageAdapter}}
4
+ {{storageEnv}}
5
5
 
6
- JWT_SECRET=change-me-before-going-to-production
6
+ AUTH_SECRET=change-me-before-going-to-production
7
7
  PORT=3000
8
8
  NODE_ENV=development
9
9
  ALLOWED_ORIGIN=http://localhost:3000
@@ -1,10 +1,6 @@
1
1
  import { defineConfig } from '@bobbykim/manguito-cms-core'
2
2
  import { createPostgresAdapter } from '@bobbykim/manguito-cms-db'
3
- import {
4
- createLocalAdapter,
5
- createS3Adapter,
6
- createCloudinaryAdapter,
7
- } from '@bobbykim/manguito-cms-api/storage'
3
+ {{storageImport}}
8
4
  import { createServer, createAPIAdapter } from '@bobbykim/manguito-cms-api'
9
5
  import { createAdminAdapter } from '@bobbykim/manguito-cms-admin'
10
6
 
@@ -22,10 +18,8 @@ export default defineConfig({
22
18
  folder: './migrations',
23
19
  },
24
20
 
25
- // Storage — alternatives:
26
- // createLocalAdapter({ upload_dir: process.env['STORAGE_LOCAL_UPLOAD_DIR'] })
27
- // createS3Adapter({ bucket: process.env['STORAGE_S3_BUCKET'], region: process.env['STORAGE_S3_REGION'] })
28
- // createCloudinaryAdapter({ cloud_name: process.env['CLOUDINARY_CLOUD_NAME'], access_key_id: process.env['CLOUDINARY_API_KEY'], secret_access_key: process.env['CLOUDINARY_API_SECRET'] })
21
+ // Storage — configured for your chosen adapter. See docs/configuration.md to
22
+ // switch adapters or adjust options.
29
23
  storage: {{storageAdapter}},
30
24
 
31
25
  server: createServer({
@@ -17,6 +17,9 @@
17
17
  "@bobbykim/manguito-cms-core": "latest",
18
18
  "@bobbykim/manguito-cms-db": "latest"
19
19
  },
20
+ "devDependencies": {
21
+ "@types/node": "^22.0.0"
22
+ },
20
23
  "engines": {
21
24
  "node": ">=22.0.0"
22
25
  }
@@ -8,7 +8,8 @@
8
8
  "strict": true,
9
9
  "noUncheckedIndexedAccess": true,
10
10
  "skipLibCheck": true,
11
- "esModuleInterop": true
11
+ "esModuleInterop": true,
12
+ "types": ["node"]
12
13
  },
13
14
  "include": ["manguito.config.ts"]
14
15
  }
package/package.json CHANGED
@@ -1,6 +1,14 @@
1
1
  {
2
2
  "name": "@bobbykim/manguito-cms-cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
+ "license": "MIT",
5
+ "author": "Bobby Kim <bobby.sihun.kim@gmail.com>",
6
+ "homepage": "https://github.com/bobbykim89/manguito-cms",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/bobbykim89/manguito-cms.git",
10
+ "directory": "packages/cli"
11
+ },
4
12
  "type": "module",
5
13
  "bin": {
6
14
  "manguito": "./dist/index.js"
@@ -19,17 +27,16 @@
19
27
  "commander": "^12.1.0",
20
28
  "dotenv": "^16.6.1",
21
29
  "tsup": "^8.5.1",
30
+ "typescript": "^6.0.3",
22
31
  "vite": "^6.4.3",
23
- "@bobbykim/manguito-cms-admin": "0.1.0",
24
- "@bobbykim/manguito-cms-db": "0.1.0",
25
- "@bobbykim/manguito-cms-core": "0.1.0",
26
- "@bobbykim/manguito-cms-api": "0.1.0"
32
+ "@bobbykim/manguito-cms-admin": "0.1.1",
33
+ "@bobbykim/manguito-cms-api": "0.1.1",
34
+ "@bobbykim/manguito-cms-core": "0.1.1",
35
+ "@bobbykim/manguito-cms-db": "0.1.1"
27
36
  },
28
37
  "devDependencies": {
29
38
  "@types/node": "^25.9.5",
30
39
  "dotenv-cli": "latest",
31
- "tsup": "^8.5.0",
32
- "typescript": "^6.0.3",
33
40
  "vitest": "^4.1.10"
34
41
  },
35
42
  "scripts": {
@@ -1,9 +0,0 @@
1
- DB_URL=postgres://user:password@localhost:5432/mydb
2
-
3
- # Storage
4
- {{storageAdapter}}
5
-
6
- AUTH_SECRET=change-me-before-going-to-production
7
- PORT=3000
8
- NODE_ENV=development
9
- ALLOWED_ORIGIN=http://localhost:3000
@@ -1,9 +0,0 @@
1
- node_modules/
2
- dist/
3
- .manguito/
4
- .env
5
- .env.*
6
- !.env.example
7
- migrations/
8
- uploads/
9
- *.log