@mars-stack/cli 0.2.2 → 1.0.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mars-stack/cli",
|
|
3
|
-
"version": "0.2
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "MARS CLI: scaffold, configure, and maintain SaaS apps",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"mars": "./dist/index.js"
|
|
23
23
|
},
|
|
24
24
|
"publishConfig": {
|
|
25
|
-
"access": "
|
|
25
|
+
"access": "public"
|
|
26
26
|
},
|
|
27
27
|
"files": [
|
|
28
28
|
"dist",
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"prepublishOnly": "yarn build && node scripts/copy-template.mjs"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
+
"@mars-stack/ui": "*",
|
|
40
41
|
"commander": "^14.0.3",
|
|
41
42
|
"fs-extra": "^11.0.0",
|
|
42
43
|
"ora": "^8.0.0",
|
|
@@ -280,11 +280,13 @@ Set up automated cleanup using a cron job or scheduled function:
|
|
|
280
280
|
```typescript
|
|
281
281
|
// src/app/api/cron/audit-cleanup/route.ts
|
|
282
282
|
import { NextResponse } from 'next/server';
|
|
283
|
+
import { constantTimeEqual } from '@mars-stack/core/auth/crypto-utils';
|
|
283
284
|
import { cleanupOldAuditLogs } from '@/features/audit-log/server';
|
|
284
285
|
|
|
285
286
|
export async function GET(request: Request) {
|
|
286
|
-
const authHeader = request.headers.get('authorization');
|
|
287
|
-
|
|
287
|
+
const authHeader = request.headers.get('authorization') ?? '';
|
|
288
|
+
const expected = `Bearer ${process.env.CRON_SECRET}`;
|
|
289
|
+
if (!constantTimeEqual(authHeader, expected)) {
|
|
288
290
|
return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
|
|
289
291
|
}
|
|
290
292
|
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Override --brand-* to customise your app's primary colour.
|
|
3
|
-
* Default (blue) shown below; replace with your brand palette. */
|
|
1
|
+
/* Generated by Mars — brand palette derived from blue-600 */
|
|
4
2
|
|
|
5
3
|
:root {
|
|
6
|
-
--brand-50: oklch(0.
|
|
7
|
-
--brand-100: oklch(0.
|
|
8
|
-
--brand-200: oklch(0.
|
|
9
|
-
--brand-300: oklch(0.
|
|
10
|
-
--brand-400: oklch(0.
|
|
11
|
-
--brand-500: oklch(0.
|
|
12
|
-
--brand-600: oklch(0.
|
|
13
|
-
--brand-700: oklch(0.
|
|
14
|
-
--brand-800: oklch(0.
|
|
15
|
-
--brand-900: oklch(0.
|
|
16
|
-
--brand-950: oklch(0.
|
|
4
|
+
--brand-50: oklch(0.970 0.015 263);
|
|
5
|
+
--brand-100: oklch(0.930 0.032 263);
|
|
6
|
+
--brand-200: oklch(0.880 0.060 263);
|
|
7
|
+
--brand-300: oklch(0.810 0.108 263);
|
|
8
|
+
--brand-400: oklch(0.710 0.155 263);
|
|
9
|
+
--brand-500: oklch(0.620 0.215 263);
|
|
10
|
+
--brand-600: oklch(0.550 0.215 263);
|
|
11
|
+
--brand-700: oklch(0.490 0.204 263);
|
|
12
|
+
--brand-800: oklch(0.420 0.176 263);
|
|
13
|
+
--brand-900: oklch(0.380 0.129 263);
|
|
14
|
+
--brand-950: oklch(0.280 0.099 263);
|
|
17
15
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@import 'tailwindcss';
|
|
2
2
|
@import '@mars-stack/ui/styles/index.css';
|
|
3
|
+
@import '@mars-stack/ui/styles/meta-modern-saas.css';
|
|
3
4
|
@import './brand.css';
|
|
4
5
|
/* Monorepo: deps at root (../../../). Scaffolded: deps at project root (../../). */
|
|
5
6
|
@source "../../../node_modules/@mars-stack/ui/dist/**/*.js";
|