From f10aaa30a2dc4600b688abd20ea42f7c3ac690b1 Mon Sep 17 00:00:00 2001 From: Owen Buckley Date: Mon, 28 Aug 2023 16:35:15 -0400 Subject: [PATCH 1/8] WIP custom CSS imports --- greenwood.config.js | 2 + package-lock.json | 578 ++++++++++++++++++ package.json | 10 +- patches/@greenwood+cli+0.29.0-alpha.3.patch | 126 ++++ ...llup-plugin-import-meta-assets+1.0.8.patch | 19 + src/components/card.css | 44 ++ src/components/card.js | 46 +- 7 files changed, 779 insertions(+), 46 deletions(-) create mode 100644 patches/@greenwood+cli+0.29.0-alpha.3.patch create mode 100644 patches/@web+rollup-plugin-import-meta-assets+1.0.8.patch create mode 100644 src/components/card.css diff --git a/greenwood.config.js b/greenwood.config.js index b4371ef..7f61308 100644 --- a/greenwood.config.js +++ b/greenwood.config.js @@ -1,7 +1,9 @@ import { greenwoodPluginAdapterVercel } from '@greenwood/plugin-adapter-vercel'; +import { greenwoodPluginImportCss } from '@greenwood/plugin-import-css'; export default { plugins: [ + greenwoodPluginImportCss(), greenwoodPluginAdapterVercel() ] }; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index b64d35b..11e9641 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,6 +7,7 @@ "": { "name": "greenwood-htmx", "version": "1.0.0", + "hasInstallScript": true, "license": "ISC", "dependencies": { "htmx.org": "^1.9.4" @@ -14,6 +15,7 @@ "devDependencies": { "@greenwood/cli": "~0.29.0-alpha.4", "@greenwood/plugin-adapter-vercel": "~0.29.0-alpha.4", + "patch-package": "^8.0.0", "rimraf": "^5.0.1" } }, @@ -522,6 +524,12 @@ "node": ">=12" } }, + "node_modules/@yarnpkg/lockfile": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", + "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", + "dev": true + }, "node_modules/accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -638,6 +646,15 @@ "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", "dev": true }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/autolinker": { "version": "0.28.1", "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-0.28.1.tgz", @@ -757,6 +774,37 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/character-entities": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", @@ -824,6 +872,21 @@ "fsevents": "~2.3.2" } }, + "node_modules/ci-info": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" + } + }, "node_modules/co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -1263,6 +1326,15 @@ "node": ">=8" } }, + "node_modules/find-yarn-workspace-root": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz", + "integrity": "sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==", + "dev": true, + "dependencies": { + "micromatch": "^4.0.2" + } + }, "node_modules/for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -1330,6 +1402,21 @@ "js-yaml": "^3.13.1" } }, + "node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -1403,6 +1490,12 @@ "node": ">= 6" } }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, "node_modules/gray-matter": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-2.1.1.tgz", @@ -1443,6 +1536,15 @@ "node": ">= 0.4.0" } }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/has-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", @@ -1821,6 +1923,21 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true, + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-extendable": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", @@ -1953,6 +2070,18 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -2005,6 +2134,39 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/json-stable-stringify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.2.tgz", + "integrity": "sha512-eunSSaEnxV12z+Z73y/j5N37/In40GK4GmsSy+tEHJMxknvqnA7/djeYtAgW0GsWHUfg+847WJjKaEylk2y09g==", + "dev": true, + "dependencies": { + "jsonify": "^0.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jsonify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz", + "integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/keygrip": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/keygrip/-/keygrip-1.1.0.tgz", @@ -2029,6 +2191,15 @@ "node": ">=0.10.0" } }, + "node_modules/klaw-sync": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz", + "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.11" + } + }, "node_modules/koa": { "version": "2.14.2", "resolved": "https://registry.npmjs.org/koa/-/koa-2.14.2.tgz", @@ -2295,6 +2466,19 @@ "node": ">= 0.6" } }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -2452,12 +2636,37 @@ "integrity": "sha512-Fvw+Jemq5fjjyWz6CpKx6w9s7xxqo3+JCyM0WXWeCSOboZ8ABkyvP8ID4CZuChA/wxSx+XSJmdOm8rGVyJ1hdQ==", "dev": true }, + "node_modules/open": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", + "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", + "dev": true, + "dependencies": { + "is-docker": "^2.0.0", + "is-wsl": "^2.1.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/opts": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/opts/-/opts-2.0.2.tgz", "integrity": "sha512-k41FwbcLnlgnFh69f4qdUfvDQ+5vaSDnVPFI/y5XuhKRq97EnVVneO9F1ESVCdiVu4fCS2L8usX3mU331hB7pg==", "dev": true }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/parse-entities": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", @@ -2491,6 +2700,48 @@ "node": ">= 0.8" } }, + "node_modules/patch-package": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-8.0.0.tgz", + "integrity": "sha512-da8BVIhzjtgScwDJ2TtKsfT5JFWz1hYoBl9rUQ1f38MC2HwnEIkK8VN3dKMKcP7P7bvvgzNDbfNHtx3MsQb5vA==", + "dev": true, + "dependencies": { + "@yarnpkg/lockfile": "^1.1.0", + "chalk": "^4.1.2", + "ci-info": "^3.7.0", + "cross-spawn": "^7.0.3", + "find-yarn-workspace-root": "^2.0.0", + "fs-extra": "^9.0.0", + "json-stable-stringify": "^1.0.2", + "klaw-sync": "^6.0.0", + "minimist": "^1.2.6", + "open": "^7.4.2", + "rimraf": "^2.6.3", + "semver": "^7.5.3", + "slash": "^2.0.0", + "tmp": "^0.0.33", + "yaml": "^2.2.2" + }, + "bin": { + "patch-package": "index.js" + }, + "engines": { + "node": ">=14", + "npm": ">5" + } + }, + "node_modules/patch-package/node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -2918,6 +3169,33 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, + "node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/set-getter": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.1.tgz", @@ -2983,6 +3261,15 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -3197,6 +3484,18 @@ "inline-style-parser": "0.1.1" } }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -3237,6 +3536,18 @@ "xtend": "~4.0.1" } }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, "node_modules/to-object-path": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", @@ -3490,6 +3801,15 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, "node_modules/unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", @@ -3745,6 +4065,21 @@ "node": ">=0.4" } }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/yaml": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.2.tgz", + "integrity": "sha512-N/lyzTPaJasoDmfV7YTrYCI0G/3ivm/9wdG0aHuheKowWQwGTsK0Eoiw6utmzAnI6pkJa0DUVygvp3spqqEKXg==", + "dev": true, + "engines": { + "node": ">= 14" + } + }, "node_modules/ylru": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/ylru/-/ylru-1.3.2.tgz", @@ -4211,6 +4546,12 @@ } } }, + "@yarnpkg/lockfile": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", + "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", + "dev": true + }, "accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -4291,6 +4632,12 @@ "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", "dev": true }, + "at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true + }, "autolinker": { "version": "0.28.1", "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-0.28.1.tgz", @@ -4381,6 +4728,27 @@ "integrity": "sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg==", "dev": true }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + } + } + }, "character-entities": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", @@ -4421,6 +4789,12 @@ "readdirp": "~3.6.0" } }, + "ci-info": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", + "dev": true + }, "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -4756,6 +5130,15 @@ "to-regex-range": "^5.0.1" } }, + "find-yarn-workspace-root": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz", + "integrity": "sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==", + "dev": true, + "requires": { + "micromatch": "^4.0.2" + } + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -4805,6 +5188,18 @@ "js-yaml": "^3.13.1" } }, + "fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "requires": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -4859,6 +5254,12 @@ "is-glob": "^4.0.1" } }, + "graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, "gray-matter": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-2.1.1.tgz", @@ -4892,6 +5293,12 @@ "function-bind": "^1.1.1" } }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, "has-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", @@ -5169,6 +5576,12 @@ "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", "dev": true }, + "is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true + }, "is-extendable": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", @@ -5262,6 +5675,15 @@ "integrity": "sha512-5SMO8RVennx3nZrqtKwCGyyetPE9VDba5ugvKLaD4KopPG5kR4mQ7tNt/r7feL5yt5h3lpuBbIUmCOG2eSzXHA==", "dev": true }, + "is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "requires": { + "is-docker": "^2.0.0" + } + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -5300,6 +5722,31 @@ "esprima": "^4.0.0" } }, + "json-stable-stringify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.2.tgz", + "integrity": "sha512-eunSSaEnxV12z+Z73y/j5N37/In40GK4GmsSy+tEHJMxknvqnA7/djeYtAgW0GsWHUfg+847WJjKaEylk2y09g==", + "dev": true, + "requires": { + "jsonify": "^0.0.1" + } + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "jsonify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz", + "integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==", + "dev": true + }, "keygrip": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/keygrip/-/keygrip-1.1.0.tgz", @@ -5318,6 +5765,15 @@ "is-buffer": "^1.1.5" } }, + "klaw-sync": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz", + "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11" + } + }, "koa": { "version": "2.14.2", "resolved": "https://registry.npmjs.org/koa/-/koa-2.14.2.tgz", @@ -5539,6 +5995,16 @@ "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", "dev": true }, + "micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + } + }, "mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -5662,12 +6128,28 @@ "integrity": "sha512-Fvw+Jemq5fjjyWz6CpKx6w9s7xxqo3+JCyM0WXWeCSOboZ8ABkyvP8ID4CZuChA/wxSx+XSJmdOm8rGVyJ1hdQ==", "dev": true }, + "open": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", + "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", + "dev": true, + "requires": { + "is-docker": "^2.0.0", + "is-wsl": "^2.1.1" + } + }, "opts": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/opts/-/opts-2.0.2.tgz", "integrity": "sha512-k41FwbcLnlgnFh69f4qdUfvDQ+5vaSDnVPFI/y5XuhKRq97EnVVneO9F1ESVCdiVu4fCS2L8usX3mU331hB7pg==", "dev": true }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true + }, "parse-entities": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", @@ -5694,6 +6176,40 @@ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", "dev": true }, + "patch-package": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-8.0.0.tgz", + "integrity": "sha512-da8BVIhzjtgScwDJ2TtKsfT5JFWz1hYoBl9rUQ1f38MC2HwnEIkK8VN3dKMKcP7P7bvvgzNDbfNHtx3MsQb5vA==", + "dev": true, + "requires": { + "@yarnpkg/lockfile": "^1.1.0", + "chalk": "^4.1.2", + "ci-info": "^3.7.0", + "cross-spawn": "^7.0.3", + "find-yarn-workspace-root": "^2.0.0", + "fs-extra": "^9.0.0", + "json-stable-stringify": "^1.0.2", + "klaw-sync": "^6.0.0", + "minimist": "^1.2.6", + "open": "^7.4.2", + "rimraf": "^2.6.3", + "semver": "^7.5.3", + "slash": "^2.0.0", + "tmp": "^0.0.33", + "yaml": "^2.2.2" + }, + "dependencies": { + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -5998,6 +6514,26 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + } + } + }, "set-getter": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.1.tgz", @@ -6045,6 +6581,12 @@ "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true }, + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -6211,6 +6753,15 @@ "inline-style-parser": "0.1.1" } }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, "supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -6239,6 +6790,15 @@ "xtend": "~4.0.1" } }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, "to-object-path": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", @@ -6412,6 +6972,12 @@ "unist-util-is": "^4.0.0" } }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true + }, "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", @@ -6577,6 +7143,18 @@ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", "dev": true }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "yaml": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.2.tgz", + "integrity": "sha512-N/lyzTPaJasoDmfV7YTrYCI0G/3ivm/9wdG0aHuheKowWQwGTsK0Eoiw6utmzAnI6pkJa0DUVygvp3spqqEKXg==", + "dev": true + }, "ylru": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/ylru/-/ylru-1.3.2.tgz", diff --git a/package.json b/package.json index 7e38622..43dd52e 100644 --- a/package.json +++ b/package.json @@ -21,10 +21,11 @@ ], "scripts": { "clean": "rimraf .greenwood public .vercel", - "dev": "greenwood develop", - "build": "greenwood build", - "serve": "npm run clean && npm run build && greenwood serve", - "start": "npm run serve" + "dev": "node --experimental-loader ./node_modules/@greenwood/cli/src/loader.js ./node_modules/.bin/greenwood develop", + "build": "node --experimental-loader ./node_modules/@greenwood/cli/src/loader.js ./node_modules/.bin/greenwood build", + "serve": "npm run clean && npm run build && node --experimental-loader ./node_modules/@greenwood/cli/src/loader.js ./node_modules/.bin/greenwood serve", + "start": "npm run serve", + "postinstall": "patch-package" }, "dependencies": { "htmx.org": "^1.9.4" @@ -32,6 +33,7 @@ "devDependencies": { "@greenwood/cli": "~0.29.0-alpha.4", "@greenwood/plugin-adapter-vercel": "~0.29.0-alpha.4", + "patch-package": "^8.0.0", "rimraf": "^5.0.1" } } diff --git a/patches/@greenwood+cli+0.29.0-alpha.3.patch b/patches/@greenwood+cli+0.29.0-alpha.3.patch new file mode 100644 index 0000000..a468450 --- /dev/null +++ b/patches/@greenwood+cli+0.29.0-alpha.3.patch @@ -0,0 +1,126 @@ +diff --git a/node_modules/@greenwood/cli/src/config/rollup.config.js b/node_modules/@greenwood/cli/src/config/rollup.config.js +index df59ef6..07f3e0d 100644 +--- a/node_modules/@greenwood/cli/src/config/rollup.config.js ++++ b/node_modules/@greenwood/cli/src/config/rollup.config.js +@@ -155,6 +155,7 @@ function greenwoodPatchSsrPagesEntryPointRuntimeImport() { + } + + const getRollupConfigForScriptResources = async (compilation) => { ++ console.log('##### getRollupConfigForScriptResources'); + const { outputDir } = compilation.context; + const input = [...compilation.resources.values()] + .filter(resource => resource.type === 'script') +@@ -212,9 +213,15 @@ const getRollupConfigForScriptResources = async (compilation) => { + }; + + const getRollupConfigForApis = async (compilation) => { ++ console.log('##### getRollupConfigForApis'); + const { outputDir, userWorkspace } = compilation.context; + const input = [...compilation.manifest.apis.values()] + .map(api => normalizePathnameForWindows(new URL(`.${api.path}`, userWorkspace))); ++ const customRollupPlugins = compilation.config.plugins.filter(plugin => { ++ return plugin.type === 'rollup'; ++ }).map(plugin => { ++ return plugin.provider(compilation); ++ }).flat(); + + // TODO should routes and APIs have chunks? + // https://github.com/ProjectEvergreen/greenwood/issues/1118 +@@ -229,13 +236,20 @@ const getRollupConfigForApis = async (compilation) => { + greenwoodJsonLoader(), + nodeResolve(), + commonjs(), +- importMetaAssets() ++ importMetaAssets(), ++ ...customRollupPlugins, + ] + }]; + }; + + const getRollupConfigForSsr = async (compilation, input) => { ++ console.log('##### getRollupConfigForSsr'); + const { outputDir } = compilation.context; ++ const customRollupPlugins = compilation.config.plugins.filter(plugin => { ++ return plugin.type === 'rollup'; ++ }).map(plugin => { ++ return plugin.provider(compilation); ++ }).flat(); + + // TODO should routes and APIs have chunks? + // https://github.com/ProjectEvergreen/greenwood/issues/1118 +@@ -247,6 +261,8 @@ const getRollupConfigForSsr = async (compilation, input) => { + chunkFileNames: '[name].[hash].js' + }, + plugins: [ ++ // greenwoodJsonLoader(), ++ // greenwoodResourceLoader(compilation), + greenwoodJsonLoader(), + // TODO let this through for lit to enable nodeResolve({ preferBuiltins: true }) + // https://github.com/lit/lit/issues/449 +@@ -255,6 +271,7 @@ const getRollupConfigForSsr = async (compilation, input) => { + preferBuiltins: true + }), + commonjs(), ++ ...customRollupPlugins, + importMetaAssets(), + greenwoodPatchSsrPagesEntryPointRuntimeImport() // TODO a little hacky but works for now + ], +diff --git a/node_modules/@greenwood/cli/src/loader.js b/node_modules/@greenwood/cli/src/loader.js +index 7955b24..856902e 100644 +--- a/node_modules/@greenwood/cli/src/loader.js ++++ b/node_modules/@greenwood/cli/src/loader.js +@@ -46,7 +46,12 @@ async function getCustomLoaderResponse(url, body = '', checkOnly = false) { + // https://nodejs.org/docs/latest-v18.x/api/esm.html#resolvespecifier-context-nextresolve + export async function resolve(specifier, context, defaultResolve) { + const { parentURL } = context; +- const { shouldHandle } = await getCustomLoaderResponse(new URL(specifier), null, true); ++ console.log({ specifier, context, parentURL }) ++ const x = specifier.startsWith('file://') ++ ? new URL(specifier) ++ : new URL(specifier, parentURL); ++ console.log({ x }); ++ const { shouldHandle } = await getCustomLoaderResponse(x, null, true); + + if (shouldHandle) { + return { +@@ -60,22 +65,26 @@ export async function resolve(specifier, context, defaultResolve) { + + // https://nodejs.org/docs/latest-v18.x/api/esm.html#loadurl-context-nextload + export async function load(source, context, defaultLoad) { +- const extension = source.split('.').pop(); +- const url = new URL('', `${source}?type=${extension}`); +- const { shouldHandle } = await getCustomLoaderResponse(url, null, true); ++ console.log('LOAD', { source, context }); ++ if (source.startsWith('file://')) { ++ const extension = source.split('.').pop(); ++ const url = new URL(`${source}?type=${extension}`); ++ const { shouldHandle } = await getCustomLoaderResponse(url, null, true); + +- if (shouldHandle) { +- const contents = await fs.readFile(new URL(source), 'utf-8'); +- const { response } = await getCustomLoaderResponse(url, contents); +- const body = await response.text(); ++ console.log('should handle?????', shouldHandle); ++ if (shouldHandle) { ++ const contents = await fs.readFile(new URL(source), 'utf-8'); ++ const { response } = await getCustomLoaderResponse(url, contents); ++ const body = await response.text(); + +- // TODO better way to handle remove export default? leverage import assertions instead +- // https://github.com/ProjectEvergreen/greenwood/issues/923 +- return { +- format: extension === 'json' ? 'json' : 'module', +- source: extension === 'json' ? JSON.stringify(JSON.parse(contents.replace('export default ', ''))) : body, +- shortCircuit: true +- }; ++ // TODO better way to handle remove export default? leverage import assertions instead ++ // https://github.com/ProjectEvergreen/greenwood/issues/923 ++ return { ++ format: extension === 'json' ? 'json' : 'module', ++ source: extension === 'json' ? JSON.stringify(JSON.parse(contents.replace('export default ', ''))) : body, ++ shortCircuit: true ++ }; ++ } + } + + return defaultLoad(source, context, defaultLoad); diff --git a/patches/@web+rollup-plugin-import-meta-assets+1.0.8.patch b/patches/@web+rollup-plugin-import-meta-assets+1.0.8.patch new file mode 100644 index 0000000..d0c20e9 --- /dev/null +++ b/patches/@web+rollup-plugin-import-meta-assets+1.0.8.patch @@ -0,0 +1,19 @@ +diff --git a/node_modules/@web/rollup-plugin-import-meta-assets/src/rollup-plugin-import-meta-assets.js b/node_modules/@web/rollup-plugin-import-meta-assets/src/rollup-plugin-import-meta-assets.js +index 1d0280c..706488a 100644 +--- a/node_modules/@web/rollup-plugin-import-meta-assets/src/rollup-plugin-import-meta-assets.js ++++ b/node_modules/@web/rollup-plugin-import-meta-assets/src/rollup-plugin-import-meta-assets.js +@@ -58,10 +58,13 @@ function importMetaAssets({ include, exclude, warnOnError, transform } = {}) { + name: 'rollup-plugin-import-meta-assets', + + async transform(code, id) { +- if (!filter(id)) { ++ console.log({ id, code }); ++ if (!filter(id) || !id.endsWith('.js')) { + return null; + } + ++ console.log('here!?!!?!?!'); ++ + const ast = this.parse(code); + const magicString = new MagicString(code); + let modifiedCode = false; diff --git a/src/components/card.css b/src/components/card.css new file mode 100644 index 0000000..db18c7c --- /dev/null +++ b/src/components/card.css @@ -0,0 +1,44 @@ +div { + display: flex; + flex-direction: column; + align-items: center; + gap: 0.5rem; + border: 1px solid #818181; + width: fit-content; + border-radius: 10px; + padding: 2rem 1rem; + height: 680px; + justify-content: space-between; + background-color: #fff; + overflow-x: hidden; +} + +button { + background: var(--color-accent); + color: var(--color-white); + padding: 1rem 2rem; + border: 0; + font-size: 1rem; + border-radius: 5px; + cursor: pointer; +} + +img { + max-width: 500px; + min-width: 500px; + width: 100%; +} + +h3 { + font-size: 1.85rem; +} + +@media(max-width: 768px) { + img { + max-width: 300px; + min-width: 300px; + } + div { + height: 500px; + } +} \ No newline at end of file diff --git a/src/components/card.js b/src/components/card.js index f27b1a3..faf3e72 100644 --- a/src/components/card.js +++ b/src/components/card.js @@ -1,3 +1,5 @@ +import styles from './card.css'; + export default class Card extends HTMLElement { selectItem() { @@ -12,47 +14,7 @@ export default class Card extends HTMLElement { template.innerHTML = `

${title}

@@ -66,4 +28,4 @@ export default class Card extends HTMLElement { } } -customElements.define('app-card', Card); +customElements.define('app-card', Card); \ No newline at end of file From c7bad8546d8e10e5e017a2e747ac1d771a2a153d Mon Sep 17 00:00:00 2001 From: Owen Buckley Date: Fri, 1 Sep 2023 08:54:33 -0400 Subject: [PATCH 2/8] latest patch --- patches/@greenwood+cli+0.29.0-alpha.3.patch | 57 +++++++++++++++---- ...llup-plugin-import-meta-assets+1.0.8.patch | 10 ++-- 2 files changed, 50 insertions(+), 17 deletions(-) diff --git a/patches/@greenwood+cli+0.29.0-alpha.3.patch b/patches/@greenwood+cli+0.29.0-alpha.3.patch index a468450..1b99678 100644 --- a/patches/@greenwood+cli+0.29.0-alpha.3.patch +++ b/patches/@greenwood+cli+0.29.0-alpha.3.patch @@ -1,8 +1,35 @@ diff --git a/node_modules/@greenwood/cli/src/config/rollup.config.js b/node_modules/@greenwood/cli/src/config/rollup.config.js -index df59ef6..07f3e0d 100644 +index df59ef6..9eedbc8 100644 --- a/node_modules/@greenwood/cli/src/config/rollup.config.js +++ b/node_modules/@greenwood/cli/src/config/rollup.config.js -@@ -155,6 +155,7 @@ function greenwoodPatchSsrPagesEntryPointRuntimeImport() { +@@ -10,10 +10,14 @@ function greenwoodJsonLoader() { + return { + name: 'greenwood-json-loader', + async load(id) { +- const extension = id.split('.').pop(); ++ console.log({ id }); ++ const extension = id.split('.').pop().replace('?commonjs-proxy', ''); ++ console.log({ extension }); + + if (extension === 'json') { +- const url = new URL(`file://${id}`); ++ console.log('GO! ---> ', id.replace('?commonjs-proxy', '')); ++ const url = new URL(`file://${id.replace('?commonjs-proxy', '').replace('\x00', '')}`); ++ console.log({ url }); + const json = JSON.parse(await fs.readFile(url, 'utf-8')); + const contents = `export default ${JSON.stringify(json)}`; + +@@ -50,7 +54,8 @@ function greenwoodResourceLoader (compilation) { + const extension = pathname.split('.').pop(); + + if (extension !== '' && extension !== 'js') { +- const url = new URL(`file://${pathname}?type=${extension}`); ++ console.log({ extension, pathname }) ++ const url = new URL(`file://${pathname.replace('\x00', '')}?type=${extension}`); + const request = new Request(url.href); + let response = new Response(''); + +@@ -155,6 +160,7 @@ function greenwoodPatchSsrPagesEntryPointRuntimeImport() { } const getRollupConfigForScriptResources = async (compilation) => { @@ -10,7 +37,7 @@ index df59ef6..07f3e0d 100644 const { outputDir } = compilation.context; const input = [...compilation.resources.values()] .filter(resource => resource.type === 'script') -@@ -212,9 +213,15 @@ const getRollupConfigForScriptResources = async (compilation) => { +@@ -212,9 +218,15 @@ const getRollupConfigForScriptResources = async (compilation) => { }; const getRollupConfigForApis = async (compilation) => { @@ -23,10 +50,10 @@ index df59ef6..07f3e0d 100644 + }).map(plugin => { + return plugin.provider(compilation); + }).flat(); - + // TODO should routes and APIs have chunks? // https://github.com/ProjectEvergreen/greenwood/issues/1118 -@@ -229,13 +236,20 @@ const getRollupConfigForApis = async (compilation) => { +@@ -229,13 +241,22 @@ const getRollupConfigForApis = async (compilation) => { greenwoodJsonLoader(), nodeResolve(), commonjs(), @@ -45,26 +72,32 @@ index df59ef6..07f3e0d 100644 + }).map(plugin => { + return plugin.provider(compilation); + }).flat(); ++ ++ console.log({ customRollupPlugins }); // TODO should routes and APIs have chunks? // https://github.com/ProjectEvergreen/greenwood/issues/1118 -@@ -247,6 +261,8 @@ const getRollupConfigForSsr = async (compilation, input) => { - chunkFileNames: '[name].[hash].js' +@@ -248,6 +269,7 @@ const getRollupConfigForSsr = async (compilation, input) => { }, plugins: [ -+ // greenwoodJsonLoader(), -+ // greenwoodResourceLoader(compilation), greenwoodJsonLoader(), ++ greenwoodResourceLoader(compilation), // TODO let this through for lit to enable nodeResolve({ preferBuiltins: true }) // https://github.com/lit/lit/issues/449 -@@ -255,6 +271,7 @@ const getRollupConfigForSsr = async (compilation, input) => { + // https://github.com/ProjectEvergreen/greenwood/issues/1118 +@@ -255,7 +277,11 @@ const getRollupConfigForSsr = async (compilation, input) => { preferBuiltins: true }), commonjs(), -+ ...customRollupPlugins, - importMetaAssets(), +- importMetaAssets(), ++ importMetaAssets({ ++ // include: ['*.js'], ++ // exclude: ['*.css', '*.json'], ++ }), ++ // ...customRollupPlugins, greenwoodPatchSsrPagesEntryPointRuntimeImport() // TODO a little hacky but works for now ], + onwarn: (errorObj) => { diff --git a/node_modules/@greenwood/cli/src/loader.js b/node_modules/@greenwood/cli/src/loader.js index 7955b24..856902e 100644 --- a/node_modules/@greenwood/cli/src/loader.js diff --git a/patches/@web+rollup-plugin-import-meta-assets+1.0.8.patch b/patches/@web+rollup-plugin-import-meta-assets+1.0.8.patch index d0c20e9..e971ae6 100644 --- a/patches/@web+rollup-plugin-import-meta-assets+1.0.8.patch +++ b/patches/@web+rollup-plugin-import-meta-assets+1.0.8.patch @@ -1,14 +1,14 @@ diff --git a/node_modules/@web/rollup-plugin-import-meta-assets/src/rollup-plugin-import-meta-assets.js b/node_modules/@web/rollup-plugin-import-meta-assets/src/rollup-plugin-import-meta-assets.js -index 1d0280c..706488a 100644 +index 1d0280c..f4aeb21 100644 --- a/node_modules/@web/rollup-plugin-import-meta-assets/src/rollup-plugin-import-meta-assets.js +++ b/node_modules/@web/rollup-plugin-import-meta-assets/src/rollup-plugin-import-meta-assets.js -@@ -58,10 +58,13 @@ function importMetaAssets({ include, exclude, warnOnError, transform } = {}) { +@@ -58,10 +58,14 @@ function importMetaAssets({ include, exclude, warnOnError, transform } = {}) { name: 'rollup-plugin-import-meta-assets', async transform(code, id) { -- if (!filter(id)) { -+ console.log({ id, code }); -+ if (!filter(id) || !id.endsWith('.js')) { ++ console.log({ id }); + if (!filter(id)) { ++ console.log('NULL @@@@@', { code }); return null; } From 70d030ce74e0877873f44b1e546a2dea70114059 Mon Sep 17 00:00:00 2001 From: Owen Buckley Date: Wed, 6 Sep 2023 20:53:03 -0400 Subject: [PATCH 3/8] it works --- patches/@greenwood+cli+0.29.0-alpha.3.patch | 48 +++++++++---------- ...llup-plugin-import-meta-assets+1.0.8.patch | 47 ++++++++++++++++-- 2 files changed, 67 insertions(+), 28 deletions(-) diff --git a/patches/@greenwood+cli+0.29.0-alpha.3.patch b/patches/@greenwood+cli+0.29.0-alpha.3.patch index 1b99678..4c0134b 100644 --- a/patches/@greenwood+cli+0.29.0-alpha.3.patch +++ b/patches/@greenwood+cli+0.29.0-alpha.3.patch @@ -1,5 +1,5 @@ diff --git a/node_modules/@greenwood/cli/src/config/rollup.config.js b/node_modules/@greenwood/cli/src/config/rollup.config.js -index df59ef6..9eedbc8 100644 +index df59ef6..5ea6ef5 100644 --- a/node_modules/@greenwood/cli/src/config/rollup.config.js +++ b/node_modules/@greenwood/cli/src/config/rollup.config.js @@ -10,10 +10,14 @@ function greenwoodJsonLoader() { @@ -37,7 +37,7 @@ index df59ef6..9eedbc8 100644 const { outputDir } = compilation.context; const input = [...compilation.resources.values()] .filter(resource => resource.type === 'script') -@@ -212,9 +218,15 @@ const getRollupConfigForScriptResources = async (compilation) => { +@@ -212,10 +218,20 @@ const getRollupConfigForScriptResources = async (compilation) => { }; const getRollupConfigForApis = async (compilation) => { @@ -45,21 +45,34 @@ index df59ef6..9eedbc8 100644 const { outputDir, userWorkspace } = compilation.context; const input = [...compilation.manifest.apis.values()] .map(api => normalizePathnameForWindows(new URL(`.${api.path}`, userWorkspace))); +- + const customRollupPlugins = compilation.config.plugins.filter(plugin => { + return plugin.type === 'rollup'; + }).map(plugin => { + return plugin.provider(compilation); + }).flat(); - ++ ++ // TODO why is this needed? ++ await fs.mkdir(new URL('./api/assets/', outputDir), { ++ recursive: true ++ }); // TODO should routes and APIs have chunks? // https://github.com/ProjectEvergreen/greenwood/issues/1118 -@@ -229,13 +241,22 @@ const getRollupConfigForApis = async (compilation) => { + return [{ +@@ -225,17 +241,29 @@ const getRollupConfigForApis = async (compilation) => { + entryFileNames: '[name].js', + chunkFileNames: '[name].[hash].js' + }, ++ // TODO should these plugins match across all configurations? ++ // TODO sync with SSR config + plugins: [ greenwoodJsonLoader(), ++ greenwoodResourceLoader(compilation), nodeResolve(), commonjs(), - importMetaAssets() + importMetaAssets(), -+ ...customRollupPlugins, ++ // TODO ??? ...customRollupPlugins, ] }]; }; @@ -77,7 +90,7 @@ index df59ef6..9eedbc8 100644 // TODO should routes and APIs have chunks? // https://github.com/ProjectEvergreen/greenwood/issues/1118 -@@ -248,6 +269,7 @@ const getRollupConfigForSsr = async (compilation, input) => { +@@ -248,6 +276,7 @@ const getRollupConfigForSsr = async (compilation, input) => { }, plugins: [ greenwoodJsonLoader(), @@ -85,21 +98,8 @@ index df59ef6..9eedbc8 100644 // TODO let this through for lit to enable nodeResolve({ preferBuiltins: true }) // https://github.com/lit/lit/issues/449 // https://github.com/ProjectEvergreen/greenwood/issues/1118 -@@ -255,7 +277,11 @@ const getRollupConfigForSsr = async (compilation, input) => { - preferBuiltins: true - }), - commonjs(), -- importMetaAssets(), -+ importMetaAssets({ -+ // include: ['*.js'], -+ // exclude: ['*.css', '*.json'], -+ }), -+ // ...customRollupPlugins, - greenwoodPatchSsrPagesEntryPointRuntimeImport() // TODO a little hacky but works for now - ], - onwarn: (errorObj) => { diff --git a/node_modules/@greenwood/cli/src/loader.js b/node_modules/@greenwood/cli/src/loader.js -index 7955b24..856902e 100644 +index 7955b24..964ab71 100644 --- a/node_modules/@greenwood/cli/src/loader.js +++ b/node_modules/@greenwood/cli/src/loader.js @@ -46,7 +46,12 @@ async function getCustomLoaderResponse(url, body = '', checkOnly = false) { @@ -107,11 +107,11 @@ index 7955b24..856902e 100644 export async function resolve(specifier, context, defaultResolve) { const { parentURL } = context; - const { shouldHandle } = await getCustomLoaderResponse(new URL(specifier), null, true); -+ console.log({ specifier, context, parentURL }) ++ // console.log({ specifier, context, parentURL }) + const x = specifier.startsWith('file://') + ? new URL(specifier) + : new URL(specifier, parentURL); -+ console.log({ x }); ++ // console.log({ x }); + const { shouldHandle } = await getCustomLoaderResponse(x, null, true); if (shouldHandle) { @@ -123,7 +123,7 @@ index 7955b24..856902e 100644 - const extension = source.split('.').pop(); - const url = new URL('', `${source}?type=${extension}`); - const { shouldHandle } = await getCustomLoaderResponse(url, null, true); -+ console.log('LOAD', { source, context }); ++ // console.log('LOAD', { source, context }); + if (source.startsWith('file://')) { + const extension = source.split('.').pop(); + const url = new URL(`${source}?type=${extension}`); @@ -133,7 +133,7 @@ index 7955b24..856902e 100644 - const contents = await fs.readFile(new URL(source), 'utf-8'); - const { response } = await getCustomLoaderResponse(url, contents); - const body = await response.text(); -+ console.log('should handle?????', shouldHandle); ++ // console.log('should handle?????', shouldHandle); + if (shouldHandle) { + const contents = await fs.readFile(new URL(source), 'utf-8'); + const { response } = await getCustomLoaderResponse(url, contents); diff --git a/patches/@web+rollup-plugin-import-meta-assets+1.0.8.patch b/patches/@web+rollup-plugin-import-meta-assets+1.0.8.patch index e971ae6..0ae2c18 100644 --- a/patches/@web+rollup-plugin-import-meta-assets+1.0.8.patch +++ b/patches/@web+rollup-plugin-import-meta-assets+1.0.8.patch @@ -1,19 +1,58 @@ diff --git a/node_modules/@web/rollup-plugin-import-meta-assets/src/rollup-plugin-import-meta-assets.js b/node_modules/@web/rollup-plugin-import-meta-assets/src/rollup-plugin-import-meta-assets.js -index 1d0280c..f4aeb21 100644 +index 1d0280c..1d2e461 100644 --- a/node_modules/@web/rollup-plugin-import-meta-assets/src/rollup-plugin-import-meta-assets.js +++ b/node_modules/@web/rollup-plugin-import-meta-assets/src/rollup-plugin-import-meta-assets.js -@@ -58,10 +58,14 @@ function importMetaAssets({ include, exclude, warnOnError, transform } = {}) { +@@ -58,10 +58,13 @@ function importMetaAssets({ include, exclude, warnOnError, transform } = {}) { name: 'rollup-plugin-import-meta-assets', async transform(code, id) { + console.log({ id }); if (!filter(id)) { -+ console.log('NULL @@@@@', { code }); return null; } -+ console.log('here!?!!?!?!'); ++ console.log('here!?!!?!?!', { id }); + const ast = this.parse(code); const magicString = new MagicString(code); let modifiedCode = false; +@@ -74,6 +77,7 @@ function importMetaAssets({ include, exclude, warnOnError, transform } = {}) { + const absoluteAssetPath = path.resolve(absoluteScriptDir, relativeAssetPath); + const assetName = path.basename(absoluteAssetPath); + ++ console.log({ absoluteAssetPath, absoluteScriptDir, relativeAssetPath }); + try { + const assetContents = await fs.promises.readFile(absoluteAssetPath); + const transformedAssetContents = +@@ -83,11 +87,20 @@ function importMetaAssets({ include, exclude, warnOnError, transform } = {}) { + if (transformedAssetContents === null) { + return; + } ++ // https://github.com/rollup/rollup/blob/v2.79.1/docs/05-plugin-development.md#thisemitfile + const ref = this.emitFile({ +- type: 'asset', ++ type: 'chunk', ++ id: absoluteAssetPath, ++ // preserveSignature: 'strict' + name: assetName, +- source: transformedAssetContents, ++ // source: transformedAssetContents, + }); ++ // const ref = this.emitFile({ ++ // type: 'asset', ++ // name: assetName, ++ // source: transformedAssetContents, ++ // }); ++ console.log({ ref }); + magicString.overwrite( + node.arguments[0].start, + node.arguments[0].end, +@@ -105,6 +118,8 @@ function importMetaAssets({ include, exclude, warnOnError, transform } = {}) { + }, + }); + ++ console.log('((((((((((((((((('); ++ + return { + code: magicString.toString(), + map: modifiedCode ? magicString.generateMap({ hires: true }) : null, From 7f0d2fc534cbf07ac92179dfde75e5e5f16e8f09 Mon Sep 17 00:00:00 2001 From: Owen Buckley Date: Wed, 6 Sep 2023 21:17:27 -0400 Subject: [PATCH 4/8] restore import-css plugin --- package-lock.json | 16 ++++++++++++++++ package.json | 1 + 2 files changed, 17 insertions(+) diff --git a/package-lock.json b/package-lock.json index 11e9641..e5c4b13 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "devDependencies": { "@greenwood/cli": "~0.29.0-alpha.4", "@greenwood/plugin-adapter-vercel": "~0.29.0-alpha.4", + "@greenwood/plugin-import-css": "~0.29.0-alpha.4", "patch-package": "^8.0.0", "rimraf": "^5.0.1" } @@ -66,6 +67,15 @@ "@greenwood/cli": "^0.28.0" } }, + "node_modules/@greenwood/plugin-import-css": { + "version": "0.29.0-alpha.4", + "resolved": "https://registry.npmjs.org/@greenwood/plugin-import-css/-/plugin-import-css-0.29.0-alpha.4.tgz", + "integrity": "sha512-W7wy/090JAa+6MdjcbUiP+rbZJQz5VsmrsKcvAcmmbObimlG/eDtGWsUv5EKC7ahrha4DeV56uPhErGeNtuMMA==", + "dev": true, + "peerDependencies": { + "@greenwood/cli": "^0.4.0" + } + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -4148,6 +4158,12 @@ "integrity": "sha512-ru86tXEUO5jB3Slfv+3Tk1T0keHWUOZsDTKlfUIX2/pfqsSKQG2Yd2iDSARBgUlE/JUKFjjmNCpCWgcGcTQsVg==", "dev": true }, + "@greenwood/plugin-import-css": { + "version": "0.29.0-alpha.4", + "resolved": "https://registry.npmjs.org/@greenwood/plugin-import-css/-/plugin-import-css-0.29.0-alpha.4.tgz", + "integrity": "sha512-W7wy/090JAa+6MdjcbUiP+rbZJQz5VsmrsKcvAcmmbObimlG/eDtGWsUv5EKC7ahrha4DeV56uPhErGeNtuMMA==", + "dev": true + }, "@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", diff --git a/package.json b/package.json index 43dd52e..18d662c 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "devDependencies": { "@greenwood/cli": "~0.29.0-alpha.4", "@greenwood/plugin-adapter-vercel": "~0.29.0-alpha.4", + "@greenwood/plugin-import-css": "~0.29.0-alpha.4", "patch-package": "^8.0.0", "rimraf": "^5.0.1" } From 69a7d534509ca71b11b7eaea47308d67bd51c55b Mon Sep 17 00:00:00 2001 From: Owen Buckley Date: Wed, 6 Sep 2023 21:17:49 -0400 Subject: [PATCH 5/8] remove extension from API route import meta assets --- patches/@web+rollup-plugin-import-meta-assets+1.0.8.patch | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/patches/@web+rollup-plugin-import-meta-assets+1.0.8.patch b/patches/@web+rollup-plugin-import-meta-assets+1.0.8.patch index 0ae2c18..5fee711 100644 --- a/patches/@web+rollup-plugin-import-meta-assets+1.0.8.patch +++ b/patches/@web+rollup-plugin-import-meta-assets+1.0.8.patch @@ -1,5 +1,5 @@ diff --git a/node_modules/@web/rollup-plugin-import-meta-assets/src/rollup-plugin-import-meta-assets.js b/node_modules/@web/rollup-plugin-import-meta-assets/src/rollup-plugin-import-meta-assets.js -index 1d0280c..1d2e461 100644 +index 1d0280c..93ce4a1 100644 --- a/node_modules/@web/rollup-plugin-import-meta-assets/src/rollup-plugin-import-meta-assets.js +++ b/node_modules/@web/rollup-plugin-import-meta-assets/src/rollup-plugin-import-meta-assets.js @@ -58,10 +58,13 @@ function importMetaAssets({ include, exclude, warnOnError, transform } = {}) { @@ -31,11 +31,12 @@ index 1d0280c..1d2e461 100644 + // https://github.com/rollup/rollup/blob/v2.79.1/docs/05-plugin-development.md#thisemitfile const ref = this.emitFile({ - type: 'asset', +- name: assetName, +- source: transformedAssetContents, + type: 'chunk', + id: absoluteAssetPath, + // preserveSignature: 'strict' - name: assetName, -- source: transformedAssetContents, ++ name: assetName.replace('.js', ''), + // source: transformedAssetContents, }); + // const ref = this.emitFile({ From 1de54a95c2800068328160c1398a76cf5715ebee Mon Sep 17 00:00:00 2001 From: Owen Buckley Date: Sat, 9 Sep 2023 18:03:30 -0400 Subject: [PATCH 6/8] latest patches and TODOs --- ...ch => @greenwood+cli+0.29.0-alpha.4.patch} | 68 ++++++++----------- ...llup-plugin-import-meta-assets+1.0.8.patch | 7 +- 2 files changed, 31 insertions(+), 44 deletions(-) rename patches/{@greenwood+cli+0.29.0-alpha.3.patch => @greenwood+cli+0.29.0-alpha.4.patch} (70%) diff --git a/patches/@greenwood+cli+0.29.0-alpha.3.patch b/patches/@greenwood+cli+0.29.0-alpha.4.patch similarity index 70% rename from patches/@greenwood+cli+0.29.0-alpha.3.patch rename to patches/@greenwood+cli+0.29.0-alpha.4.patch index 4c0134b..4947394 100644 --- a/patches/@greenwood+cli+0.29.0-alpha.3.patch +++ b/patches/@greenwood+cli+0.29.0-alpha.4.patch @@ -1,25 +1,28 @@ diff --git a/node_modules/@greenwood/cli/src/config/rollup.config.js b/node_modules/@greenwood/cli/src/config/rollup.config.js -index df59ef6..5ea6ef5 100644 +index df59ef6..36ae428 100644 --- a/node_modules/@greenwood/cli/src/config/rollup.config.js +++ b/node_modules/@greenwood/cli/src/config/rollup.config.js -@@ -10,10 +10,14 @@ function greenwoodJsonLoader() { +@@ -10,10 +10,17 @@ function greenwoodJsonLoader() { return { name: 'greenwood-json-loader', async load(id) { - const extension = id.split('.').pop(); + console.log({ id }); ++ // const extension = id.split('.').pop(); + const extension = id.split('.').pop().replace('?commonjs-proxy', ''); + console.log({ extension }); if (extension === 'json') { - const url = new URL(`file://${id}`); + console.log('GO! ---> ', id.replace('?commonjs-proxy', '')); ++ // https://github.com/rollup/rollup/issues/2121 + const url = new URL(`file://${id.replace('?commonjs-proxy', '').replace('\x00', '')}`); ++ // const url = new URL(`file://${id}`); + console.log({ url }); const json = JSON.parse(await fs.readFile(url, 'utf-8')); const contents = `export default ${JSON.stringify(json)}`; -@@ -50,7 +54,8 @@ function greenwoodResourceLoader (compilation) { +@@ -50,7 +57,8 @@ function greenwoodResourceLoader (compilation) { const extension = pathname.split('.').pop(); if (extension !== '' && extension !== 'js') { @@ -29,7 +32,7 @@ index df59ef6..5ea6ef5 100644 const request = new Request(url.href); let response = new Response(''); -@@ -155,6 +160,7 @@ function greenwoodPatchSsrPagesEntryPointRuntimeImport() { +@@ -155,6 +163,7 @@ function greenwoodPatchSsrPagesEntryPointRuntimeImport() { } const getRollupConfigForScriptResources = async (compilation) => { @@ -37,7 +40,7 @@ index df59ef6..5ea6ef5 100644 const { outputDir } = compilation.context; const input = [...compilation.resources.values()] .filter(resource => resource.type === 'script') -@@ -212,10 +218,20 @@ const getRollupConfigForScriptResources = async (compilation) => { +@@ -212,10 +221,20 @@ const getRollupConfigForScriptResources = async (compilation) => { }; const getRollupConfigForApis = async (compilation) => { @@ -59,7 +62,7 @@ index df59ef6..5ea6ef5 100644 // TODO should routes and APIs have chunks? // https://github.com/ProjectEvergreen/greenwood/issues/1118 return [{ -@@ -225,17 +241,29 @@ const getRollupConfigForApis = async (compilation) => { +@@ -225,17 +244,29 @@ const getRollupConfigForApis = async (compilation) => { entryFileNames: '[name].js', chunkFileNames: '[name].[hash].js' }, @@ -90,7 +93,7 @@ index df59ef6..5ea6ef5 100644 // TODO should routes and APIs have chunks? // https://github.com/ProjectEvergreen/greenwood/issues/1118 -@@ -248,6 +276,7 @@ const getRollupConfigForSsr = async (compilation, input) => { +@@ -248,6 +279,7 @@ const getRollupConfigForSsr = async (compilation, input) => { }, plugins: [ greenwoodJsonLoader(), @@ -99,7 +102,7 @@ index df59ef6..5ea6ef5 100644 // https://github.com/lit/lit/issues/449 // https://github.com/ProjectEvergreen/greenwood/issues/1118 diff --git a/node_modules/@greenwood/cli/src/loader.js b/node_modules/@greenwood/cli/src/loader.js -index 7955b24..964ab71 100644 +index 7955b24..57f3464 100644 --- a/node_modules/@greenwood/cli/src/loader.js +++ b/node_modules/@greenwood/cli/src/loader.js @@ -46,7 +46,12 @@ async function getCustomLoaderResponse(url, body = '', checkOnly = false) { @@ -116,44 +119,27 @@ index 7955b24..964ab71 100644 if (shouldHandle) { return { -@@ -60,22 +65,26 @@ export async function resolve(specifier, context, defaultResolve) { +@@ -60,10 +65,13 @@ export async function resolve(specifier, context, defaultResolve) { // https://nodejs.org/docs/latest-v18.x/api/esm.html#loadurl-context-nextload export async function load(source, context, defaultLoad) { -- const extension = source.split('.').pop(); -- const url = new URL('', `${source}?type=${extension}`); -- const { shouldHandle } = await getCustomLoaderResponse(url, null, true); + // console.log('LOAD', { source, context }); -+ if (source.startsWith('file://')) { -+ const extension = source.split('.').pop(); -+ const url = new URL(`${source}?type=${extension}`); -+ const { shouldHandle } = await getCustomLoaderResponse(url, null, true); - -- if (shouldHandle) { -- const contents = await fs.readFile(new URL(source), 'utf-8'); -- const { response } = await getCustomLoaderResponse(url, contents); -- const body = await response.text(); -+ // console.log('should handle?????', shouldHandle); -+ if (shouldHandle) { -+ const contents = await fs.readFile(new URL(source), 'utf-8'); -+ const { response } = await getCustomLoaderResponse(url, contents); -+ const body = await response.text(); ++ // if (source.startsWith('file://')) { + const extension = source.split('.').pop(); +- const url = new URL('', `${source}?type=${extension}`); ++ const url = new URL(`${source}?type=${extension}`); + const { shouldHandle } = await getCustomLoaderResponse(url, null, true); -- // TODO better way to handle remove export default? leverage import assertions instead -- // https://github.com/ProjectEvergreen/greenwood/issues/923 -- return { -- format: extension === 'json' ? 'json' : 'module', -- source: extension === 'json' ? JSON.stringify(JSON.parse(contents.replace('export default ', ''))) : body, -- shortCircuit: true -- }; -+ // TODO better way to handle remove export default? leverage import assertions instead -+ // https://github.com/ProjectEvergreen/greenwood/issues/923 -+ return { -+ format: extension === 'json' ? 'json' : 'module', -+ source: extension === 'json' ? JSON.stringify(JSON.parse(contents.replace('export default ', ''))) : body, -+ shortCircuit: true -+ }; -+ } ++ // console.log('should handle?????', shouldHandle); + if (shouldHandle) { + const contents = await fs.readFile(new URL(source), 'utf-8'); + const { response } = await getCustomLoaderResponse(url, contents); +@@ -77,6 +85,7 @@ export async function load(source, context, defaultLoad) { + shortCircuit: true + }; } ++ // } return defaultLoad(source, context, defaultLoad); + } +\ No newline at end of file diff --git a/patches/@web+rollup-plugin-import-meta-assets+1.0.8.patch b/patches/@web+rollup-plugin-import-meta-assets+1.0.8.patch index 5fee711..0180ec6 100644 --- a/patches/@web+rollup-plugin-import-meta-assets+1.0.8.patch +++ b/patches/@web+rollup-plugin-import-meta-assets+1.0.8.patch @@ -1,5 +1,5 @@ diff --git a/node_modules/@web/rollup-plugin-import-meta-assets/src/rollup-plugin-import-meta-assets.js b/node_modules/@web/rollup-plugin-import-meta-assets/src/rollup-plugin-import-meta-assets.js -index 1d0280c..93ce4a1 100644 +index 1d0280c..5b623e1 100644 --- a/node_modules/@web/rollup-plugin-import-meta-assets/src/rollup-plugin-import-meta-assets.js +++ b/node_modules/@web/rollup-plugin-import-meta-assets/src/rollup-plugin-import-meta-assets.js @@ -58,10 +58,13 @@ function importMetaAssets({ include, exclude, warnOnError, transform } = {}) { @@ -24,11 +24,12 @@ index 1d0280c..93ce4a1 100644 try { const assetContents = await fs.promises.readFile(absoluteAssetPath); const transformedAssetContents = -@@ -83,11 +87,20 @@ function importMetaAssets({ include, exclude, warnOnError, transform } = {}) { +@@ -83,11 +87,21 @@ function importMetaAssets({ include, exclude, warnOnError, transform } = {}) { if (transformedAssetContents === null) { return; } + // https://github.com/rollup/rollup/blob/v2.79.1/docs/05-plugin-development.md#thisemitfile ++ // TODO chunk (.js) vs asset (not .js)? const ref = this.emitFile({ - type: 'asset', - name: assetName, @@ -48,7 +49,7 @@ index 1d0280c..93ce4a1 100644 magicString.overwrite( node.arguments[0].start, node.arguments[0].end, -@@ -105,6 +118,8 @@ function importMetaAssets({ include, exclude, warnOnError, transform } = {}) { +@@ -105,6 +119,8 @@ function importMetaAssets({ include, exclude, warnOnError, transform } = {}) { }, }); From b0fe7188c31c135df8a9ac289ce77f210dd8092e Mon Sep 17 00:00:00 2001 From: Owen Buckley Date: Fri, 13 Oct 2023 21:21:57 -0400 Subject: [PATCH 7/8] upgrade alpha.5 --- package-lock.json | 138 +++-------------- package.json | 10 +- patches/@greenwood+cli+0.29.0-alpha.4.patch | 145 ------------------ ...llup-plugin-import-meta-assets+1.0.8.patch | 60 -------- 4 files changed, 25 insertions(+), 328 deletions(-) delete mode 100644 patches/@greenwood+cli+0.29.0-alpha.4.patch delete mode 100644 patches/@web+rollup-plugin-import-meta-assets+1.0.8.patch diff --git a/package-lock.json b/package-lock.json index e5c4b13..e18de9b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,30 +7,28 @@ "": { "name": "greenwood-htmx", "version": "1.0.0", - "hasInstallScript": true, "license": "ISC", "dependencies": { "htmx.org": "^1.9.4" }, "devDependencies": { - "@greenwood/cli": "~0.29.0-alpha.4", - "@greenwood/plugin-adapter-vercel": "~0.29.0-alpha.4", - "@greenwood/plugin-import-css": "~0.29.0-alpha.4", + "@greenwood/cli": "~0.29.0-alpha.5", + "@greenwood/plugin-adapter-vercel": "~0.29.0-alpha.5", + "@greenwood/plugin-import-css": "~0.29.0-alpha.5", "patch-package": "^8.0.0", "rimraf": "^5.0.1" } }, "node_modules/@greenwood/cli": { - "version": "0.29.0-alpha.4", - "resolved": "https://registry.npmjs.org/@greenwood/cli/-/cli-0.29.0-alpha.4.tgz", - "integrity": "sha512-JJ7j8SgcX0fiMsC3SZzhCaYhKr2N7upWwdw6tSkHW4G5VbcVgW+vRPN3WBTXObB4RCmb5MAF8B0rkor2/5TB1Q==", + "version": "0.29.0-alpha.5", + "resolved": "https://registry.npmjs.org/@greenwood/cli/-/cli-0.29.0-alpha.5.tgz", + "integrity": "sha512-7rOIR8nCYoWy/QrRpyYPK15pC4iAvTuFAgaYv/NNFI3jUtp/etBiDEHZXV4vF5d85NplKDoIT8SxvKAP0OgJAw==", "dev": true, "dependencies": { "@rollup/plugin-commonjs": "^21.0.0", "@rollup/plugin-node-resolve": "^13.0.0", "@rollup/plugin-replace": "^2.3.4", "@rollup/plugin-terser": "^0.1.0", - "@web/rollup-plugin-import-meta-assets": "^1.0.0", "acorn": "^8.0.1", "acorn-walk": "^8.0.0", "commander": "^2.20.0", @@ -59,18 +57,18 @@ } }, "node_modules/@greenwood/plugin-adapter-vercel": { - "version": "0.29.0-alpha.4", - "resolved": "https://registry.npmjs.org/@greenwood/plugin-adapter-vercel/-/plugin-adapter-vercel-0.29.0-alpha.4.tgz", - "integrity": "sha512-ru86tXEUO5jB3Slfv+3Tk1T0keHWUOZsDTKlfUIX2/pfqsSKQG2Yd2iDSARBgUlE/JUKFjjmNCpCWgcGcTQsVg==", + "version": "0.29.0-alpha.5", + "resolved": "https://registry.npmjs.org/@greenwood/plugin-adapter-vercel/-/plugin-adapter-vercel-0.29.0-alpha.5.tgz", + "integrity": "sha512-R5kirLUWxY3KptSzntURM33QBcMbWpoPMw4a9Coz1uv7MrXfhG3p1GNOR7sS9U5SbqF4bH/Iovfcqx0n1SBZqw==", "dev": true, "peerDependencies": { "@greenwood/cli": "^0.28.0" } }, "node_modules/@greenwood/plugin-import-css": { - "version": "0.29.0-alpha.4", - "resolved": "https://registry.npmjs.org/@greenwood/plugin-import-css/-/plugin-import-css-0.29.0-alpha.4.tgz", - "integrity": "sha512-W7wy/090JAa+6MdjcbUiP+rbZJQz5VsmrsKcvAcmmbObimlG/eDtGWsUv5EKC7ahrha4DeV56uPhErGeNtuMMA==", + "version": "0.29.0-alpha.5", + "resolved": "https://registry.npmjs.org/@greenwood/plugin-import-css/-/plugin-import-css-0.29.0-alpha.5.tgz", + "integrity": "sha512-99GDCjbsqafKYQxiTgBoxHnwXPJU3o9D3f/2oj5e4wPeH0fsZeOoahVVAjlpBjgtbY3MIHcXOK62MNb68h8avg==", "dev": true, "peerDependencies": { "@greenwood/cli": "^0.4.0" @@ -480,60 +478,6 @@ "integrity": "sha512-cputDpIbFgLUaGQn6Vqg3/YsJwxUwHLO13v3i5ouxT4lat0khip9AEWxtERujXV9wxIB1EyF97BSJFt6vpdI8g==", "dev": true }, - "node_modules/@web/rollup-plugin-import-meta-assets": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@web/rollup-plugin-import-meta-assets/-/rollup-plugin-import-meta-assets-1.0.8.tgz", - "integrity": "sha512-lLIzsd94SwQv/z4eOhOECCTzQBZRT20wmmAQaP/wFJZfRgQNWaf3SxMClRlmw1Kuo2x6LdSXocnocUyKcmKNOg==", - "dev": true, - "dependencies": { - "@rollup/pluginutils": "^5.0.2", - "estree-walker": "^2.0.2", - "magic-string": "^0.30.0" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/@web/rollup-plugin-import-meta-assets/node_modules/@rollup/pluginutils": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.2.tgz", - "integrity": "sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==", - "dev": true, - "dependencies": { - "@types/estree": "^1.0.0", - "estree-walker": "^2.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@web/rollup-plugin-import-meta-assets/node_modules/@types/estree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz", - "integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==", - "dev": true - }, - "node_modules/@web/rollup-plugin-import-meta-assets/node_modules/magic-string": { - "version": "0.30.2", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.2.tgz", - "integrity": "sha512-lNZdu7pewtq/ZvWUp9Wpf/x7WzMTsR26TWV03BRZrXFsv+BI6dy8RAiKgm1uM/kyR0rCfUcqvOlXKG66KhIGug==", - "dev": true, - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.15" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/@yarnpkg/lockfile": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", @@ -4121,16 +4065,15 @@ }, "dependencies": { "@greenwood/cli": { - "version": "0.29.0-alpha.4", - "resolved": "https://registry.npmjs.org/@greenwood/cli/-/cli-0.29.0-alpha.4.tgz", - "integrity": "sha512-JJ7j8SgcX0fiMsC3SZzhCaYhKr2N7upWwdw6tSkHW4G5VbcVgW+vRPN3WBTXObB4RCmb5MAF8B0rkor2/5TB1Q==", + "version": "0.29.0-alpha.5", + "resolved": "https://registry.npmjs.org/@greenwood/cli/-/cli-0.29.0-alpha.5.tgz", + "integrity": "sha512-7rOIR8nCYoWy/QrRpyYPK15pC4iAvTuFAgaYv/NNFI3jUtp/etBiDEHZXV4vF5d85NplKDoIT8SxvKAP0OgJAw==", "dev": true, "requires": { "@rollup/plugin-commonjs": "^21.0.0", "@rollup/plugin-node-resolve": "^13.0.0", "@rollup/plugin-replace": "^2.3.4", "@rollup/plugin-terser": "^0.1.0", - "@web/rollup-plugin-import-meta-assets": "^1.0.0", "acorn": "^8.0.1", "acorn-walk": "^8.0.0", "commander": "^2.20.0", @@ -4153,15 +4096,15 @@ } }, "@greenwood/plugin-adapter-vercel": { - "version": "0.29.0-alpha.4", - "resolved": "https://registry.npmjs.org/@greenwood/plugin-adapter-vercel/-/plugin-adapter-vercel-0.29.0-alpha.4.tgz", - "integrity": "sha512-ru86tXEUO5jB3Slfv+3Tk1T0keHWUOZsDTKlfUIX2/pfqsSKQG2Yd2iDSARBgUlE/JUKFjjmNCpCWgcGcTQsVg==", + "version": "0.29.0-alpha.5", + "resolved": "https://registry.npmjs.org/@greenwood/plugin-adapter-vercel/-/plugin-adapter-vercel-0.29.0-alpha.5.tgz", + "integrity": "sha512-R5kirLUWxY3KptSzntURM33QBcMbWpoPMw4a9Coz1uv7MrXfhG3p1GNOR7sS9U5SbqF4bH/Iovfcqx0n1SBZqw==", "dev": true }, "@greenwood/plugin-import-css": { - "version": "0.29.0-alpha.4", - "resolved": "https://registry.npmjs.org/@greenwood/plugin-import-css/-/plugin-import-css-0.29.0-alpha.4.tgz", - "integrity": "sha512-W7wy/090JAa+6MdjcbUiP+rbZJQz5VsmrsKcvAcmmbObimlG/eDtGWsUv5EKC7ahrha4DeV56uPhErGeNtuMMA==", + "version": "0.29.0-alpha.5", + "resolved": "https://registry.npmjs.org/@greenwood/plugin-import-css/-/plugin-import-css-0.29.0-alpha.5.tgz", + "integrity": "sha512-99GDCjbsqafKYQxiTgBoxHnwXPJU3o9D3f/2oj5e4wPeH0fsZeOoahVVAjlpBjgtbY3MIHcXOK62MNb68h8avg==", "dev": true }, "@isaacs/cliui": { @@ -4523,45 +4466,6 @@ "integrity": "sha512-cputDpIbFgLUaGQn6Vqg3/YsJwxUwHLO13v3i5ouxT4lat0khip9AEWxtERujXV9wxIB1EyF97BSJFt6vpdI8g==", "dev": true }, - "@web/rollup-plugin-import-meta-assets": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@web/rollup-plugin-import-meta-assets/-/rollup-plugin-import-meta-assets-1.0.8.tgz", - "integrity": "sha512-lLIzsd94SwQv/z4eOhOECCTzQBZRT20wmmAQaP/wFJZfRgQNWaf3SxMClRlmw1Kuo2x6LdSXocnocUyKcmKNOg==", - "dev": true, - "requires": { - "@rollup/pluginutils": "^5.0.2", - "estree-walker": "^2.0.2", - "magic-string": "^0.30.0" - }, - "dependencies": { - "@rollup/pluginutils": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.2.tgz", - "integrity": "sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==", - "dev": true, - "requires": { - "@types/estree": "^1.0.0", - "estree-walker": "^2.0.2", - "picomatch": "^2.3.1" - } - }, - "@types/estree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz", - "integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==", - "dev": true - }, - "magic-string": { - "version": "0.30.2", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.2.tgz", - "integrity": "sha512-lNZdu7pewtq/ZvWUp9Wpf/x7WzMTsR26TWV03BRZrXFsv+BI6dy8RAiKgm1uM/kyR0rCfUcqvOlXKG66KhIGug==", - "dev": true, - "requires": { - "@jridgewell/sourcemap-codec": "^1.4.15" - } - } - } - }, "@yarnpkg/lockfile": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", diff --git a/package.json b/package.json index 18d662c..59b66c3 100644 --- a/package.json +++ b/package.json @@ -24,17 +24,15 @@ "dev": "node --experimental-loader ./node_modules/@greenwood/cli/src/loader.js ./node_modules/.bin/greenwood develop", "build": "node --experimental-loader ./node_modules/@greenwood/cli/src/loader.js ./node_modules/.bin/greenwood build", "serve": "npm run clean && npm run build && node --experimental-loader ./node_modules/@greenwood/cli/src/loader.js ./node_modules/.bin/greenwood serve", - "start": "npm run serve", - "postinstall": "patch-package" + "start": "npm run serve" }, "dependencies": { "htmx.org": "^1.9.4" }, "devDependencies": { - "@greenwood/cli": "~0.29.0-alpha.4", - "@greenwood/plugin-adapter-vercel": "~0.29.0-alpha.4", - "@greenwood/plugin-import-css": "~0.29.0-alpha.4", - "patch-package": "^8.0.0", + "@greenwood/cli": "~0.29.0-alpha.5", + "@greenwood/plugin-adapter-vercel": "~0.29.0-alpha.5", + "@greenwood/plugin-import-css": "~0.29.0-alpha.5", "rimraf": "^5.0.1" } } diff --git a/patches/@greenwood+cli+0.29.0-alpha.4.patch b/patches/@greenwood+cli+0.29.0-alpha.4.patch deleted file mode 100644 index 4947394..0000000 --- a/patches/@greenwood+cli+0.29.0-alpha.4.patch +++ /dev/null @@ -1,145 +0,0 @@ -diff --git a/node_modules/@greenwood/cli/src/config/rollup.config.js b/node_modules/@greenwood/cli/src/config/rollup.config.js -index df59ef6..36ae428 100644 ---- a/node_modules/@greenwood/cli/src/config/rollup.config.js -+++ b/node_modules/@greenwood/cli/src/config/rollup.config.js -@@ -10,10 +10,17 @@ function greenwoodJsonLoader() { - return { - name: 'greenwood-json-loader', - async load(id) { -- const extension = id.split('.').pop(); -+ console.log({ id }); -+ // const extension = id.split('.').pop(); -+ const extension = id.split('.').pop().replace('?commonjs-proxy', ''); -+ console.log({ extension }); - - if (extension === 'json') { -- const url = new URL(`file://${id}`); -+ console.log('GO! ---> ', id.replace('?commonjs-proxy', '')); -+ // https://github.com/rollup/rollup/issues/2121 -+ const url = new URL(`file://${id.replace('?commonjs-proxy', '').replace('\x00', '')}`); -+ // const url = new URL(`file://${id}`); -+ console.log({ url }); - const json = JSON.parse(await fs.readFile(url, 'utf-8')); - const contents = `export default ${JSON.stringify(json)}`; - -@@ -50,7 +57,8 @@ function greenwoodResourceLoader (compilation) { - const extension = pathname.split('.').pop(); - - if (extension !== '' && extension !== 'js') { -- const url = new URL(`file://${pathname}?type=${extension}`); -+ console.log({ extension, pathname }) -+ const url = new URL(`file://${pathname.replace('\x00', '')}?type=${extension}`); - const request = new Request(url.href); - let response = new Response(''); - -@@ -155,6 +163,7 @@ function greenwoodPatchSsrPagesEntryPointRuntimeImport() { - } - - const getRollupConfigForScriptResources = async (compilation) => { -+ console.log('##### getRollupConfigForScriptResources'); - const { outputDir } = compilation.context; - const input = [...compilation.resources.values()] - .filter(resource => resource.type === 'script') -@@ -212,10 +221,20 @@ const getRollupConfigForScriptResources = async (compilation) => { - }; - - const getRollupConfigForApis = async (compilation) => { -+ console.log('##### getRollupConfigForApis'); - const { outputDir, userWorkspace } = compilation.context; - const input = [...compilation.manifest.apis.values()] - .map(api => normalizePathnameForWindows(new URL(`.${api.path}`, userWorkspace))); -- -+ const customRollupPlugins = compilation.config.plugins.filter(plugin => { -+ return plugin.type === 'rollup'; -+ }).map(plugin => { -+ return plugin.provider(compilation); -+ }).flat(); -+ -+ // TODO why is this needed? -+ await fs.mkdir(new URL('./api/assets/', outputDir), { -+ recursive: true -+ }); - // TODO should routes and APIs have chunks? - // https://github.com/ProjectEvergreen/greenwood/issues/1118 - return [{ -@@ -225,17 +244,29 @@ const getRollupConfigForApis = async (compilation) => { - entryFileNames: '[name].js', - chunkFileNames: '[name].[hash].js' - }, -+ // TODO should these plugins match across all configurations? -+ // TODO sync with SSR config - plugins: [ - greenwoodJsonLoader(), -+ greenwoodResourceLoader(compilation), - nodeResolve(), - commonjs(), -- importMetaAssets() -+ importMetaAssets(), -+ // TODO ??? ...customRollupPlugins, - ] - }]; - }; - - const getRollupConfigForSsr = async (compilation, input) => { -+ console.log('##### getRollupConfigForSsr'); - const { outputDir } = compilation.context; -+ const customRollupPlugins = compilation.config.plugins.filter(plugin => { -+ return plugin.type === 'rollup'; -+ }).map(plugin => { -+ return plugin.provider(compilation); -+ }).flat(); -+ -+ console.log({ customRollupPlugins }); - - // TODO should routes and APIs have chunks? - // https://github.com/ProjectEvergreen/greenwood/issues/1118 -@@ -248,6 +279,7 @@ const getRollupConfigForSsr = async (compilation, input) => { - }, - plugins: [ - greenwoodJsonLoader(), -+ greenwoodResourceLoader(compilation), - // TODO let this through for lit to enable nodeResolve({ preferBuiltins: true }) - // https://github.com/lit/lit/issues/449 - // https://github.com/ProjectEvergreen/greenwood/issues/1118 -diff --git a/node_modules/@greenwood/cli/src/loader.js b/node_modules/@greenwood/cli/src/loader.js -index 7955b24..57f3464 100644 ---- a/node_modules/@greenwood/cli/src/loader.js -+++ b/node_modules/@greenwood/cli/src/loader.js -@@ -46,7 +46,12 @@ async function getCustomLoaderResponse(url, body = '', checkOnly = false) { - // https://nodejs.org/docs/latest-v18.x/api/esm.html#resolvespecifier-context-nextresolve - export async function resolve(specifier, context, defaultResolve) { - const { parentURL } = context; -- const { shouldHandle } = await getCustomLoaderResponse(new URL(specifier), null, true); -+ // console.log({ specifier, context, parentURL }) -+ const x = specifier.startsWith('file://') -+ ? new URL(specifier) -+ : new URL(specifier, parentURL); -+ // console.log({ x }); -+ const { shouldHandle } = await getCustomLoaderResponse(x, null, true); - - if (shouldHandle) { - return { -@@ -60,10 +65,13 @@ export async function resolve(specifier, context, defaultResolve) { - - // https://nodejs.org/docs/latest-v18.x/api/esm.html#loadurl-context-nextload - export async function load(source, context, defaultLoad) { -+ // console.log('LOAD', { source, context }); -+ // if (source.startsWith('file://')) { - const extension = source.split('.').pop(); -- const url = new URL('', `${source}?type=${extension}`); -+ const url = new URL(`${source}?type=${extension}`); - const { shouldHandle } = await getCustomLoaderResponse(url, null, true); - -+ // console.log('should handle?????', shouldHandle); - if (shouldHandle) { - const contents = await fs.readFile(new URL(source), 'utf-8'); - const { response } = await getCustomLoaderResponse(url, contents); -@@ -77,6 +85,7 @@ export async function load(source, context, defaultLoad) { - shortCircuit: true - }; - } -+ // } - - return defaultLoad(source, context, defaultLoad); - } -\ No newline at end of file diff --git a/patches/@web+rollup-plugin-import-meta-assets+1.0.8.patch b/patches/@web+rollup-plugin-import-meta-assets+1.0.8.patch deleted file mode 100644 index 0180ec6..0000000 --- a/patches/@web+rollup-plugin-import-meta-assets+1.0.8.patch +++ /dev/null @@ -1,60 +0,0 @@ -diff --git a/node_modules/@web/rollup-plugin-import-meta-assets/src/rollup-plugin-import-meta-assets.js b/node_modules/@web/rollup-plugin-import-meta-assets/src/rollup-plugin-import-meta-assets.js -index 1d0280c..5b623e1 100644 ---- a/node_modules/@web/rollup-plugin-import-meta-assets/src/rollup-plugin-import-meta-assets.js -+++ b/node_modules/@web/rollup-plugin-import-meta-assets/src/rollup-plugin-import-meta-assets.js -@@ -58,10 +58,13 @@ function importMetaAssets({ include, exclude, warnOnError, transform } = {}) { - name: 'rollup-plugin-import-meta-assets', - - async transform(code, id) { -+ console.log({ id }); - if (!filter(id)) { - return null; - } - -+ console.log('here!?!!?!?!', { id }); -+ - const ast = this.parse(code); - const magicString = new MagicString(code); - let modifiedCode = false; -@@ -74,6 +77,7 @@ function importMetaAssets({ include, exclude, warnOnError, transform } = {}) { - const absoluteAssetPath = path.resolve(absoluteScriptDir, relativeAssetPath); - const assetName = path.basename(absoluteAssetPath); - -+ console.log({ absoluteAssetPath, absoluteScriptDir, relativeAssetPath }); - try { - const assetContents = await fs.promises.readFile(absoluteAssetPath); - const transformedAssetContents = -@@ -83,11 +87,21 @@ function importMetaAssets({ include, exclude, warnOnError, transform } = {}) { - if (transformedAssetContents === null) { - return; - } -+ // https://github.com/rollup/rollup/blob/v2.79.1/docs/05-plugin-development.md#thisemitfile -+ // TODO chunk (.js) vs asset (not .js)? - const ref = this.emitFile({ -- type: 'asset', -- name: assetName, -- source: transformedAssetContents, -+ type: 'chunk', -+ id: absoluteAssetPath, -+ // preserveSignature: 'strict' -+ name: assetName.replace('.js', ''), -+ // source: transformedAssetContents, - }); -+ // const ref = this.emitFile({ -+ // type: 'asset', -+ // name: assetName, -+ // source: transformedAssetContents, -+ // }); -+ console.log({ ref }); - magicString.overwrite( - node.arguments[0].start, - node.arguments[0].end, -@@ -105,6 +119,8 @@ function importMetaAssets({ include, exclude, warnOnError, transform } = {}) { - }, - }); - -+ console.log('((((((((((((((((('); -+ - return { - code: magicString.toString(), - map: modifiedCode ? magicString.generateMap({ hires: true }) : null, From 69ea4ef41634de59ae0cb08e4c296944bd4536e7 Mon Sep 17 00:00:00 2001 From: Owen Buckley Date: Wed, 8 Nov 2023 21:27:04 -0500 Subject: [PATCH 8/8] final release --- package-lock.json | 647 +++------------------------------------------- package.json | 6 +- 2 files changed, 38 insertions(+), 615 deletions(-) diff --git a/package-lock.json b/package-lock.json index e18de9b..f324d84 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,17 +12,16 @@ "htmx.org": "^1.9.4" }, "devDependencies": { - "@greenwood/cli": "~0.29.0-alpha.5", - "@greenwood/plugin-adapter-vercel": "~0.29.0-alpha.5", - "@greenwood/plugin-import-css": "~0.29.0-alpha.5", - "patch-package": "^8.0.0", + "@greenwood/cli": "~0.29.0", + "@greenwood/plugin-adapter-vercel": "~0.29.0", + "@greenwood/plugin-import-css": "~0.29.0", "rimraf": "^5.0.1" } }, "node_modules/@greenwood/cli": { - "version": "0.29.0-alpha.5", - "resolved": "https://registry.npmjs.org/@greenwood/cli/-/cli-0.29.0-alpha.5.tgz", - "integrity": "sha512-7rOIR8nCYoWy/QrRpyYPK15pC4iAvTuFAgaYv/NNFI3jUtp/etBiDEHZXV4vF5d85NplKDoIT8SxvKAP0OgJAw==", + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@greenwood/cli/-/cli-0.29.0.tgz", + "integrity": "sha512-/mqXakf4ciN7j3O7iErp5xJJaginfDlL+F7oPaGo6ndqwgkPArFCrXa/C/svbmuiaymDCDCRjaAwmzsmMhHVPA==", "dev": true, "dependencies": { "@rollup/plugin-commonjs": "^21.0.0", @@ -47,7 +46,7 @@ "remark-rehype": "^7.0.0", "rollup": "^2.58.0", "unified": "^9.2.0", - "wc-compiler": "~0.8.0" + "wc-compiler": "~0.9.0" }, "bin": { "greenwood": "src/index.js" @@ -57,18 +56,18 @@ } }, "node_modules/@greenwood/plugin-adapter-vercel": { - "version": "0.29.0-alpha.5", - "resolved": "https://registry.npmjs.org/@greenwood/plugin-adapter-vercel/-/plugin-adapter-vercel-0.29.0-alpha.5.tgz", - "integrity": "sha512-R5kirLUWxY3KptSzntURM33QBcMbWpoPMw4a9Coz1uv7MrXfhG3p1GNOR7sS9U5SbqF4bH/Iovfcqx0n1SBZqw==", + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@greenwood/plugin-adapter-vercel/-/plugin-adapter-vercel-0.29.0.tgz", + "integrity": "sha512-SdG66AOddsZYjU/QuxodwLi/m7sSgoIWeUqyskLSEB7CCxgDDCJvVql4Vn1Z8JBfxJb+SBTc+MeLZUhiJiiclA==", "dev": true, "peerDependencies": { "@greenwood/cli": "^0.28.0" } }, "node_modules/@greenwood/plugin-import-css": { - "version": "0.29.0-alpha.5", - "resolved": "https://registry.npmjs.org/@greenwood/plugin-import-css/-/plugin-import-css-0.29.0-alpha.5.tgz", - "integrity": "sha512-99GDCjbsqafKYQxiTgBoxHnwXPJU3o9D3f/2oj5e4wPeH0fsZeOoahVVAjlpBjgtbY3MIHcXOK62MNb68h8avg==", + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@greenwood/plugin-import-css/-/plugin-import-css-0.29.0.tgz", + "integrity": "sha512-2FMk3qs8umOuR4bb4xSuW1bRGV1Pk1QS1QY6sk5BNhOIO5+ZphtuIrVTJUcfxHzLw4BBOG4Xws6LJCs5XfNfjw==", "dev": true, "peerDependencies": { "@greenwood/cli": "^0.4.0" @@ -478,12 +477,6 @@ "integrity": "sha512-cputDpIbFgLUaGQn6Vqg3/YsJwxUwHLO13v3i5ouxT4lat0khip9AEWxtERujXV9wxIB1EyF97BSJFt6vpdI8g==", "dev": true }, - "node_modules/@yarnpkg/lockfile": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", - "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", - "dev": true - }, "node_modules/accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -519,9 +512,9 @@ } }, "node_modules/acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.0.tgz", + "integrity": "sha512-FS7hV565M5l1R08MXqo8odwMTB02C2UqzB17RVgu9EyuYFBqJZ3/ZY97sQD5FewVu1UyDFc1yztUDrAwT0EypA==", "dev": true, "engines": { "node": ">=0.4.0" @@ -600,15 +593,6 @@ "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", "dev": true }, - "node_modules/at-least-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", - "dev": true, - "engines": { - "node": ">= 4.0.0" - } - }, "node_modules/autolinker": { "version": "0.28.1", "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-0.28.1.tgz", @@ -728,37 +712,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/chalk/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/character-entities": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", @@ -826,21 +779,6 @@ "fsevents": "~2.3.2" } }, - "node_modules/ci-info": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", - "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "engines": { - "node": ">=8" - } - }, "node_modules/co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -1280,15 +1218,6 @@ "node": ">=8" } }, - "node_modules/find-yarn-workspace-root": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz", - "integrity": "sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==", - "dev": true, - "dependencies": { - "micromatch": "^4.0.2" - } - }, "node_modules/for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -1356,21 +1285,6 @@ "js-yaml": "^3.13.1" } }, - "node_modules/fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "dev": true, - "dependencies": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -1444,12 +1358,6 @@ "node": ">= 6" } }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true - }, "node_modules/gray-matter": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-2.1.1.tgz", @@ -1490,15 +1398,6 @@ "node": ">= 0.4.0" } }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/has-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", @@ -1877,21 +1776,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "dev": true, - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-extendable": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", @@ -2024,18 +1908,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dev": true, - "dependencies": { - "is-docker": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -2088,39 +1960,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/json-stable-stringify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.2.tgz", - "integrity": "sha512-eunSSaEnxV12z+Z73y/j5N37/In40GK4GmsSy+tEHJMxknvqnA7/djeYtAgW0GsWHUfg+847WJjKaEylk2y09g==", - "dev": true, - "dependencies": { - "jsonify": "^0.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/jsonify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz", - "integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/keygrip": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/keygrip/-/keygrip-1.1.0.tgz", @@ -2145,15 +1984,6 @@ "node": ">=0.10.0" } }, - "node_modules/klaw-sync": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz", - "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.11" - } - }, "node_modules/koa": { "version": "2.14.2", "resolved": "https://registry.npmjs.org/koa/-/koa-2.14.2.tgz", @@ -2420,19 +2250,6 @@ "node": ">= 0.6" } }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -2590,37 +2407,12 @@ "integrity": "sha512-Fvw+Jemq5fjjyWz6CpKx6w9s7xxqo3+JCyM0WXWeCSOboZ8ABkyvP8ID4CZuChA/wxSx+XSJmdOm8rGVyJ1hdQ==", "dev": true }, - "node_modules/open": { - "version": "7.4.2", - "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", - "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", - "dev": true, - "dependencies": { - "is-docker": "^2.0.0", - "is-wsl": "^2.1.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/opts": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/opts/-/opts-2.0.2.tgz", "integrity": "sha512-k41FwbcLnlgnFh69f4qdUfvDQ+5vaSDnVPFI/y5XuhKRq97EnVVneO9F1ESVCdiVu4fCS2L8usX3mU331hB7pg==", "dev": true }, - "node_modules/os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/parse-entities": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", @@ -2654,48 +2446,6 @@ "node": ">= 0.8" } }, - "node_modules/patch-package": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-8.0.0.tgz", - "integrity": "sha512-da8BVIhzjtgScwDJ2TtKsfT5JFWz1hYoBl9rUQ1f38MC2HwnEIkK8VN3dKMKcP7P7bvvgzNDbfNHtx3MsQb5vA==", - "dev": true, - "dependencies": { - "@yarnpkg/lockfile": "^1.1.0", - "chalk": "^4.1.2", - "ci-info": "^3.7.0", - "cross-spawn": "^7.0.3", - "find-yarn-workspace-root": "^2.0.0", - "fs-extra": "^9.0.0", - "json-stable-stringify": "^1.0.2", - "klaw-sync": "^6.0.0", - "minimist": "^1.2.6", - "open": "^7.4.2", - "rimraf": "^2.6.3", - "semver": "^7.5.3", - "slash": "^2.0.0", - "tmp": "^0.0.33", - "yaml": "^2.2.2" - }, - "bin": { - "patch-package": "index.js" - }, - "engines": { - "node": ">=14", - "npm": ">5" - } - }, - "node_modules/patch-package/node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - } - }, "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -3123,33 +2873,6 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, - "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/set-getter": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.1.tgz", @@ -3215,15 +2938,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -3438,18 +3152,6 @@ "inline-style-parser": "0.1.1" } }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -3490,18 +3192,6 @@ "xtend": "~4.0.1" } }, - "node_modules/tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "dependencies": { - "os-tmpdir": "~1.0.2" - }, - "engines": { - "node": ">=0.6.0" - } - }, "node_modules/to-object-path": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", @@ -3755,15 +3445,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true, - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", @@ -3852,9 +3533,9 @@ } }, "node_modules/wc-compiler": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/wc-compiler/-/wc-compiler-0.8.0.tgz", - "integrity": "sha512-vkq9wcpMOTsIDgPvQYso01fQZTD2iGzKTVhO6AbbAz5bE8WUOvNAN9sPy56An26sVmMl/KNL2St5rVmFQ/lw9w==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/wc-compiler/-/wc-compiler-0.9.0.tgz", + "integrity": "sha512-AmpkRrOVPP0SHUF/9Y9BEiHejw3K+58cjLDxj/cN3w5ptJ3ZKEICDn7v+gEmj+d7XDwwb/8PjeEzmBWjo877ew==", "dev": true, "dependencies": { "acorn": "^8.7.0", @@ -4019,21 +3700,6 @@ "node": ">=0.4" } }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/yaml": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.2.tgz", - "integrity": "sha512-N/lyzTPaJasoDmfV7YTrYCI0G/3ivm/9wdG0aHuheKowWQwGTsK0Eoiw6utmzAnI6pkJa0DUVygvp3spqqEKXg==", - "dev": true, - "engines": { - "node": ">= 14" - } - }, "node_modules/ylru": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/ylru/-/ylru-1.3.2.tgz", @@ -4065,9 +3731,9 @@ }, "dependencies": { "@greenwood/cli": { - "version": "0.29.0-alpha.5", - "resolved": "https://registry.npmjs.org/@greenwood/cli/-/cli-0.29.0-alpha.5.tgz", - "integrity": "sha512-7rOIR8nCYoWy/QrRpyYPK15pC4iAvTuFAgaYv/NNFI3jUtp/etBiDEHZXV4vF5d85NplKDoIT8SxvKAP0OgJAw==", + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@greenwood/cli/-/cli-0.29.0.tgz", + "integrity": "sha512-/mqXakf4ciN7j3O7iErp5xJJaginfDlL+F7oPaGo6ndqwgkPArFCrXa/C/svbmuiaymDCDCRjaAwmzsmMhHVPA==", "dev": true, "requires": { "@rollup/plugin-commonjs": "^21.0.0", @@ -4092,19 +3758,19 @@ "remark-rehype": "^7.0.0", "rollup": "^2.58.0", "unified": "^9.2.0", - "wc-compiler": "~0.8.0" + "wc-compiler": "~0.9.0" } }, "@greenwood/plugin-adapter-vercel": { - "version": "0.29.0-alpha.5", - "resolved": "https://registry.npmjs.org/@greenwood/plugin-adapter-vercel/-/plugin-adapter-vercel-0.29.0-alpha.5.tgz", - "integrity": "sha512-R5kirLUWxY3KptSzntURM33QBcMbWpoPMw4a9Coz1uv7MrXfhG3p1GNOR7sS9U5SbqF4bH/Iovfcqx0n1SBZqw==", + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@greenwood/plugin-adapter-vercel/-/plugin-adapter-vercel-0.29.0.tgz", + "integrity": "sha512-SdG66AOddsZYjU/QuxodwLi/m7sSgoIWeUqyskLSEB7CCxgDDCJvVql4Vn1Z8JBfxJb+SBTc+MeLZUhiJiiclA==", "dev": true }, "@greenwood/plugin-import-css": { - "version": "0.29.0-alpha.5", - "resolved": "https://registry.npmjs.org/@greenwood/plugin-import-css/-/plugin-import-css-0.29.0-alpha.5.tgz", - "integrity": "sha512-99GDCjbsqafKYQxiTgBoxHnwXPJU3o9D3f/2oj5e4wPeH0fsZeOoahVVAjlpBjgtbY3MIHcXOK62MNb68h8avg==", + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@greenwood/plugin-import-css/-/plugin-import-css-0.29.0.tgz", + "integrity": "sha512-2FMk3qs8umOuR4bb4xSuW1bRGV1Pk1QS1QY6sk5BNhOIO5+ZphtuIrVTJUcfxHzLw4BBOG4Xws6LJCs5XfNfjw==", "dev": true }, "@isaacs/cliui": { @@ -4466,12 +4132,6 @@ "integrity": "sha512-cputDpIbFgLUaGQn6Vqg3/YsJwxUwHLO13v3i5ouxT4lat0khip9AEWxtERujXV9wxIB1EyF97BSJFt6vpdI8g==", "dev": true }, - "@yarnpkg/lockfile": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", - "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", - "dev": true - }, "accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -4495,9 +4155,9 @@ "dev": true }, "acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.0.tgz", + "integrity": "sha512-FS7hV565M5l1R08MXqo8odwMTB02C2UqzB17RVgu9EyuYFBqJZ3/ZY97sQD5FewVu1UyDFc1yztUDrAwT0EypA==", "dev": true }, "ansi-red": { @@ -4552,12 +4212,6 @@ "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", "dev": true }, - "at-least-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", - "dev": true - }, "autolinker": { "version": "0.28.1", "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-0.28.1.tgz", @@ -4648,27 +4302,6 @@ "integrity": "sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg==", "dev": true }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - } - } - }, "character-entities": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", @@ -4709,12 +4342,6 @@ "readdirp": "~3.6.0" } }, - "ci-info": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", - "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", - "dev": true - }, "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -5050,15 +4677,6 @@ "to-regex-range": "^5.0.1" } }, - "find-yarn-workspace-root": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz", - "integrity": "sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==", - "dev": true, - "requires": { - "micromatch": "^4.0.2" - } - }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -5108,18 +4726,6 @@ "js-yaml": "^3.13.1" } }, - "fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "dev": true, - "requires": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - } - }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -5174,12 +4780,6 @@ "is-glob": "^4.0.1" } }, - "graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true - }, "gray-matter": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-2.1.1.tgz", @@ -5213,12 +4813,6 @@ "function-bind": "^1.1.1" } }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, "has-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", @@ -5496,12 +5090,6 @@ "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", "dev": true }, - "is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "dev": true - }, "is-extendable": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", @@ -5595,15 +5183,6 @@ "integrity": "sha512-5SMO8RVennx3nZrqtKwCGyyetPE9VDba5ugvKLaD4KopPG5kR4mQ7tNt/r7feL5yt5h3lpuBbIUmCOG2eSzXHA==", "dev": true }, - "is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dev": true, - "requires": { - "is-docker": "^2.0.0" - } - }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -5642,31 +5221,6 @@ "esprima": "^4.0.0" } }, - "json-stable-stringify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.2.tgz", - "integrity": "sha512-eunSSaEnxV12z+Z73y/j5N37/In40GK4GmsSy+tEHJMxknvqnA7/djeYtAgW0GsWHUfg+847WJjKaEylk2y09g==", - "dev": true, - "requires": { - "jsonify": "^0.0.1" - } - }, - "jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6", - "universalify": "^2.0.0" - } - }, - "jsonify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz", - "integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==", - "dev": true - }, "keygrip": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/keygrip/-/keygrip-1.1.0.tgz", @@ -5685,15 +5239,6 @@ "is-buffer": "^1.1.5" } }, - "klaw-sync": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz", - "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11" - } - }, "koa": { "version": "2.14.2", "resolved": "https://registry.npmjs.org/koa/-/koa-2.14.2.tgz", @@ -5915,16 +5460,6 @@ "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", "dev": true }, - "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "requires": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - } - }, "mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -6048,28 +5583,12 @@ "integrity": "sha512-Fvw+Jemq5fjjyWz6CpKx6w9s7xxqo3+JCyM0WXWeCSOboZ8ABkyvP8ID4CZuChA/wxSx+XSJmdOm8rGVyJ1hdQ==", "dev": true }, - "open": { - "version": "7.4.2", - "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", - "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", - "dev": true, - "requires": { - "is-docker": "^2.0.0", - "is-wsl": "^2.1.1" - } - }, "opts": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/opts/-/opts-2.0.2.tgz", "integrity": "sha512-k41FwbcLnlgnFh69f4qdUfvDQ+5vaSDnVPFI/y5XuhKRq97EnVVneO9F1ESVCdiVu4fCS2L8usX3mU331hB7pg==", "dev": true }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", - "dev": true - }, "parse-entities": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", @@ -6096,40 +5615,6 @@ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", "dev": true }, - "patch-package": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-8.0.0.tgz", - "integrity": "sha512-da8BVIhzjtgScwDJ2TtKsfT5JFWz1hYoBl9rUQ1f38MC2HwnEIkK8VN3dKMKcP7P7bvvgzNDbfNHtx3MsQb5vA==", - "dev": true, - "requires": { - "@yarnpkg/lockfile": "^1.1.0", - "chalk": "^4.1.2", - "ci-info": "^3.7.0", - "cross-spawn": "^7.0.3", - "find-yarn-workspace-root": "^2.0.0", - "fs-extra": "^9.0.0", - "json-stable-stringify": "^1.0.2", - "klaw-sync": "^6.0.0", - "minimist": "^1.2.6", - "open": "^7.4.2", - "rimraf": "^2.6.3", - "semver": "^7.5.3", - "slash": "^2.0.0", - "tmp": "^0.0.33", - "yaml": "^2.2.2" - }, - "dependencies": { - "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - } - } - }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -6434,26 +5919,6 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, - "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - }, - "dependencies": { - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - } - } - }, "set-getter": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.1.tgz", @@ -6501,12 +5966,6 @@ "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -6673,15 +6132,6 @@ "inline-style-parser": "0.1.1" } }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, "supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -6710,15 +6160,6 @@ "xtend": "~4.0.1" } }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.2" - } - }, "to-object-path": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", @@ -6892,12 +6333,6 @@ "unist-util-is": "^4.0.0" } }, - "universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true - }, "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", @@ -6953,9 +6388,9 @@ } }, "wc-compiler": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/wc-compiler/-/wc-compiler-0.8.0.tgz", - "integrity": "sha512-vkq9wcpMOTsIDgPvQYso01fQZTD2iGzKTVhO6AbbAz5bE8WUOvNAN9sPy56An26sVmMl/KNL2St5rVmFQ/lw9w==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/wc-compiler/-/wc-compiler-0.9.0.tgz", + "integrity": "sha512-AmpkRrOVPP0SHUF/9Y9BEiHejw3K+58cjLDxj/cN3w5ptJ3ZKEICDn7v+gEmj+d7XDwwb/8PjeEzmBWjo877ew==", "dev": true, "requires": { "acorn": "^8.7.0", @@ -7063,18 +6498,6 @@ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", "dev": true }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "yaml": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.2.tgz", - "integrity": "sha512-N/lyzTPaJasoDmfV7YTrYCI0G/3ivm/9wdG0aHuheKowWQwGTsK0Eoiw6utmzAnI6pkJa0DUVygvp3spqqEKXg==", - "dev": true - }, "ylru": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/ylru/-/ylru-1.3.2.tgz", diff --git a/package.json b/package.json index 59b66c3..e68beac 100644 --- a/package.json +++ b/package.json @@ -30,9 +30,9 @@ "htmx.org": "^1.9.4" }, "devDependencies": { - "@greenwood/cli": "~0.29.0-alpha.5", - "@greenwood/plugin-adapter-vercel": "~0.29.0-alpha.5", - "@greenwood/plugin-import-css": "~0.29.0-alpha.5", + "@greenwood/cli": "~0.29.0", + "@greenwood/plugin-adapter-vercel": "~0.29.0", + "@greenwood/plugin-import-css": "~0.29.0", "rimraf": "^5.0.1" } }