51 Commits

Author SHA1 Message Date
cb183a2cb9 chore(ci): pin calibreapp/image-actions version 2025-03-17 12:47:34 +02:00
2a2ccc9b61 chore(ci): pin pr-lint workflow version 2025-03-17 12:39:59 +02:00
7fd63ed4fe fix(ci): typo 2025-03-07 09:57:50 +02:00
Ismo Vuorinen
f1c3dbbca0 fix(ci): linting workflow fix 2025-03-07 09:54:10 +02:00
Ismo Vuorinen
7a10ea3543 chore(deps): update npm packages 2025-03-07 09:19:01 +02:00
dependabot[bot]
81a9571bfe build(deps): bump esbuild and vite (#47) 2025-03-05 06:50:52 +02:00
renovate[bot]
0c35627ec6 chore(deps): update typescript to 5.8.2 (#46) 2025-03-05 06:46:59 +02:00
cf305598c3 Update pr-lint.yml 2025-03-05 06:43:51 +02:00
renovate[bot]
950423f5d1 chore(deps): update node.js to v22.14.0 (#45)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-12 01:28:12 +02:00
renovate[bot]
f640be60e1 chore(deps): pin dependencies (#44)
* chore(deps): pin dependencies

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(ci): pr-build.yml

* fix(ci): build-and-deploy.yml

---------

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ismo Vuorinen <ismo@ivuorinen.net>
2025-02-09 21:04:17 +02:00
renovate[bot]
d9c1fd4e46 feat(github-action): update actions/stale (v9.0.0 → v9.1.0) (#43) 2025-01-23 15:41:08 +02:00
renovate[bot]
1c8ec0288c chore(deps): update vite to 6.0.9 [security] (#41)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-22 10:06:11 +02:00
renovate[bot]
48620265c6 chore(deps): update node.js to v22.13.1 (#42)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-22 10:04:10 +02:00
renovate[bot]
f485178588 feat(github-action): update release-drafter/release-drafter (v6.0.0 → v6.1.0) (#39)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-21 02:51:22 +00:00
renovate[bot]
ab934c71a1 chore(deps): update typescript to 5.7.2 (#34)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ismo Vuorinen <ismo.vuorinen@vincit.fi>
2025-01-17 15:45:44 +02:00
renovate[bot]
c073121516 chore(deps): update node.js to v22.13.0 (#38)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-08 03:21:39 +02:00
Ismo Vuorinen
f992676949 chore(deps): update npm dependencies 2024-12-19 13:07:02 +02:00
c5d13597b5 chore(deps): update npm deps 2024-12-09 15:23:42 +02:00
renovate[bot]
8a19f6abc0 chore(deps): update node.js to v22.12.0 (#37) 2024-12-04 00:58:47 +02:00
renovate[bot]
53fb2a66f9 chore(deps): update @vue/tsconfig to 0.7.0 (#36) 2024-12-01 09:32:16 +02:00
renovate[bot]
a24b189ff2 chore(deps): update @vue/tsconfig to 0.6.0 (#33) 2024-11-14 02:55:08 +02:00
renovate[bot]
2f8a7341c4 chore(deps): update typescript to 5.6.3 (#29)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-11 10:17:16 +02:00
renovate[bot]
0f253788f2 chore(deps): update node to v22.11.0 (#32) 2024-11-01 21:36:44 +02:00
renovate[bot]
6f6918c6a6 chore(deps): update npm-run-all2 to 7.0.0 (#31) 2024-10-25 10:15:24 +03:00
renovate[bot]
0c9e7e3763 chore(deps): update node to v22.10.0 (#30)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-17 23:37:00 +03:00
Ismo Vuorinen
72d0313022 chore: add release-drafter config 2024-10-10 19:17:37 +03:00
Ismo Vuorinen
6cb649365e chore(lint): prettier 2024-10-09 11:35:56 +03:00
Ismo Vuorinen
261b0310ae chore(workflow): update workflow settings 2024-10-09 11:33:32 +03:00
Ismo Vuorinen
a47b65d961 chore(workflow): update workflow settings 2024-10-09 11:30:48 +03:00
Ismo Vuorinen
6bf2179c06 fix(workflow): build-and-deploy statuses write 2024-10-09 11:21:27 +03:00
Ismo Vuorinen
c072ea3bed fix: change few const values back to let 2024-10-09 11:17:44 +03:00
Ismo Vuorinen
b4d93e7785 chore(deps): update eslint, config and packages 2024-10-09 11:04:00 +03:00
renovate[bot]
1505f463aa chore(deps): update @vue/eslint-config-prettier to 10.0.0 (#27)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-09 10:11:48 +03:00
Ismo Vuorinen
1d75f8c4e5 fix(workflow): pr-lint 2024-09-30 21:51:58 +03:00
c8c37762c1 chore(deps): update dependencies 2024-09-30 10:09:22 +03:00
Ismo Vuorinen
e420a68329 chore(deps): update npm dependencies 2024-09-25 15:04:16 +03:00
Ismo Vuorinen
f010f804ea chore(workflows): move to use node-version-file 2024-09-25 15:04:02 +03:00
dependabot[bot]
7f978e79b4 build(deps): bump rollup from 4.21.3 to 4.22.4 (#26) 2024-09-24 09:44:03 +03:00
renovate[bot]
e481eff279 chore(deps): update node to v22.9.0 (#25)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-18 02:43:23 +03:00
Ismo Vuorinen
cd6e0d7ee1 fix(workflow): pr-lint now installs npm packages 2024-09-17 14:56:26 +03:00
Ismo Vuorinen
be343f9cc5 fix(lint): remove @rushstack/eslint-patch 2024-09-17 14:09:16 +03:00
Ismo Vuorinen
5c8efb89db chore(deps): update packages, use node22 packages 2024-09-17 13:33:20 +03:00
renovate[bot]
9ba9cdbf62 feat(github-action)!: Update peter-evans/create-pull-request ( v6 → v7 ) (#23) 2024-09-03 23:51:47 +03:00
renovate[bot]
f0e6ee2f35 chore(deps): update node to v22.8.0 (#22) 2024-09-03 23:51:12 +03:00
renovate[bot]
473cfee234 feat(github-action)!: Update github/super-linter ( v6 → v7 ) (#21) 2024-08-31 14:58:08 +03:00
renovate[bot]
65d53b994b feat(github-action)!: Update github/super-linter ( v5 → v6 ) (#16) 2024-08-31 14:55:03 +03:00
renovate[bot]
7fc9188227 chore(deps): update node to v22.7.0 (#20)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-23 09:27:10 +03:00
ada9fc0f59 chore(deps): update node to 22, npm packages 2024-08-20 02:34:37 +03:00
Ismo Vuorinen
2b8a6692b8 chore(meta): update renovate.json 2024-07-23 03:58:48 +03:00
renovate[bot]
9e4def0f89 chore(deps): update typescript to 5.5.2 (#18)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-24 10:28:34 +03:00
b2cdc60a6e chore(deps): update dependencies 2024-06-23 01:55:00 +03:00
29 changed files with 2012 additions and 1857 deletions

12
.editorconfig Normal file
View File

@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://editorconfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_size = 2
indent_style = space

1
.envrc Normal file
View File

@@ -0,0 +1 @@
use asdf

View File

@@ -1,15 +0,0 @@
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')
module.exports = {
root: true,
'extends': [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-typescript',
'@vue/eslint-config-prettier/skip-formatting'
],
parserOptions: {
ecmaVersion: 'latest'
}
}

6
.github/linters/.jscpd.json vendored Normal file
View File

@@ -0,0 +1,6 @@
{
"threshold": 5,
"reporters": ["consoleFull"],
"ignore": ["**/__snapshots__/**", "**/node_modules/**"],
"absolute": true
}

32
.github/release-drafter.yml vendored Normal file
View File

@@ -0,0 +1,32 @@
---
name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '🧰 Maintenance'
label: 'chore'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
template: |
## Changes
$CHANGES

View File

@@ -1,4 +1,4 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["github>ivuorinen/.github:renovate-config"]
"extends": ["github>ivuorinen/renovate-config"]
}

View File

@@ -1,4 +1,5 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Build and Deploy Vue Application to Github Pages
on:
# Runs on pushes targeting the default branch
@@ -8,48 +9,48 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
group: 'pages'
cancel-in-progress: false
permissions: read-all
jobs:
build-and-deploy:
runs-on: ubuntu-latest
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
statuses: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
strategy:
matrix:
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup Node.js
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
with:
node-version: ${{ matrix.node-version }}
node-version-file: '.nvmrc'
cache: 'npm'
- run: npm ci
shell: bash
- run: npm run build --if-present
shell: bash
- name: Setup Pages
uses: actions/configure-pages@v5
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
with:
# Upload entire repository
path: './dist/'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4

View File

@@ -6,24 +6,28 @@ on:
workflow_dispatch:
schedule:
- cron: "00 23 * * 0"
permissions: read-all
jobs:
CompressOnDemandOrSchedule:
name: calibreapp/image-actions
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Repo
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Compress Images
id: calibre
uses: calibreapp/image-actions@main
uses: calibreapp/image-actions@737ceeaeed61e17b8d358358a303f1b8d177b779 # 1.1.0
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
compressOnly: true
- name: Create New Pull Request If Needed
if: steps.calibre.outputs.markdown != ''
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7
with:
title: Compressed Images Nightly
branch-suffix: timestamp

View File

@@ -8,19 +8,22 @@
#
# Source repository: https://github.com/actions/dependency-review-action
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
name: "Dependency Review"
name: 'Dependency Review'
on: [pull_request]
permissions:
contents: read
permissions: read-all
jobs:
dependency-review:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: "Checkout Repository"
uses: actions/checkout@v4
- name: 'Checkout Repository'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: "Dependency Review"
uses: actions/dependency-review-action@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4
with:
comment-summary-in-pr: always

View File

@@ -5,24 +5,22 @@ name: Build
on:
pull_request:
branches: ["main"]
branches: ['main']
permissions: read-all
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup Node.js
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
with:
node-version: ${{ matrix.node-version }}
node-version-file: '.nvmrc'
cache: 'npm'
- run: npm ci
shell: bash
- run: npm run build --if-present
shell: bash

View File

@@ -5,26 +5,25 @@ on:
# Run Image Actions when JPG, JPEG, PNG or WebP files are added or changed.
# See https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#onpushpull_requestpaths for reference.
paths:
- "**.jpg"
- "**.jpeg"
- "**.png"
- "**.webp"
- '**.jpg'
- '**.jpeg'
- '**.png'
- '**.webp'
permissions: read-all
jobs:
CompressInPR:
# Only run on Pull Requests within the same repository, and not from forks.
if: github.event.pull_request.head.repo.full_name == github.repository
name: calibreapp/image-actions
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Compress Images
uses: calibreapp/image-actions@main
uses: calibreapp/image-actions@737ceeaeed61e17b8d358358a303f1b8d177b779 # 1.1.0
with:
# The `GITHUB_TOKEN` is automatically generated by GitHub and scoped only to the repository that is
# currently running the action. By default, the action cant update Pull Requests initiated from
# forked repositories.
# See https://docs.github.com/en/actions/reference/authentication-in-a-workflow and
# https://help.github.com/en/articles/virtual-environments-for-github-actions#token-permissions
githubToken: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,68 +1,26 @@
---
#################################
#################################
## Super Linter GitHub Actions ##
#################################
#################################
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Lint Code Base
#
# Documentation:
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
#
env:
MAIN_BRANCH: main
#############################
# Start the job on all push #
#############################
on:
push:
branches-ignore: [master, main]
# Remove the line above to run when pushing to master
branches: [master, main]
pull_request:
branches: [master, main]
###############
# Set the Job #
###############
permissions: read-all
jobs:
build:
# Name the Job
name: Lint Code Base
# Set the agent to run on
lint:
runs-on: ubuntu-latest
############################################
# Grant status permission for MULTI_STATUS #
############################################
permissions:
statuses: write
contents: read
packages: read
statuses: write
##################
# Load all steps #
##################
steps:
##########################
# Checkout the code base #
##########################
- name: Checkout Code
uses: actions/checkout@v4
with:
# Full git history is needed to get a proper
# list of changed files within `super-linter`
fetch-depth: 0
################################
# Run Linter against code base #
################################
- name: Lint Code Base
uses: github/super-linter@v5
env:
VALIDATE_ALL_CODEBASE: false
# Change to 'master' if your main branch differs
DEFAULT_BRANCH: ${{ env.MAIN_BRANCH }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# https://github.com/ivuorinen/actions
- uses: ivuorinen/actions/pr-lint@85811a09abc994fcc6bdb7930faab3678ca9655a # 25.3.13

View File

@@ -4,13 +4,25 @@ name: Release Drafter
# yamllint disable-line rule:truthy
on:
workflow_call:
# pull_request event is required only for autolabeler
pull_request:
# Only following types are handled by the action, but one can default to all as well
types: [opened, reopened, synchronize]
permissions: read-all
jobs:
update_release_draft:
name: ✏️ Draft release
permissions:
# write permission is required to create a github release
contents: write
# write permission is required for autolabeler
# otherwise, read permission is required at least
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: 🚀 Run Release Drafter
uses: release-drafter/release-drafter@v6.0.0
uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5 # v6.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -4,30 +4,30 @@ name: Stale
# yamllint disable-line rule:truthy
on:
schedule:
- cron: "0 8 * * *"
- cron: '0 8 * * *'
workflow_call:
workflow_dispatch:
permissions:
contents: write # only for delete-branch option
issues: write
pull-requests: write
permissions: read-all
jobs:
stale:
name: 🧹 Clean up stale issues and PRs
runs-on: ubuntu-latest
permissions:
contents: write # only for delete-branch option
issues: write
pull-requests: write
steps:
- name: 🚀 Run stale
uses: actions/stale@v9.0.0
uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 30
days-before-close: 7
remove-stale-when-updated: true
stale-issue-label: "stale"
exempt-issue-labels: "no-stale,help-wanted"
stale-issue-label: 'stale'
exempt-issue-labels: 'no-stale,help-wanted'
stale-issue-message: >
There hasn't been any activity on this issue recently, so we
clean up some of the older and inactive issues.
@@ -38,8 +38,8 @@ jobs:
This issue has now been marked as stale and will be closed if no
further activity occurs. Thanks!
stale-pr-label: "stale"
exempt-pr-labels: "no-stale"
stale-pr-label: 'stale'
exempt-pr-labels: 'no-stale'
stale-pr-message: >
There hasn't been any activity on this pull request recently. This
pull request has been automatically marked as stale because of that

1
.nvmrc Normal file
View File

@@ -0,0 +1 @@
22.14.0

3
.prettierignore Normal file
View File

@@ -0,0 +1,3 @@
# Ignore artifacts:
build
coverage

View File

@@ -5,4 +5,4 @@
"singleQuote": true,
"printWidth": 100,
"trailingComma": "none"
}
}

View File

@@ -1,7 +1,3 @@
{
"recommendations": [
"Vue.volar",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
]
"recommendations": ["Vue.volar", "dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
}

26
eslint.config.mjs Normal file
View File

@@ -0,0 +1,26 @@
import pluginVue from 'eslint-plugin-vue'
import vueTsEslintConfig from '@vue/eslint-config-typescript'
import { includeIgnoreFile } from '@eslint/compat'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const gitignorePath = path.resolve(__dirname, '.gitignore')
export default [
includeIgnoreFile(gitignorePath),
{
// your overrides
},
...pluginVue.configs['flat/essential'],
...vueTsEslintConfig({
extends: ['recommended']
}),
{
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'script'
}
}
]

View File

@@ -1,15 +1,16 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" href="favicon.ico">
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
<link rel="manifest" href="site.webmanifest">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8" />
<link rel="icon" href="favicon.ico" />
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png" />
<link rel="manifest" href="site.webmanifest" />
<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>

3219
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -9,26 +9,28 @@
"preview": "vite preview",
"build-only": "vite build",
"type-check": "vue-tsc --build --force",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"format": "prettier --write src/"
"lint": "eslint . --fix",
"format": "prettier --write src/ index.html .github/ .vscode/"
},
"dependencies": {
"vue": "^3.4.21"
},
"devDependencies": {
"@rushstack/eslint-patch": "^1.3.3",
"@tsconfig/node20": "^20.1.2",
"@types/node": "^20.11.28",
"@eslint/compat": "^1.2.0",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.12.0",
"@tsconfig/node22": "^22",
"@types/node": "^22",
"@vitejs/plugin-vue": "^5.0.4",
"@vue/eslint-config-prettier": "^9.0.0",
"@vue/eslint-config-typescript": "^13.0.0",
"@vue/tsconfig": "^0.5.1",
"eslint": "^8.49.0",
"eslint-plugin-vue": "^9.17.0",
"npm-run-all2": "^6.1.2",
"@vue/eslint-config-prettier": "^10",
"@vue/eslint-config-typescript": "^14",
"@vue/tsconfig": "^0.7.0",
"eslint": "^9",
"eslint-plugin-vue": "^9.28.0",
"npm-run-all2": "^7.0.0",
"prettier": "^3.0.3",
"typescript": "~5.4.0",
"vite": "^5.1.6",
"typescript": "~5.8.0",
"vite": "^6",
"vite-plugin-vue-devtools": "^7.0.18",
"vue-tsc": "^2.0.6"
}

View File

@@ -1 +1,11 @@
{"name":"","short_name":"","icons":[{"src":"android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
{
"name": "",
"short_name": "",
"icons": [
{ "src": "android-chrome-192x192.png", "sizes": "192x192", "type": "image/png" },
{ "src": "android-chrome-512x512.png", "sizes": "512x512", "type": "image/png" }
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}

View File

@@ -1,16 +1,18 @@
<script setup lang="ts">
import { ref, watch } from 'vue'
let service = defineModel('service', { default: 'my-service' })
let description = defineModel('description', { default: 'This command does something' })
let username = defineModel('username', { default: 'root' })
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)
const service = defineModel('service', { default: 'my-service' })
const description = defineModel('description', { default: 'This command does something' })
const username = defineModel('username', { default: 'root' })
const command = defineModel('command', { default: '/usr/local/bin/command' })
const servicePath = ref('/etc/init.d/' + service.value)
const logRotatePath = ref('/etc/logrotate.d/' + service.value)
let shellCommands = ref(`sudo chmod +x ${servicePath.value} && sudo update-rc.d ${service.value} defaults`)
const shellCommands = ref(
`sudo chmod +x ${servicePath.value} && sudo update-rc.d ${service.value} defaults`
)
let serviceTemplateString = `#!/usr/bin/env sh
const serviceTemplateString = `#!/usr/bin/env sh
### BEGIN INIT INFO
# Provides: <NAME>
# Required-Start: $local_fs $network $named $time $syslog
@@ -110,7 +112,7 @@ case "$1" in
esac
`
let logRotateString = `/var/log/<NAME>.log {
const logRotateString = `/var/log/<NAME>.log {
rotate 4
weekly
missingok
@@ -127,18 +129,20 @@ let serviceTemplate = serviceTemplateString
let logRotate = logRotateString.replace(/<NAME>/g, service.value)
watch([service, description, username, command], ([newService, newDescription, newUsername, newCommand]) => {
serviceTemplate = serviceTemplateString
.replace(/<NAME>/g, newService)
.replace(/<DESCRIPTION>/g, newDescription)
.replace(/<USERNAME>/g, newUsername)
.replace(/<COMMAND>/g, newCommand)
servicePath.value = '/etc/init.d/' + newService
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`
})
watch(
[service, description, username, command],
([newService, newDescription, newUsername, newCommand]) => {
serviceTemplate = serviceTemplateString
.replace(/<NAME>/g, newService)
.replace(/<DESCRIPTION>/g, newDescription)
.replace(/<USERNAME>/g, newUsername)
.replace(/<COMMAND>/g, newCommand)
servicePath.value = '/etc/init.d/' + newService
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>
Save as: <code>{{ servicePath }}</code>
</div>
<textarea style="height: 400px" v-text="serviceTemplate"></textarea>
<details>
<summary>Logrotate</summary>
<div>Path: <code>{{ logRotatePath }}</code></div>
<div>
Save as: <code>{{ logRotatePath }}</code>
</div>
<textarea class="just-right noresize" v-text="logRotate"></textarea>
</details>
<details>

View File

@@ -1,69 +1,71 @@
/* color palette from <https://github.com/vuejs/theme> */
:root {
--vt-c-white: #ffffff;
--vt-c-white-soft: #f8f8f8;
--vt-c-white-mute: #f2f2f2;
--vt-c-white: #ffffff;
--vt-c-white-soft: #f8f8f8;
--vt-c-white-mute: #f2f2f2;
--vt-c-black: #181818;
--vt-c-black-soft: #222222;
--vt-c-black-mute: #282828;
--vt-c-black: #181818;
--vt-c-black-soft: #222222;
--vt-c-black-mute: #282828;
--vt-c-indigo: #2c3e50;
--vt-c-indigo: #2c3e50;
--vt-c-divider-light-1: rgba(60, 60, 60, 0.29);
--vt-c-divider-light-2: rgba(60, 60, 60, 0.12);
--vt-c-divider-dark-1: rgba(84, 84, 84, 0.65);
--vt-c-divider-dark-2: rgba(84, 84, 84, 0.48);
--vt-c-divider-light-1: rgba(60, 60, 60, 0.29);
--vt-c-divider-light-2: rgba(60, 60, 60, 0.12);
--vt-c-divider-dark-1: rgba(84, 84, 84, 0.65);
--vt-c-divider-dark-2: rgba(84, 84, 84, 0.48);
--vt-c-text-light-1: var(--vt-c-indigo);
--vt-c-text-light-2: rgba(60, 60, 60, 0.66);
--vt-c-text-dark-1: var(--vt-c-white);
--vt-c-text-dark-2: rgba(235, 235, 235, 0.64);
--vt-c-text-light-1: var(--vt-c-indigo);
--vt-c-text-light-2: rgba(60, 60, 60, 0.66);
--vt-c-text-dark-1: var(--vt-c-white);
--vt-c-text-dark-2: rgba(235, 235, 235, 0.64);
/* semantic color variables for this project */
--color-background: var(--vt-c-white);
--color-background-soft: var(--vt-c-white-soft);
--color-background-mute: var(--vt-c-white-mute);
/* semantic color variables for this project */
--color-background: var(--vt-c-white);
--color-background-soft: var(--vt-c-white-soft);
--color-background-mute: var(--vt-c-white-mute);
--color-border: var(--vt-c-divider-light-2);
--color-border-hover: var(--vt-c-divider-light-1);
--color-border: var(--vt-c-divider-light-2);
--color-border-hover: var(--vt-c-divider-light-1);
--color-heading: var(--vt-c-text-light-1);
--color-text: var(--vt-c-text-light-1);
--color-heading: var(--vt-c-text-light-1);
--color-text: var(--vt-c-text-light-1);
--section-gap: 160px;
--section-gap: 160px;
}
@media (prefers-color-scheme: dark) {
:root {
--color-background: var(--vt-c-black);
--color-background-soft: var(--vt-c-black-soft);
--color-background-mute: var(--vt-c-black-mute);
:root {
--color-background: var(--vt-c-black);
--color-background-soft: var(--vt-c-black-soft);
--color-background-mute: var(--vt-c-black-mute);
--color-border: var(--vt-c-divider-dark-2);
--color-border-hover: var(--vt-c-divider-dark-1);
--color-border: var(--vt-c-divider-dark-2);
--color-border-hover: var(--vt-c-divider-dark-1);
--color-heading: var(--vt-c-text-dark-1);
--color-text: var(--vt-c-text-dark-2);
}
--color-heading: var(--vt-c-text-dark-1);
--color-text: var(--vt-c-text-dark-2);
}
}
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
font-weight: normal;
box-sizing: border-box;
margin: 0;
font-weight: normal;
}
body {
min-height: 100vh;
color: var(--color-text);
background: var(--color-background);
transition: color 0.5s,
min-height: 100vh;
color: var(--color-text);
background: var(--color-background);
transition:
color 0.5s,
background-color 0.5s;
line-height: 1.6;
font-family: Inter,
line-height: 1.6;
font-family:
Inter,
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
@@ -75,8 +77,8 @@ body {
'Droid Sans',
'Helvetica Neue',
sans-serif;
font-size: 15px;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-size: 15px;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

View File

@@ -1,102 +1,101 @@
@import './base.css';
#app {
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
font-weight: normal;
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
font-weight: normal;
}
a,
.green {
text-decoration: none;
color: hsla(160, 100%, 37%, 1);
transition: 0.4s;
padding: 3px;
text-decoration: none;
color: hsla(160, 100%, 37%, 1);
transition: 0.4s;
padding: 3px;
}
header {
line-height: 1.2;
line-height: 1.2;
}
label {
display: block;
margin-bottom: 1rem;
display: block;
margin-bottom: 1rem;
input {
display: block;
margin-top: 1rem;
padding: 0.4rem;
font-size: 1rem;
border: 1px solid var(--color-border);
border-radius: 4px;
}
input {
display: block;
margin-top: 1rem;
padding: 0.4rem;
font-size: 1rem;
border: 1px solid var(--color-border);
border-radius: 4px;
}
}
h1 {
font-weight: 500;
font-size: 2.6rem;
margin-bottom: 2rem;
font-weight: 500;
font-size: 2.6rem;
margin-bottom: 2rem;
}
h3 {
font-size: 1.2rem;
font-size: 1.2rem;
}
@media (hover: hover) {
a:hover {
background-color: hsla(160, 100%, 37%, 0.2);
}
a:hover {
background-color: hsla(160, 100%, 37%, 0.2);
}
}
@media (min-width: 1024px) {
body {
display: flex;
place-items: center;
}
body {
display: flex;
place-items: center;
}
#app {
display: grid;
grid-template-columns: 1fr 2fr;
padding: 0 2rem;
}
#app {
display: grid;
grid-template-columns: 1fr 2fr;
padding: 0 2rem;
}
footer {
border-top: 1px solid var(--color-border);
padding-top: 1rem;
grid-column: 1 / -1;
}
footer {
border-top: 1px solid var(--color-border);
padding-top: 1rem;
grid-column: 1 / -1;
}
}
textarea {
width: 100%;
min-width: 100%;
max-width: fit-content;
padding: 1rem;
margin: 1rem 0;
border: 1px solid hsla(160, 100%, 37%, 1);
border-radius: 5px;
background: #222222;
color: #f8f8f8;
font-family: monospace;
width: 100%;
min-width: 100%;
max-width: fit-content;
padding: 1rem;
margin: 1rem 0;
border: 1px solid hsla(160, 100%, 37%, 1);
border-radius: 5px;
background: #222222;
color: #f8f8f8;
font-family: monospace;
&.just-right {
height: fit-content;
min-height: fit-content;
max-height: fit-content;
}
&.just-right {
height: fit-content;
min-height: fit-content;
max-height: fit-content;
}
&.noresize {
resize: none;
}
&.noresize {
resize: none;
}
}
summary {
cursor: pointer;
cursor: pointer;
}
footer {
margin-top: 2rem;
text-align: center;
margin-top: 2rem;
text-align: center;
}

View File

@@ -5,7 +5,6 @@
"compilerOptions": {
"composite": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]

View File

@@ -1,5 +1,5 @@
{
"extends": "@tsconfig/node20/tsconfig.json",
"extends": "@tsconfig/node22/tsconfig.json",
"include": [
"vite.config.*",
"vitest.config.*",
@@ -11,9 +11,10 @@
"composite": true,
"noEmit": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"module": "ESNext",
"moduleResolution": "Bundler",
"types": ["node"]
"types": [
"node"
]
}
}

View File

@@ -6,10 +6,7 @@ import VueDevTools from 'vite-plugin-vue-devtools'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
VueDevTools(),
],
plugins: [vue(), VueDevTools()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))