@lemonadecms/create 0.0.0-stage → 0.1.1
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/CHANGELOG.md +23 -0
- package/LICENSE +21 -0
- package/README.md +42 -2
- package/bin/create-lemonade.mjs +124 -0
- package/dist/catalog.json +772 -0
- package/dist/templates/angular/angular.json +54 -0
- package/dist/templates/angular/locks/npm-lock.json.template +7079 -0
- package/dist/templates/angular/locks/pnpm-lock.yaml.template +4237 -0
- package/dist/templates/angular/locks/yarn.lock.template +4899 -0
- package/dist/templates/angular/package.json +68 -0
- package/dist/templates/angular/src/app/app.config.server.ts +23 -0
- package/dist/templates/angular/src/app/app.config.ts +34 -0
- package/dist/templates/angular/src/app/app.ts +9 -0
- package/dist/templates/angular/src/app/blog.service.ts +74 -0
- package/dist/templates/angular/src/app/journal.html +71 -0
- package/dist/templates/angular/src/app/journal.ts +47 -0
- package/dist/templates/angular/src/index.html +14 -0
- package/dist/templates/angular/src/main.server.ts +5 -0
- package/dist/templates/angular/src/main.ts +6 -0
- package/dist/templates/angular/src/server.ts +79 -0
- package/dist/templates/angular/tsconfig.app.json +8 -0
- package/dist/templates/angular/tsconfig.json +21 -0
- package/dist/templates/angular/vendor/README.md +32 -0
- package/dist/templates/angular/vendor/picomatch-4.0.7-lemonade-sec51.1.tgz +0 -0
- package/dist/templates/angular/vendor/picomatch-4.0.7.patch +59 -0
- package/dist/templates/angular/vendor/provenance.json +29 -0
- package/dist/templates/astro/astro.config.mjs +7 -0
- package/dist/templates/astro/locks/npm-lock.json.template +5478 -0
- package/dist/templates/astro/locks/pnpm-lock.yaml.template +3537 -0
- package/dist/templates/astro/locks/yarn.lock.template +4085 -0
- package/dist/templates/astro/package.json +51 -0
- package/dist/templates/astro/src/components/BlogView.astro +92 -0
- package/dist/templates/astro/src/layouts/Site.astro +23 -0
- package/dist/templates/astro/src/pages/articles/[id].astro +13 -0
- package/dist/templates/astro/src/pages/index.astro +13 -0
- package/dist/templates/astro/src/pages/lemonade/preview/[...path].ts +4 -0
- package/dist/templates/astro/src/pages/lemonade/preview.ts +4 -0
- package/dist/templates/astro/tsconfig.json +9 -0
- package/dist/templates/astro/vendor/README.md +32 -0
- package/dist/templates/astro/vendor/picomatch-2.3.2-lemonade-sec51.1.tgz +0 -0
- package/dist/templates/astro/vendor/picomatch-2.3.2.patch +59 -0
- package/dist/templates/astro/vendor/picomatch-4.0.7-lemonade-sec51.1.tgz +0 -0
- package/dist/templates/astro/vendor/picomatch-4.0.7.patch +59 -0
- package/dist/templates/astro/vendor/provenance.json +43 -0
- package/dist/templates/next/app/articles/[id]/page.tsx +29 -0
- package/dist/templates/next/app/data.ts +12 -0
- package/dist/templates/next/app/error.tsx +15 -0
- package/dist/templates/next/app/layout.tsx +13 -0
- package/dist/templates/next/app/lemonade/preview/[[...path]]/route.ts +7 -0
- package/dist/templates/next/app/loading.tsx +7 -0
- package/dist/templates/next/app/not-found.tsx +8 -0
- package/dist/templates/next/app/page.tsx +17 -0
- package/dist/templates/next/app/view.tsx +111 -0
- package/dist/templates/next/locks/npm-lock.json.template +1158 -0
- package/dist/templates/next/locks/pnpm-lock.yaml.template +715 -0
- package/dist/templates/next/locks/yarn.lock.template +775 -0
- package/dist/templates/next/next-env.d.ts +2 -0
- package/dist/templates/next/next.config.mjs +8 -0
- package/dist/templates/next/package.json +44 -0
- package/dist/templates/next/proxy.ts +19 -0
- package/dist/templates/next/tsconfig.json +25 -0
- package/dist/templates/nuxt/app/app.vue +1 -0
- package/dist/templates/nuxt/app/components/JournalView.vue +75 -0
- package/dist/templates/nuxt/app/pages/articles/[id].vue +8 -0
- package/dist/templates/nuxt/app/pages/index.vue +8 -0
- package/dist/templates/nuxt/locks/npm-lock.json.template +9113 -0
- package/dist/templates/nuxt/locks/pnpm-lock.yaml.template +6471 -0
- package/dist/templates/nuxt/locks/yarn.lock.template +6915 -0
- package/dist/templates/nuxt/nuxt.config.ts +27 -0
- package/dist/templates/nuxt/package.json +66 -0
- package/dist/templates/nuxt/server/api/blog/[id].get.ts +10 -0
- package/dist/templates/nuxt/server/api/blog.get.ts +9 -0
- package/dist/templates/nuxt/server/middleware/preview.ts +9 -0
- package/dist/templates/nuxt/server/utils/cms-environment.ts +15 -0
- package/dist/templates/nuxt/tsconfig.json +7 -0
- package/dist/templates/nuxt/vendor/README.md +32 -0
- package/dist/templates/nuxt/vendor/picomatch-2.3.2-lemonade-sec51.1.tgz +0 -0
- package/dist/templates/nuxt/vendor/picomatch-2.3.2.patch +59 -0
- package/dist/templates/nuxt/vendor/picomatch-4.0.7-lemonade-sec51.1.tgz +0 -0
- package/dist/templates/nuxt/vendor/picomatch-4.0.7.patch +59 -0
- package/dist/templates/nuxt/vendor/provenance.json +43 -0
- package/dist/templates/shared/GETTING_STARTED.md +29 -0
- package/dist/templates/shared/README.md +8 -0
- package/dist/templates/shared/env.example.template +11 -0
- package/dist/templates/shared/gitignore.template +16 -0
- package/dist/templates/shared/model-template.json +75 -0
- package/dist/templates/shared/public/blog.css +255 -0
- package/dist/templates/shared/public/lemonade.svg +5 -0
- package/dist/templates/shared/schema-contract.json +37 -0
- package/dist/templates/shared/scripts/cms-tools.mjs +171 -0
- package/dist/templates/shared/scripts/environment.mjs +68 -0
- package/dist/templates/shared/scripts/run.mjs +122 -0
- package/dist/templates/shared/server/blog.d.mts +35 -0
- package/dist/templates/shared/server/blog.mjs +159 -0
- package/dist/templates/shared/server/config.d.mts +11 -0
- package/dist/templates/shared/server/config.mjs +42 -0
- package/dist/templates/shared/server/preview.d.mts +4 -0
- package/dist/templates/shared/server/preview.mjs +276 -0
- package/dist/templates/shared/src/types/cms-models.ts +37 -0
- package/dist/templates/shared/yarnrc.yml.template +2 -0
- package/package.json +24 -4
- package/src/arguments.mjs +75 -0
- package/src/catalog.mjs +166 -0
- package/src/errors.mjs +10 -0
- package/src/generation.mjs +103 -0
- package/src/paths.mjs +90 -0
- package/src/prompts.mjs +68 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export default defineNuxtConfig({
|
|
2
|
+
compatibilityDate: '2026-11-16',
|
|
3
|
+
devtools: { enabled: false },
|
|
4
|
+
ssr: true,
|
|
5
|
+
nitro: { preset: 'node-server' },
|
|
6
|
+
runtimeConfig: {
|
|
7
|
+
cmsProjectId: '',
|
|
8
|
+
cmsPublicKey: '',
|
|
9
|
+
cmsEnvironment: '',
|
|
10
|
+
cmsLocale: '',
|
|
11
|
+
siteUrl: '',
|
|
12
|
+
cmsPreviewEnabled: '',
|
|
13
|
+
cmsSecretKey: '',
|
|
14
|
+
cmsPreviewUrl: '',
|
|
15
|
+
cmsStudioOrigin: 'https://app.lemonadecms.com',
|
|
16
|
+
},
|
|
17
|
+
routeRules: { '/**': { headers: { 'Cache-Control': 'private, no-store' } } },
|
|
18
|
+
app: {
|
|
19
|
+
head: {
|
|
20
|
+
htmlAttrs: { lang: 'en' },
|
|
21
|
+
link: [
|
|
22
|
+
{ rel: 'stylesheet', href: '/blog.css' },
|
|
23
|
+
{ rel: 'icon', href: '/lemonade.svg', type: 'image/svg+xml' },
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
});
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "lemonade-blog",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": "^22.23.5 || ^24.22.3"
|
|
8
|
+
},
|
|
9
|
+
"packageManager": "npm@11.6.2",
|
|
10
|
+
"lemonade": {
|
|
11
|
+
"framework": "nuxt",
|
|
12
|
+
"contract": 1
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"dev": "node scripts/run.mjs dev",
|
|
16
|
+
"check": "node scripts/run.mjs check",
|
|
17
|
+
"build": "node scripts/run.mjs build",
|
|
18
|
+
"start": "node scripts/run.mjs start",
|
|
19
|
+
"cms:setup": "node scripts/cms-tools.mjs setup",
|
|
20
|
+
"cms:check": "node scripts/cms-tools.mjs check",
|
|
21
|
+
"cms:types": "node scripts/cms-tools.mjs types"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@lemonadecms/client": "0.2.3",
|
|
25
|
+
"markdown-it": "15.0.3",
|
|
26
|
+
"nuxt": "4.6.4",
|
|
27
|
+
"vue": "3.5.44",
|
|
28
|
+
"vue-router": "5.4.0",
|
|
29
|
+
"rolldown": "1.2.16",
|
|
30
|
+
"h3": "1.15.11"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@types/node": "24.10.1",
|
|
34
|
+
"@types/markdown-it": "14.1.2",
|
|
35
|
+
"typescript": "5.9.3",
|
|
36
|
+
"vue-tsc": "3.3.14",
|
|
37
|
+
"@nuxt/cli": "4.0.3"
|
|
38
|
+
},
|
|
39
|
+
"pnpm": {
|
|
40
|
+
"onlyBuiltDependencies": [
|
|
41
|
+
"@parcel/watcher",
|
|
42
|
+
"esbuild",
|
|
43
|
+
"sharp"
|
|
44
|
+
],
|
|
45
|
+
"overrides": {
|
|
46
|
+
"readdir-glob>minimatch": "11.0.5",
|
|
47
|
+
"picomatch@2.3.2": "file:vendor/picomatch-2.3.2-lemonade-sec51.1.tgz",
|
|
48
|
+
"picomatch@4.0.7": "file:vendor/picomatch-4.0.7-lemonade-sec51.1.tgz"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"overrides": {
|
|
52
|
+
"readdir-glob": {
|
|
53
|
+
"minimatch": "11.0.5"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"resolutions": {
|
|
57
|
+
"readdir-glob/minimatch": "11.0.5",
|
|
58
|
+
"picomatch@npm:^2.0.4": "file:./vendor/picomatch-2.3.2-lemonade-sec51.1.tgz",
|
|
59
|
+
"picomatch@npm:^2.3.1": "file:./vendor/picomatch-2.3.2-lemonade-sec51.1.tgz",
|
|
60
|
+
"picomatch@npm:^4.0.2": "file:./vendor/picomatch-4.0.7-lemonade-sec51.1.tgz",
|
|
61
|
+
"picomatch@npm:^4.0.3": "file:./vendor/picomatch-4.0.7-lemonade-sec51.1.tgz",
|
|
62
|
+
"picomatch@npm:^4.0.4": "file:./vendor/picomatch-4.0.7-lemonade-sec51.1.tgz",
|
|
63
|
+
"picomatch@npm:^4.0.5": "file:./vendor/picomatch-4.0.7-lemonade-sec51.1.tgz",
|
|
64
|
+
"picomatch@npm:^4.0.7": "file:./vendor/picomatch-4.0.7-lemonade-sec51.1.tgz"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { readBlog, headers } from '../../blog.mjs';
|
|
2
|
+
import { cmsEnvironment } from '../../utils/cms-environment';
|
|
3
|
+
export default defineEventHandler(async (event) => {
|
|
4
|
+
const view = await readBlog(getRequestURL(event).href, {
|
|
5
|
+
id: getRouterParam(event, 'id'),
|
|
6
|
+
env: cmsEnvironment(event),
|
|
7
|
+
});
|
|
8
|
+
setResponseHeaders(event, headers);
|
|
9
|
+
return view;
|
|
10
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { readBlog, headers } from '../blog.mjs';
|
|
2
|
+
import { cmsEnvironment } from '../utils/cms-environment';
|
|
3
|
+
export default defineEventHandler(async (event) => {
|
|
4
|
+
const view = await readBlog(getRequestURL(event).href, {
|
|
5
|
+
env: cmsEnvironment(event),
|
|
6
|
+
});
|
|
7
|
+
setResponseHeaders(event, headers);
|
|
8
|
+
return view;
|
|
9
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { handlePreview } from '../preview.mjs';
|
|
2
|
+
import { cmsEnvironment } from '../utils/cms-environment';
|
|
3
|
+
export default defineEventHandler(async (event) => {
|
|
4
|
+
if (!event.path.startsWith('/lemonade/preview')) return;
|
|
5
|
+
return (
|
|
6
|
+
(await handlePreview(toWebRequest(event), { env: cmsEnvironment(event) })) ||
|
|
7
|
+
undefined
|
|
8
|
+
);
|
|
9
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { H3Event } from 'h3';
|
|
2
|
+
export function cmsEnvironment(event: H3Event) {
|
|
3
|
+
const c = useRuntimeConfig(event);
|
|
4
|
+
return {
|
|
5
|
+
CMS_PROJECT_ID: String(c.cmsProjectId),
|
|
6
|
+
CMS_PUBLIC_KEY: String(c.cmsPublicKey),
|
|
7
|
+
CMS_ENVIRONMENT: String(c.cmsEnvironment),
|
|
8
|
+
CMS_LOCALE: String(c.cmsLocale),
|
|
9
|
+
SITE_URL: String(c.siteUrl),
|
|
10
|
+
CMS_PREVIEW_ENABLED: String(c.cmsPreviewEnabled),
|
|
11
|
+
CMS_SECRET_KEY: String(c.cmsSecretKey),
|
|
12
|
+
CMS_PREVIEW_URL: String(c.cmsPreviewUrl),
|
|
13
|
+
CMS_STUDIO_ORIGIN: String(c.cmsStudioOrigin),
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Local picomatch security backports
|
|
2
|
+
|
|
3
|
+
These archives contain Lemonade's SEC-51 parser backports for
|
|
4
|
+
[GHSA-fc5q-39xc-vjpf](https://github.com/advisories/GHSA-fc5q-39xc-vjpf), not an
|
|
5
|
+
upstream patched release. Each retains the original package name/version and MIT
|
|
6
|
+
license. No install hook modifies node_modules. Keep this directory with the app.
|
|
7
|
+
|
|
8
|
+
Use the supplied frozen lock (`npm ci` or `pnpm install --frozen-lockfile`). npm
|
|
9
|
+
locks bind each transitive occurrence directly to its local archive/integrity;
|
|
10
|
+
pnpm additionally uses exact-version local overrides. Updating dependencies or
|
|
11
|
+
regenerating locks requires reviewing all picomatch resolutions. Ordinary npm
|
|
12
|
+
audit tools still identify the original upstream versions as affected.
|
|
13
|
+
|
|
14
|
+
Simple single-branch repeated wildcard patterns retain matching behavior without
|
|
15
|
+
nested unbounded quantifiers. Unsafe complex wildcard/capture patterns use
|
|
16
|
+
picomatch's existing literal fallback; their former complex/capture semantics
|
|
17
|
+
are intentionally unavailable. Quoted/escaped stars and ordinary globs retain
|
|
18
|
+
their behavior. The existing explicit `maxExtglobRecursion: false` disables safety;
|
|
19
|
+
never use it with untrusted patterns.
|
|
20
|
+
|
|
21
|
+
`provenance.json` records original npm SRI/SHA-256, parser/patch/output hashes and
|
|
22
|
+
inspected upstream PR heads. The original archives are obtainable from npm's
|
|
23
|
+
`picomatch` registry record for that exact version. Verify their SRI before
|
|
24
|
+
applying the included single-file patches to `package/lib/parse.js`. Every other
|
|
25
|
+
file, including package metadata and license, remains byte-identical. The
|
|
26
|
+
repository's `scripts/security/picomatch_backports.py` rebuilds canonical tar/gzip
|
|
27
|
+
outputs with sorted names, fixed modes, zero timestamps and no links.
|
|
28
|
+
|
|
29
|
+
Upstream PRs 237 and 246 were open and unmerged when inspected. Replace these
|
|
30
|
+
local backports only with a reviewed upstream fix qualified against this app's
|
|
31
|
+
actual framework and both package managers. Regenerate and review locks together;
|
|
32
|
+
do not silently remove the patch or rename its version to bypass an advisory.
|
|
Binary file
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
--- a/lib/parse.js
|
|
2
|
+
+++ b/lib/parse.js
|
|
3
|
+
@@ -280,6 +280,33 @@
|
|
4
|
+
return depth;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
+// Lemonade SEC-51 backport: preserve simple repeated-star languages without
|
|
8
|
+
+// nesting unbounded quantifiers. Other bare-star shapes use the existing risky
|
|
9
|
+
+// extglob literal fallback. Quoted/escaped/class stars are not wildcard stars.
|
|
10
|
+
+const analyzeSingleStarBranch = (branch, options) => {
|
|
11
|
+
+ let quoted = false;
|
|
12
|
+
+ let escaped = false;
|
|
13
|
+
+ let bracket = false;
|
|
14
|
+
+ let wildcard = false;
|
|
15
|
+
+
|
|
16
|
+
+ for (let i = 0; i < branch.length; i++) {
|
|
17
|
+
+ const ch = branch[i];
|
|
18
|
+
+ if (escaped) { escaped = false; continue; }
|
|
19
|
+
+ if (ch === '\\') { escaped = true; continue; }
|
|
20
|
+
+ if (ch === '"' && !bracket) { quoted = !quoted; continue; }
|
|
21
|
+
+ if (quoted) continue;
|
|
22
|
+
+ if (ch === '[') { bracket = true; continue; }
|
|
23
|
+
+ if (ch === ']' && bracket) { bracket = false; continue; }
|
|
24
|
+
+ if (!bracket && ch === '*' && branch[i + 1] !== '(') wildcard = true;
|
|
25
|
+
+ }
|
|
26
|
+
+
|
|
27
|
+
+ if (!wildcard) return null;
|
|
28
|
+
+ if (options.capture === true || branch.includes('**') || /[\\/"?()[\]{}|!+@]/.test(branch)) {
|
|
29
|
+
+ return { risky: true };
|
|
30
|
+
+ }
|
|
31
|
+
+ return { risky: false, collapse: true };
|
|
32
|
+
+};
|
|
33
|
+
+
|
|
34
|
+
const analyzeRepeatedExtglob = (body, options) => {
|
|
35
|
+
if (options.maxExtglobRecursion === false) {
|
|
36
|
+
return { risky: false };
|
|
37
|
+
@@ -311,6 +338,11 @@
|
|
38
|
+
if (repeatedExtglobRecursion(branch) > max) {
|
|
39
|
+
return { risky: true };
|
|
40
|
+
}
|
|
41
|
+
+ }
|
|
42
|
+
+
|
|
43
|
+
+ if (branches.length === 1) {
|
|
44
|
+
+ const single = analyzeSingleStarBranch(branches[0], options);
|
|
45
|
+
+ if (single) return single;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return { risky: false };
|
|
49
|
+
@@ -536,6 +568,10 @@
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
+ if (analysis.collapse === true && (token.type === 'plus' || token.type === 'star')) {
|
|
54
|
+
+ token.close = token.type === 'plus' ? ')' : ')?';
|
|
55
|
+
+ }
|
|
56
|
+
+
|
|
57
|
+
let output = token.close + (opts.capture ? ')' : '');
|
|
58
|
+
let rest;
|
|
59
|
+
|
|
Binary file
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
--- a/lib/parse.js
|
|
2
|
+
+++ b/lib/parse.js
|
|
3
|
+
@@ -284,6 +284,33 @@
|
|
4
|
+
return depth;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
+// Lemonade SEC-51 backport: preserve simple repeated-star languages without
|
|
8
|
+
+// nesting unbounded quantifiers. Other bare-star shapes use the existing risky
|
|
9
|
+
+// extglob literal fallback. Quoted/escaped/class stars are not wildcard stars.
|
|
10
|
+
+const analyzeSingleStarBranch = (branch, options) => {
|
|
11
|
+
+ let quoted = false;
|
|
12
|
+
+ let escaped = false;
|
|
13
|
+
+ let bracket = false;
|
|
14
|
+
+ let wildcard = false;
|
|
15
|
+
+
|
|
16
|
+
+ for (let i = 0; i < branch.length; i++) {
|
|
17
|
+
+ const ch = branch[i];
|
|
18
|
+
+ if (escaped) { escaped = false; continue; }
|
|
19
|
+
+ if (ch === '\\') { escaped = true; continue; }
|
|
20
|
+
+ if (ch === '"' && !bracket) { quoted = !quoted; continue; }
|
|
21
|
+
+ if (quoted) continue;
|
|
22
|
+
+ if (ch === '[') { bracket = true; continue; }
|
|
23
|
+
+ if (ch === ']' && bracket) { bracket = false; continue; }
|
|
24
|
+
+ if (!bracket && ch === '*' && branch[i + 1] !== '(') wildcard = true;
|
|
25
|
+
+ }
|
|
26
|
+
+
|
|
27
|
+
+ if (!wildcard) return null;
|
|
28
|
+
+ if (options.capture === true || branch.includes('**') || /[\\/"?()[\]{}|!+@]/.test(branch)) {
|
|
29
|
+
+ return { risky: true };
|
|
30
|
+
+ }
|
|
31
|
+
+ return { risky: false, collapse: true };
|
|
32
|
+
+};
|
|
33
|
+
+
|
|
34
|
+
const analyzeRepeatedExtglob = (body, options) => {
|
|
35
|
+
if (options.maxExtglobRecursion === false) {
|
|
36
|
+
return { risky: false };
|
|
37
|
+
@@ -341,6 +368,11 @@
|
|
38
|
+
return combinable
|
|
39
|
+
? { risky: true, safeOutput: buildCharClassStar([...new Set(safeChars)]) }
|
|
40
|
+
: { risky: true };
|
|
41
|
+
+ }
|
|
42
|
+
+
|
|
43
|
+
+ if (branches.length === 1) {
|
|
44
|
+
+ const single = analyzeSingleStarBranch(branches[0], options);
|
|
45
|
+
+ if (single) return single;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return { risky: false };
|
|
49
|
+
@@ -565,6 +597,10 @@
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
+ if (analysis.collapse === true && (token.type === 'plus' || token.type === 'star')) {
|
|
54
|
+
+ token.close = token.type === 'plus' ? ')' : ')?';
|
|
55
|
+
+ }
|
|
56
|
+
+
|
|
57
|
+
let output = token.close + (opts.capture ? ')' : '');
|
|
58
|
+
let rest;
|
|
59
|
+
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"advisory": "GHSA-fc5q-39xc-vjpf",
|
|
3
|
+
"upstream_fixes": [
|
|
4
|
+
{
|
|
5
|
+
"url": "https://github.com/micromatch/picomatch/pull/237",
|
|
6
|
+
"head": "1bf0d04563cb9ce568cf36efc5f6b7187d9911d5"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"url": "https://github.com/micromatch/picomatch/pull/246",
|
|
10
|
+
"head": "f03bec2c02e46f063fbfdc161aae1d0f854b2565"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"packages": [
|
|
14
|
+
{
|
|
15
|
+
"name": "picomatch",
|
|
16
|
+
"version": "2.3.2",
|
|
17
|
+
"upstream": "upstream/picomatch-2.3.2.tgz",
|
|
18
|
+
"upstream_sha256": "4c843ba015bec815ac52116162559ab7b4b4efbd3b86f7fcf38f3d770decace6",
|
|
19
|
+
"upstream_integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",
|
|
20
|
+
"patch": "patches/picomatch-2.3.2.patch",
|
|
21
|
+
"patch_sha256": "1d0762b3d2d7baa6917dee9f17bbe70eb41f66b37b2fbd7ae52dcd833cdd7f86",
|
|
22
|
+
"original_parser_sha256": "3a91656f440069aa8f8e15c9d695b9f6b2209df1eab2be8127c72cbcca45ff5f",
|
|
23
|
+
"patched_parser_sha256": "9b01b55a8c3de44f8f73d910ae1c56f5d1dd6c2eba19c7f61a62a337ab785816",
|
|
24
|
+
"archive": "archives/picomatch-2.3.2-lemonade-sec51.1.tgz",
|
|
25
|
+
"archive_sha256": "a1bba26d10270d5f1bd36062400aaaebeb4473e3507b61aaba4fb932cb54daa5",
|
|
26
|
+
"archive_integrity": "sha512-7zQO4hSvfvH7CcUPXD8tFo7X0Yh3gUgifS8by7hrbggrQO4yYoCkkY3BopG7HcxQ51dKtrk2a8h5KyBe8SyxKw=="
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "picomatch",
|
|
30
|
+
"version": "4.0.7",
|
|
31
|
+
"upstream": "upstream/picomatch-4.0.7.tgz",
|
|
32
|
+
"upstream_sha256": "697b463be3cdbd9ffc8f4194fd5019a69ddf95875fb703d78b2b115cc9e740a8",
|
|
33
|
+
"upstream_integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==",
|
|
34
|
+
"patch": "patches/picomatch-4.0.7.patch",
|
|
35
|
+
"patch_sha256": "ed1fe75757af96f132a2adb63d12376994e1d9582e8c6e7dd9741ecae9ddf9bc",
|
|
36
|
+
"original_parser_sha256": "4e1e05447668aa1e94366c5516a2bcd8f5fff800cc92b1d0cd7d77703b8618c4",
|
|
37
|
+
"patched_parser_sha256": "01c40acfda6f7c40a32dd4e6671cbec1c70e22f980cda8b22ea64d948a323c0c",
|
|
38
|
+
"archive": "archives/picomatch-4.0.7-lemonade-sec51.1.tgz",
|
|
39
|
+
"archive_sha256": "a0af57ad2de1444dbb70588db2444e906a47a5bd77c5150905cbfd6de02d636c",
|
|
40
|
+
"archive_integrity": "sha512-jkjudKn+93rODxiTonD3ehUEbHrHtSWpYcdZglbGGSbbc/Aqjz6j3R/1m0uuQJQXqFY/WZTtv9F+ZSM3ZCSrdA=="
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Your Lemonade journal
|
|
2
|
+
|
|
3
|
+
This is your standalone application. The initializer ran no installation, Git or CMS operations.
|
|
4
|
+
|
|
5
|
+
1. Install dependencies before adding private configuration. Use the command printed by the initializer for your lockfile: `npm ci --ignore-scripts`, `pnpm install --frozen-lockfile`, or `yarn install --immutable`. pnpm only approves the explicitly listed esbuild/sharp/watcher build scripts. The Yarn template uses `node_modules` with dependency build scripts disabled.
|
|
6
|
+
2. Sign in at https://app.lemonadecms.com and choose the intended workspace and environment.
|
|
7
|
+
3. Under Content types, choose Start with a template → Articles and authors, or review/import model-template.json. Imports create new types only; conflicting keys require a different workspace or a compatible existing model. Nothing is overwritten.
|
|
8
|
+
4. In that environment's API access, issue a published read application token scoped to article and author, your language and media. Configure only that model scope: the currently pinned SDK schema CLI cannot negotiate unrelated JSON-field models.
|
|
9
|
+
5. Create your ignored .env from .env.example and set the workspace UUID, exact environment key/UUID, locale, public token and SITE_URL (the local website origin). Never paste secrets into command arguments.
|
|
10
|
+
6. Run `cms:check` and then `cms:types` using your manager, for example `yarn run cms:check` and `yarn run cms:types`. A verified empty collection is valid; create an author and article in Studio and publish the author before the article. Publication is always explicit.
|
|
11
|
+
7. Run the `dev` script with the same manager. Articles use UUID URLs; the preset's slug is plain text, not a uniqueness guarantee.
|
|
12
|
+
|
|
13
|
+
The SDK calls the hosted API. It has no custom URL/environment option; the credential selects the environment. Check again after changing credentials. SSR pages are uncached so the next request can show a new publication. Do not turn on static generation/CDN caching for expiring media links without designing an invalidation strategy.
|
|
14
|
+
|
|
15
|
+
## Saved draft preview
|
|
16
|
+
|
|
17
|
+
Optional preview requires a separate server-only preview application token, CMS_PREVIEW_ENABLED=true, exact CMS_PREVIEW_URL ending /lemonade/preview, and CMS_STUDIO_ORIGIN=https://app.lemonadecms.com. An authorized manager must configure that model/language destination in Workspace settings → Website preview. Hosted Studio requires HTTPS: use your own HTTPS site/tunnel; none is created automatically. The scoped session is stored in a path-restricted HttpOnly cookie and read by server routes; unsaved Studio changes are excluded. Open a new preview after expiry or permission changes. Private routes never fall back to broad draft reads.
|
|
18
|
+
|
|
19
|
+
Ordinary pages receive published content. The optional private preview renders the authorized saved draft in a separate view. Keep all keys out of public runtime configuration, client environment files and Git. Canonical CMS variables come from process environment before this project's .env (64 KiB maximum). Other dotenv files must not select a different CMS namespace. Production deployment supplies the same variables at runtime; framework builds do not need credentials or a running CMS.
|
|
20
|
+
|
|
21
|
+
## Commands
|
|
22
|
+
|
|
23
|
+
- `dev`: native framework development server, loopback by default.
|
|
24
|
+
- `check`, `build`, `start`: type/check, production SSR build, Node server.
|
|
25
|
+
- `cms:setup`: local configuration checklist, no network or writes.
|
|
26
|
+
- `cms:check`: scoped schema/connection check and bounded published read.
|
|
27
|
+
- `cms:types`: verified schema → the documented generated types file, no CMS writes.
|
|
28
|
+
|
|
29
|
+
Setup failures, upstream errors and an empty collection are different states. No demonstration data is substituted for failed CMS reads. CMS checks can update ordinary usage/last-used metadata, never content or schema.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Lemonade blog
|
|
2
|
+
|
|
3
|
+
See [GETTING_STARTED.md](GETTING_STARTED.md) to connect your workspace. This app contains ordinary framework source that you own and can adapt.
|
|
4
|
+
|
|
5
|
+
This Lemonade starter is qualified locally on macOS and Linux. **Windows is
|
|
6
|
+
unverified** for this release; portable-path tests do not establish native Windows
|
|
7
|
+
compatibility. The application still requires your explicit dependency installation
|
|
8
|
+
and Studio configuration.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Configure privately after installing dependencies. Never commit .env.
|
|
2
|
+
CMS_PROJECT_ID=
|
|
3
|
+
CMS_ENVIRONMENT=
|
|
4
|
+
CMS_LOCALE=
|
|
5
|
+
CMS_PUBLIC_KEY=
|
|
6
|
+
SITE_URL=
|
|
7
|
+
# Optional saved-draft preview; requires a separate Studio-approved HTTPS destination.
|
|
8
|
+
CMS_PREVIEW_ENABLED=false
|
|
9
|
+
CMS_SECRET_KEY=
|
|
10
|
+
CMS_PREVIEW_URL=
|
|
11
|
+
CMS_STUDIO_ORIGIN=https://app.lemonadecms.com
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "lemonade-model-template",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"name": "Lemonade blog",
|
|
5
|
+
"description": "Articles and authors for the official blog starters. Contains no entries or media.",
|
|
6
|
+
"models": [
|
|
7
|
+
{
|
|
8
|
+
"key": "author",
|
|
9
|
+
"name": "Authors",
|
|
10
|
+
"fields": [
|
|
11
|
+
{
|
|
12
|
+
"key": "name",
|
|
13
|
+
"label": "Name",
|
|
14
|
+
"type": "text",
|
|
15
|
+
"required": true
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"key": "bio",
|
|
19
|
+
"label": "Biography",
|
|
20
|
+
"type": "markdown",
|
|
21
|
+
"required": false
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"key": "portrait",
|
|
25
|
+
"label": "Portrait",
|
|
26
|
+
"type": "image",
|
|
27
|
+
"required": false
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"key": "article",
|
|
33
|
+
"name": "Articles",
|
|
34
|
+
"fields": [
|
|
35
|
+
{
|
|
36
|
+
"key": "title",
|
|
37
|
+
"label": "Title",
|
|
38
|
+
"type": "text",
|
|
39
|
+
"required": true
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"key": "slug",
|
|
43
|
+
"label": "Slug",
|
|
44
|
+
"type": "text",
|
|
45
|
+
"required": true
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"key": "body",
|
|
49
|
+
"label": "Body",
|
|
50
|
+
"type": "markdown",
|
|
51
|
+
"required": true
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"key": "author",
|
|
55
|
+
"label": "Author",
|
|
56
|
+
"type": "reference",
|
|
57
|
+
"required": true,
|
|
58
|
+
"target": "author"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"key": "cover",
|
|
62
|
+
"label": "Cover",
|
|
63
|
+
"type": "image",
|
|
64
|
+
"required": false
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"key": "date",
|
|
68
|
+
"label": "Publication date",
|
|
69
|
+
"type": "date",
|
|
70
|
+
"required": false
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}
|