@plank-cms/plank 0.14.1 → 0.15.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.
@@ -12,8 +12,8 @@
12
12
  href="https://fonts.googleapis.com/css2?family=Google+Sans:ital,opsz,wght@0,17..18,400..700;1,17..18,400..700&display=swap"
13
13
  rel="stylesheet"
14
14
  />
15
- <script type="module" crossorigin src="/admin/assets/index-qgnby08U.js"></script>
16
- <link rel="stylesheet" crossorigin href="/admin/assets/index-Xo36womD.css">
15
+ <script type="module" crossorigin src="/admin/assets/index-DAL-kgzW.js"></script>
16
+ <link rel="stylesheet" crossorigin href="/admin/assets/index-Bd_GPBpB.css">
17
17
  </head>
18
18
  <body>
19
19
  <div id="root"></div>
package/dist/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import "./chunk-MO4EEYFW.js";
3
2
 
4
3
  // src/commands/init.ts
5
4
  import { intro, outro, text, spinner, note, isCancel, cancel } from "@clack/prompts";
@@ -8,7 +7,7 @@ import { randomBytes } from "crypto";
8
7
  import { resolve, join } from "path";
9
8
  import fs from "fs-extra";
10
9
  import { execa } from "execa";
11
- var PACKAGE_VERSION = "0.14.1";
10
+ var PACKAGE_VERSION = "0.15.0";
12
11
  function generateSecret() {
13
12
  return randomBytes(32).toString("hex");
14
13
  }
@@ -85,6 +84,8 @@ async function init(projectName) {
85
84
  "",
86
85
  `Then start your CMS:`,
87
86
  "",
87
+ `${chalk.yellow("Important:")} keep ${chalk.cyan("PLANK_JWT_SECRET")} and ${chalk.cyan("PLANK_ENCRYPTION_KEY")} set in production.`,
88
+ "",
88
89
  ...!useCurrentDir ? [` ${chalk.cyan(`cd ${name}`)}`, ""] : [],
89
90
  ` ${chalk.cyan("npm start")}`
90
91
  ].join("\n"),
@@ -100,7 +101,7 @@ import { dirname, join as join2, resolve as resolve2 } from "path";
100
101
  async function start() {
101
102
  config({ path: resolve2(process.cwd(), ".env") });
102
103
  process.env.PLANK_ADMIN_DIST = join2(dirname(fileURLToPath(import.meta.url)), "admin");
103
- const { start: startServer } = await import("./server-WLCTRM3K.js");
104
+ const { start: startServer } = await import("./server-D4FUWQTZ.js");
104
105
  await startServer();
105
106
  }
106
107
 
@@ -0,0 +1,13 @@
1
+ ALTER TABLE plank_users
2
+ ADD COLUMN IF NOT EXISTS session_version INTEGER NOT NULL DEFAULT 1;
3
+
4
+ CREATE TABLE IF NOT EXISTS plank_auth_rate_limits (
5
+ id TEXT PRIMARY KEY,
6
+ scope VARCHAR(80) NOT NULL,
7
+ rate_key VARCHAR(255) NOT NULL,
8
+ count INTEGER NOT NULL DEFAULT 0,
9
+ reset_at TIMESTAMP NOT NULL,
10
+ created_at TIMESTAMP NOT NULL DEFAULT NOW(),
11
+ updated_at TIMESTAMP NOT NULL DEFAULT NOW(),
12
+ UNIQUE (scope, rate_key)
13
+ );
@@ -0,0 +1,10 @@
1
+ CREATE TABLE IF NOT EXISTS plank_user_backup_codes (
2
+ id TEXT PRIMARY KEY,
3
+ user_id TEXT NOT NULL REFERENCES plank_users(id) ON DELETE CASCADE,
4
+ code_hash VARCHAR(255) NOT NULL,
5
+ used_at TIMESTAMP,
6
+ created_at TIMESTAMP NOT NULL DEFAULT NOW()
7
+ );
8
+
9
+ CREATE INDEX IF NOT EXISTS idx_plank_user_backup_codes_user_id
10
+ ON plank_user_backup_codes(user_id);