chore: use local library; fix astro config

This commit is contained in:
Ayo Ayco 2024-08-08 21:28:53 +02:00
parent ffa756a825
commit 8d847a5769
3 changed files with 38 additions and 45 deletions

View file

@ -1,6 +1,6 @@
import { defineConfig } from "astro/config"; import { defineConfig } from "astro/config";
import node from "@astrojs/node"; import node from "@astrojs/node";
import serviceWorker from "@ayco/astro-sw"; import serviceWorker from "./index.js";
export default defineConfig({ export default defineConfig({
output: "server", output: "server",
@ -9,7 +9,7 @@ export default defineConfig({
}), }),
integrations: [ integrations: [
serviceWorker({ serviceWorker({
path: "./example-sw.js", path: "./example_sw.js",
assetCachePrefix: 'cozy-reader', assetCachePrefix: 'cozy-reader',
}) })
] ]

View file

@ -30,7 +30,6 @@
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"astro": "^4.13.1", "astro": "^4.13.1",
"@astrojs/node": "^8.3.2", "@astrojs/node": "^8.3.2"
"@ayco/astro-sw": "*"
} }
} }

View file

@ -7,17 +7,13 @@ settings:
importers: importers:
.: .:
dependencies: devDependencies:
'@astrojs/node': '@astrojs/node':
specifier: ^8.3.2 specifier: ^8.3.2
version: 8.3.2(astro@4.13.1) version: 8.3.2(astro@4.13.2)
devDependencies:
'@ayco/astro-sw':
specifier: '*'
version: 0.0.8
astro: astro:
specifier: ^4.13.1 specifier: ^4.13.1
version: 4.13.1 version: 4.13.2
packages: packages:
@ -25,8 +21,8 @@ packages:
resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==}
engines: {node: '>=6.0.0'} engines: {node: '>=6.0.0'}
'@astrojs/compiler@2.10.1': '@astrojs/compiler@2.10.2':
resolution: {integrity: sha512-XmM4j6BjvOVMag2xELq0JuG2yKOW8wgIu6dvb9BsjbGYmnvoStJn/pqEzVqc1EBszf2xYT7onIkftIOUz9AwrQ==} resolution: {integrity: sha512-bvH+v8AirwpRWCkYJEyWYdc5Cs/BjG2ZTxIJzttHilXgfKJAdW2496KsUQKzf5j2tOHtaHXKKn9hb9WZiBGpEg==}
'@astrojs/internal-helpers@0.4.1': '@astrojs/internal-helpers@0.4.1':
resolution: {integrity: sha512-bMf9jFihO8YP940uD70SI/RDzIhUHJAolWVcO1v5PUivxGKvfLZTLTVVxEYzGYyPsA3ivdLNqMnL5VgmQySa+g==} resolution: {integrity: sha512-bMf9jFihO8YP940uD70SI/RDzIhUHJAolWVcO1v5PUivxGKvfLZTLTVVxEYzGYyPsA3ivdLNqMnL5VgmQySa+g==}
@ -47,10 +43,6 @@ packages:
resolution: {integrity: sha512-/ca/+D8MIKEC8/A9cSaPUqQNZm+Es/ZinRv0ZAzvu2ios7POQSsVD+VOj7/hypWNsNM3T7RpfgNq7H2TU1KEHA==} resolution: {integrity: sha512-/ca/+D8MIKEC8/A9cSaPUqQNZm+Es/ZinRv0ZAzvu2ios7POQSsVD+VOj7/hypWNsNM3T7RpfgNq7H2TU1KEHA==}
engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0} engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0}
'@ayco/astro-sw@0.0.8':
resolution: {integrity: sha512-cAYsuK0lxARvrNLn2mxcR6p5KpBTOAW8yqb7Pf5YM7NNxZ+LMLLM9m7HV47HX9M7EiWk6erbzYOVKdDXKVn1/g==}
engines: {node: '>=18.0.0'}
'@babel/code-frame@7.24.7': '@babel/code-frame@7.24.7':
resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==}
engines: {node: '>=6.9.0'} engines: {node: '>=6.9.0'}
@ -584,8 +576,8 @@ packages:
array-iterate@2.0.1: array-iterate@2.0.1:
resolution: {integrity: sha512-I1jXZMjAgCMmxT4qxXfPXa6SthSoE8h6gkSI9BGGNv8mP8G/v0blc+qFnZu6K42vTOiuME596QaLO0TP3Lk0xg==} resolution: {integrity: sha512-I1jXZMjAgCMmxT4qxXfPXa6SthSoE8h6gkSI9BGGNv8mP8G/v0blc+qFnZu6K42vTOiuME596QaLO0TP3Lk0xg==}
astro@4.13.1: astro@4.13.2:
resolution: {integrity: sha512-VnMjAc+ykFsIVjgbu9Mt/EA1fMIcPMXbU89h3ATwGOzSIKDsQH72bDgfJkWiwk6u0OE90GeP5EPhAT28Twf9oA==} resolution: {integrity: sha512-bdfUV6zfOWOV/IbROqVx+1cuAFXY0PZpVxr4JO9YxCKa5AfQRR8RKXJ2k8QUjalA6dmxQ9FgAQw3FRrzHVOGEQ==}
engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0'} engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0'}
hasBin: true hasBin: true
@ -616,8 +608,8 @@ packages:
resolution: {integrity: sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==} resolution: {integrity: sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==}
engines: {node: '>=14.16'} engines: {node: '>=14.16'}
caniuse-lite@1.0.30001647: caniuse-lite@1.0.30001651:
resolution: {integrity: sha512-n83xdNiyeNcHpzWY+1aFbqCK7LuLfBricc4+alSQL2Xb6OR3XpnQAmlDG+pQcdTfiHRuLcQ96VOfrPSGiNJYSg==} resolution: {integrity: sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg==}
ccount@2.0.1: ccount@2.0.1:
resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==}
@ -764,8 +756,8 @@ packages:
ee-first@1.1.1: ee-first@1.1.1:
resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==}
electron-to-chromium@1.5.4: electron-to-chromium@1.5.5:
resolution: {integrity: sha512-orzA81VqLyIGUEA77YkVA1D+N+nNfl2isJVjjmOyrlxuooZ19ynb+dOlaDTqd/idKRS9lDCSBmtzM+kyCsMnkA==} resolution: {integrity: sha512-QR7/A7ZkMS8tZuoftC/jfqNkZLQO779SSW3YuZHP4eXpj3EffGLFcB/Xu9AAZQzLccTiCV+EmUo3ha4mQ9wnlA==}
emoji-regex@10.3.0: emoji-regex@10.3.0:
resolution: {integrity: sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==} resolution: {integrity: sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==}
@ -1323,8 +1315,8 @@ packages:
resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==}
engines: {node: '>=8'} engines: {node: '>=8'}
postcss@8.4.40: postcss@8.4.41:
resolution: {integrity: sha512-YF2kKIUzAofPMpfH6hOi2cGnv/HrUlfucspc7pDyvv7kGdqXrfj8SCl/t8owkEgKEuu8ZcRjSOxFxVLqwChZ2Q==} resolution: {integrity: sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ==}
engines: {node: ^10 || ^12 || >=14} engines: {node: ^10 || ^12 || >=14}
preferred-pm@4.0.0: preferred-pm@4.0.0:
@ -1593,8 +1585,8 @@ packages:
vfile@6.0.2: vfile@6.0.2:
resolution: {integrity: sha512-zND7NlS8rJYb/sPqkb13ZvbbUoExdbi4w3SfRrMq6R3FvnLQmmfpajJNITuuYm6AZ5uao9vy4BAos3EXBPf2rg==} resolution: {integrity: sha512-zND7NlS8rJYb/sPqkb13ZvbbUoExdbi4w3SfRrMq6R3FvnLQmmfpajJNITuuYm6AZ5uao9vy4BAos3EXBPf2rg==}
vite@5.3.5: vite@5.4.0:
resolution: {integrity: sha512-MdjglKR6AQXQb9JGiS7Rc2wC6uMjcm7Go/NHNO63EwiJXfuk9PgqiP/n5IDJCziMkfw9n4Ubp7lttNwz+8ZVKA==} resolution: {integrity: sha512-5xokfMX0PIiwCMCMb9ZJcMyh5wbBun0zUzKib+L65vAZ8GY9ePZMXxFrHbr/Kyll2+LSCY7xtERPpxkBDKngwg==}
engines: {node: ^18.0.0 || >=20.0.0} engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true hasBin: true
peerDependencies: peerDependencies:
@ -1602,6 +1594,7 @@ packages:
less: '*' less: '*'
lightningcss: ^1.21.0 lightningcss: ^1.21.0
sass: '*' sass: '*'
sass-embedded: '*'
stylus: '*' stylus: '*'
sugarss: '*' sugarss: '*'
terser: ^5.4.0 terser: ^5.4.0
@ -1614,6 +1607,8 @@ packages:
optional: true optional: true
sass: sass:
optional: true optional: true
sass-embedded:
optional: true
stylus: stylus:
optional: true optional: true
sugarss: sugarss:
@ -1682,7 +1677,7 @@ snapshots:
'@jridgewell/gen-mapping': 0.3.5 '@jridgewell/gen-mapping': 0.3.5
'@jridgewell/trace-mapping': 0.3.25 '@jridgewell/trace-mapping': 0.3.25
'@astrojs/compiler@2.10.1': {} '@astrojs/compiler@2.10.2': {}
'@astrojs/internal-helpers@0.4.1': {} '@astrojs/internal-helpers@0.4.1': {}
@ -1709,9 +1704,9 @@ snapshots:
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
'@astrojs/node@8.3.2(astro@4.13.1)': '@astrojs/node@8.3.2(astro@4.13.2)':
dependencies: dependencies:
astro: 4.13.1 astro: 4.13.2
send: 0.18.0 send: 0.18.0
server-destroy: 1.0.1 server-destroy: 1.0.1
transitivePeerDependencies: transitivePeerDependencies:
@ -1733,8 +1728,6 @@ snapshots:
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
'@ayco/astro-sw@0.0.8': {}
'@babel/code-frame@7.24.7': '@babel/code-frame@7.24.7':
dependencies: dependencies:
'@babel/highlight': 7.24.7 '@babel/highlight': 7.24.7
@ -2174,9 +2167,9 @@ snapshots:
array-iterate@2.0.1: {} array-iterate@2.0.1: {}
astro@4.13.1: astro@4.13.2:
dependencies: dependencies:
'@astrojs/compiler': 2.10.1 '@astrojs/compiler': 2.10.2
'@astrojs/internal-helpers': 0.4.1 '@astrojs/internal-helpers': 0.4.1
'@astrojs/markdown-remark': 5.2.0 '@astrojs/markdown-remark': 5.2.0
'@astrojs/telemetry': 3.1.0 '@astrojs/telemetry': 3.1.0
@ -2231,8 +2224,8 @@ snapshots:
tsconfck: 3.1.1 tsconfck: 3.1.1
unist-util-visit: 5.0.0 unist-util-visit: 5.0.0
vfile: 6.0.2 vfile: 6.0.2
vite: 5.3.5 vite: 5.4.0
vitefu: 0.2.5(vite@5.3.5) vitefu: 0.2.5(vite@5.4.0)
which-pm: 3.0.0 which-pm: 3.0.0
yargs-parser: 21.1.1 yargs-parser: 21.1.1
zod: 3.23.8 zod: 3.23.8
@ -2244,6 +2237,7 @@ snapshots:
- less - less
- lightningcss - lightningcss
- sass - sass
- sass-embedded
- stylus - stylus
- sugarss - sugarss
- supports-color - supports-color
@ -2273,14 +2267,14 @@ snapshots:
browserslist@4.23.3: browserslist@4.23.3:
dependencies: dependencies:
caniuse-lite: 1.0.30001647 caniuse-lite: 1.0.30001651
electron-to-chromium: 1.5.4 electron-to-chromium: 1.5.5
node-releases: 2.0.18 node-releases: 2.0.18
update-browserslist-db: 1.1.0(browserslist@4.23.3) update-browserslist-db: 1.1.0(browserslist@4.23.3)
camelcase@7.0.1: {} camelcase@7.0.1: {}
caniuse-lite@1.0.30001647: {} caniuse-lite@1.0.30001651: {}
ccount@2.0.1: {} ccount@2.0.1: {}
@ -2393,7 +2387,7 @@ snapshots:
ee-first@1.1.1: {} ee-first@1.1.1: {}
electron-to-chromium@1.5.4: {} electron-to-chromium@1.5.5: {}
emoji-regex@10.3.0: {} emoji-regex@10.3.0: {}
@ -3144,7 +3138,7 @@ snapshots:
dependencies: dependencies:
find-up: 4.1.0 find-up: 4.1.0
postcss@8.4.40: postcss@8.4.41:
dependencies: dependencies:
nanoid: 3.3.7 nanoid: 3.3.7
picocolors: 1.0.1 picocolors: 1.0.1
@ -3517,17 +3511,17 @@ snapshots:
unist-util-stringify-position: 4.0.0 unist-util-stringify-position: 4.0.0
vfile-message: 4.0.2 vfile-message: 4.0.2
vite@5.3.5: vite@5.4.0:
dependencies: dependencies:
esbuild: 0.21.5 esbuild: 0.21.5
postcss: 8.4.40 postcss: 8.4.41
rollup: 4.20.0 rollup: 4.20.0
optionalDependencies: optionalDependencies:
fsevents: 2.3.3 fsevents: 2.3.3
vitefu@0.2.5(vite@5.3.5): vitefu@0.2.5(vite@5.4.0):
optionalDependencies: optionalDependencies:
vite: 5.3.5 vite: 5.4.0
web-namespaces@2.0.1: {} web-namespaces@2.0.1: {}