mirror of
https://github.com/ivuorinen/sysvinit-service-generator.git
synced 2026-01-26 03:24:03 +00:00
chore(deps): update node to 22, npm packages
This commit is contained in:
@@ -3,7 +3,7 @@ require('@rushstack/eslint-patch/modern-module-resolution')
|
||||
|
||||
module.exports = {
|
||||
root: true,
|
||||
'extends': [
|
||||
extends: [
|
||||
'plugin:vue/vue3-essential',
|
||||
'eslint:recommended',
|
||||
'@vue/eslint-config-typescript',
|
||||
|
||||
2
.github/workflows/build-and-deploy.yml
vendored
2
.github/workflows/build-and-deploy.yml
vendored
@@ -30,7 +30,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [20.x]
|
||||
node-version: [22.x]
|
||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||
|
||||
steps:
|
||||
|
||||
2
.github/workflows/pr-build.yml
vendored
2
.github/workflows/pr-build.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [20.x]
|
||||
node-version: [22.x]
|
||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||
|
||||
steps:
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="icon" href="favicon.ico">
|
||||
@@ -10,8 +11,10 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>sysvinit service generator</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
885
package-lock.json
generated
885
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
20
src/App.vue
20
src/App.vue
@@ -8,7 +8,9 @@ let command = defineModel('command', { default: '/usr/local/bin/command' })
|
||||
let servicePath = ref('/etc/init.d/' + service.value)
|
||||
let logRotatePath = ref('/etc/logrotate.d/' + service.value)
|
||||
|
||||
let shellCommands = ref(`sudo chmod +x ${servicePath.value} && sudo update-rc.d ${service.value} defaults`)
|
||||
let shellCommands = ref(
|
||||
`sudo chmod +x ${servicePath.value} && sudo update-rc.d ${service.value} defaults`
|
||||
)
|
||||
|
||||
let serviceTemplateString = `#!/usr/bin/env sh
|
||||
### BEGIN INIT INFO
|
||||
@@ -127,7 +129,9 @@ let serviceTemplate = serviceTemplateString
|
||||
|
||||
let logRotate = logRotateString.replace(/<NAME>/g, service.value)
|
||||
|
||||
watch([service, description, username, command], ([newService, newDescription, newUsername, newCommand]) => {
|
||||
watch(
|
||||
[service, description, username, command],
|
||||
([newService, newDescription, newUsername, newCommand]) => {
|
||||
serviceTemplate = serviceTemplateString
|
||||
.replace(/<NAME>/g, newService)
|
||||
.replace(/<DESCRIPTION>/g, newDescription)
|
||||
@@ -137,8 +141,8 @@ watch([service, description, username, command], ([newService, newDescription, n
|
||||
logRotate = logRotateString.replace(/<NAME>/g, newService)
|
||||
logRotatePath.value = '/etc/logrotate.d/' + newService
|
||||
shellCommands.value = `sudo chmod +x ${servicePath.value} && sudo update-rc.d ${newService} defaults`
|
||||
})
|
||||
|
||||
}
|
||||
)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -168,11 +172,15 @@ watch([service, description, username, command], ([newService, newDescription, n
|
||||
|
||||
<main>
|
||||
<h3>Generated service script:</h3>
|
||||
<div>Path: <code>{{ servicePath }}</code></div>
|
||||
<div>
|
||||
Path: <code>{{ servicePath }}</code>
|
||||
</div>
|
||||
<textarea style="height: 400px" v-text="serviceTemplate"></textarea>
|
||||
<details>
|
||||
<summary>Logrotate</summary>
|
||||
<div>Path: <code>{{ logRotatePath }}</code></div>
|
||||
<div>
|
||||
Path: <code>{{ logRotatePath }}</code>
|
||||
</div>
|
||||
<textarea class="just-right noresize" v-text="logRotate"></textarea>
|
||||
</details>
|
||||
<details>
|
||||
|
||||
@@ -60,10 +60,12 @@ body {
|
||||
min-height: 100vh;
|
||||
color: var(--color-text);
|
||||
background: var(--color-background);
|
||||
transition: color 0.5s,
|
||||
transition:
|
||||
color 0.5s,
|
||||
background-color 0.5s;
|
||||
line-height: 1.6;
|
||||
font-family: Inter,
|
||||
font-family:
|
||||
Inter,
|
||||
-apple-system,
|
||||
BlinkMacSystemFont,
|
||||
'Segoe UI',
|
||||
|
||||
@@ -43,7 +43,6 @@ h3 {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
|
||||
@media (hover: hover) {
|
||||
a:hover {
|
||||
background-color: hsla(160, 100%, 37%, 0.2);
|
||||
|
||||
@@ -1,14 +1,21 @@
|
||||
{
|
||||
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
||||
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
|
||||
"exclude": ["src/**/__tests__/*"],
|
||||
"include": [
|
||||
"env.d.ts",
|
||||
"src/**/*",
|
||||
"src/**/*.vue"
|
||||
],
|
||||
"exclude": [
|
||||
"src/**/__tests__/*"
|
||||
],
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
||||
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": ["./src/*"]
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,9 +11,10 @@
|
||||
"composite": true,
|
||||
"noEmit": true,
|
||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
||||
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
"types": ["node"]
|
||||
"types": [
|
||||
"node"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user