@lemonadecms/create 0.1.0 → 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.
Files changed (40) hide show
  1. package/CHANGELOG.md +11 -1
  2. package/README.md +16 -0
  3. package/bin/create-lemonade.mjs +8 -6
  4. package/dist/catalog.json +193 -25
  5. package/dist/templates/angular/locks/npm-lock.json.template +2 -2
  6. package/dist/templates/angular/locks/pnpm-lock.yaml.template +14 -11
  7. package/dist/templates/angular/locks/yarn.lock.template +4899 -0
  8. package/dist/templates/angular/package.json +8 -1
  9. package/dist/templates/angular/vendor/README.md +32 -0
  10. package/dist/templates/angular/vendor/picomatch-4.0.7-lemonade-sec51.1.tgz +0 -0
  11. package/dist/templates/angular/vendor/picomatch-4.0.7.patch +59 -0
  12. package/dist/templates/angular/vendor/provenance.json +29 -0
  13. package/dist/templates/astro/locks/npm-lock.json.template +4 -4
  14. package/dist/templates/astro/locks/pnpm-lock.yaml.template +22 -15
  15. package/dist/templates/astro/locks/yarn.lock.template +4085 -0
  16. package/dist/templates/astro/package.json +10 -1
  17. package/dist/templates/astro/vendor/README.md +32 -0
  18. package/dist/templates/astro/vendor/picomatch-2.3.2-lemonade-sec51.1.tgz +0 -0
  19. package/dist/templates/astro/vendor/picomatch-2.3.2.patch +59 -0
  20. package/dist/templates/astro/vendor/picomatch-4.0.7-lemonade-sec51.1.tgz +0 -0
  21. package/dist/templates/astro/vendor/picomatch-4.0.7.patch +59 -0
  22. package/dist/templates/astro/vendor/provenance.json +43 -0
  23. package/dist/templates/next/locks/yarn.lock.template +775 -0
  24. package/dist/templates/nuxt/locks/npm-lock.json.template +6 -6
  25. package/dist/templates/nuxt/locks/pnpm-lock.yaml.template +33 -28
  26. package/dist/templates/nuxt/locks/yarn.lock.template +6915 -0
  27. package/dist/templates/nuxt/package.json +13 -1
  28. package/dist/templates/nuxt/vendor/README.md +32 -0
  29. package/dist/templates/nuxt/vendor/picomatch-2.3.2-lemonade-sec51.1.tgz +0 -0
  30. package/dist/templates/nuxt/vendor/picomatch-2.3.2.patch +59 -0
  31. package/dist/templates/nuxt/vendor/picomatch-4.0.7-lemonade-sec51.1.tgz +0 -0
  32. package/dist/templates/nuxt/vendor/picomatch-4.0.7.patch +59 -0
  33. package/dist/templates/nuxt/vendor/provenance.json +43 -0
  34. package/dist/templates/shared/GETTING_STARTED.md +3 -3
  35. package/dist/templates/shared/gitignore.template +3 -0
  36. package/dist/templates/shared/yarnrc.yml.template +2 -0
  37. package/package.json +1 -1
  38. package/src/arguments.mjs +23 -3
  39. package/src/catalog.mjs +35 -3
  40. package/src/prompts.mjs +7 -4
@@ -37,6 +37,15 @@
37
37
  "@parcel/watcher",
38
38
  "esbuild",
39
39
  "sharp"
40
- ]
40
+ ],
41
+ "overrides": {
42
+ "picomatch@2.3.2": "file:vendor/picomatch-2.3.2-lemonade-sec51.1.tgz",
43
+ "picomatch@4.0.7": "file:vendor/picomatch-4.0.7-lemonade-sec51.1.tgz"
44
+ }
45
+ },
46
+ "resolutions": {
47
+ "picomatch@npm:^2.0.4": "file:./vendor/picomatch-2.3.2-lemonade-sec51.1.tgz",
48
+ "picomatch@npm:^4.0.4": "file:./vendor/picomatch-4.0.7-lemonade-sec51.1.tgz",
49
+ "picomatch@npm:^4.0.7": "file:./vendor/picomatch-4.0.7-lemonade-sec51.1.tgz"
41
50
  }
42
51
  }
@@ -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.
@@ -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
+
@@ -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
+ }