fix: get esm modules bundled correctly

This commit is contained in:
Alexis Tyler
2021-07-05 16:55:32 +09:30
parent 81014d7f50
commit 22b5b8bfc7
5 changed files with 72 additions and 17 deletions

View File

@@ -29,7 +29,7 @@ const thisDir = __dirname;
// This will allow `PATHS_` to be set an as env
// e.g. unraid-version = PATHS_UNRAID_VERSION
const addEnvPaths = ([key, value]: [keyof Paths, string]): [keyof Paths, string] => {
const fullKey = `PATHS_${key.replace('-', '_').toUpperCase()}`;
const fullKey = `PATHS_${key.replace(/-/g, '_').toUpperCase()}`;
return [key, process.env[fullKey] ?? value];
};

View File

@@ -8,12 +8,14 @@ type Subscription {
services: [Service!]
}
type Uptime {
timestamp: DateTime
seconds: Int
}
type Service {
name: String!
online: Boolean
uptime: {
timestamp: DateTime
seconds: Int
}
uptime: Uptime
version: String
}

View File

@@ -8,4 +8,8 @@ avatar="https://via.placeholder.com/200"
regWizTime="1611175408732_0951-1653-3509-FBA155FA23C0"
event="REG_WIZARD"
keyfile="_____________________EVEN_BIGGER_KEY_HERE_________________________"
license=""
license=""
[upc]
apikey="unupc_5239e6c0cd18221202174e80b56ded12956b700b92bea1b529836b4d3c"
[notifier]
apikey="unnotify_675cd11051f572ee83a5ce3400b9fb4d6518763c34ce2dc9d2384ba"

67
package-lock.json generated
View File

@@ -10434,19 +10434,52 @@
}
},
"p-props": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/p-props/-/p-props-4.0.0.tgz",
"integrity": "sha512-3iKFbPdoPG7Ne3cMA53JnjPsTMaIzE9gxKZnvKJJivTAeqLEZPBu6zfi6DYq9AsH1nYycWmo3sWCNI8Kz6T2Zg==",
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/p-props/-/p-props-5.0.0.tgz",
"integrity": "sha512-teg4j2sNFp+tHIswvsDj7T2SpUQyFLaC80svJbZNxFuFLvOx88n/7k6Oakbx/yKcjRPbdOSd71AsglFf63g2Ag==",
"dev": true,
"requires": {
"p-map": "^4.0.0"
"p-map": "^5.0.0"
},
"dependencies": {
"p-map": {
"aggregate-error": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz",
"integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==",
"resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-4.0.0.tgz",
"integrity": "sha512-8DGp7zUt1E9k0NE2q4jlXHk+V3ORErmwolEdRz9iV+LKJ40WhMHh92cxAvhqV2I+zEn/gotIoqoMs0NjF3xofg==",
"dev": true,
"requires": {
"aggregate-error": "^3.0.0"
"clean-stack": "^4.0.0",
"indent-string": "^5.0.0"
}
},
"clean-stack": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-4.1.0.tgz",
"integrity": "sha512-dxXQYI7mfQVcaF12s6sjNFoZ6ZPDQuBBLp3QJ5156k9EvUFClUoZ11fo8HnLQO241DDVntHEug8MOuFO5PSfRg==",
"dev": true,
"requires": {
"escape-string-regexp": "5.0.0"
}
},
"escape-string-regexp": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
"integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==",
"dev": true
},
"indent-string": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz",
"integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==",
"dev": true
},
"p-map": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/p-map/-/p-map-5.0.0.tgz",
"integrity": "sha512-FeQNuFp/ecZidgaTXc65qXdTGD7mniwgzZNq5czwcJSy6ClETr2v3y4ZQESGe8C1038XhO/fjfKOyiTNH3d0/g==",
"dev": true,
"requires": {
"aggregate-error": "^4.0.0"
}
}
}
@@ -10465,6 +10498,21 @@
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="
},
"p-wait-for": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/p-wait-for/-/p-wait-for-4.0.0.tgz",
"integrity": "sha512-nNTv4xr44ZCilARTe9Bbh0+Ou5D2O1y8CPUsgH7ok6r1F7pSHM7pkOjaySgrW+sq3l4NEMFtLu8u8rgHm6TK5w==",
"requires": {
"p-timeout": "^5.0.0"
},
"dependencies": {
"p-timeout": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-5.0.0.tgz",
"integrity": "sha512-z+bU/N7L1SABsqKnQzvAnINgPX7NHdzwUV+gHyJE7VGNDZSr03rhcPODCZSWiiT9k+gf74QPmzcZzqJRvxYZow=="
}
}
},
"package-hash": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz",
@@ -10608,7 +10656,8 @@
"path-type": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/path-type/-/path-type-5.0.0.tgz",
"integrity": "sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg=="
"integrity": "sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==",
"dev": true
},
"performance-now": {
"version": "2.1.0",

View File

@@ -105,10 +105,8 @@
"number-to-color": "^0.5.0",
"observable-to-promise": "^1.0.0",
"p-iteration": "^1.1.8",
"p-props": "^4.0.0",
"package-json": "^7.0.0",
"path-exists": "^4.0.0",
"path-type": "^5.0.0",
"pidusage": "^2.0.21",
"pify": "^5.0.0",
"pretty-bytes": "^5.6.0",
@@ -152,6 +150,8 @@
"modclean": "^3.0.0-beta.1",
"node-env-run": "^4.0.2",
"p-each-series": "^3.0.0",
"p-props": "^5.0.0",
"path-type": "^5.0.0",
"source-map-support": "0.5.19",
"standard-version": "^9.1.1",
"supertest": "^6.1.3",