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", "$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 name: Build and Deploy Vue Application to Github Pages
on: on:
# Runs on pushes targeting the default branch # Runs on pushes targeting the default branch
@@ -8,48 +9,48 @@ on:
# Allows you to run this workflow manually from the Actions tab # Allows you to run this workflow manually from the Actions tab
workflow_dispatch: 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. # 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. # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency: concurrency:
group: "pages" group: 'pages'
cancel-in-progress: false cancel-in-progress: false
permissions: read-all
jobs: jobs:
build-and-deploy: build-and-deploy:
runs-on: ubuntu-latest 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: environment:
name: github-pages name: github-pages
url: ${{ steps.deployment.outputs.page_url }} 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: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Use Node.js ${{ matrix.node-version }} - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
with: with:
node-version: ${{ matrix.node-version }} node-version-file: '.nvmrc'
cache: 'npm' cache: 'npm'
- run: npm ci - run: npm ci
shell: bash
- run: npm run build --if-present - run: npm run build --if-present
shell: bash
- name: Setup Pages - name: Setup Pages
uses: actions/configure-pages@v5 uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
- name: Upload artifact - name: Upload artifact
uses: actions/upload-pages-artifact@v3 uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
with: with:
# Upload entire repository # Upload entire repository
path: './dist/' path: './dist/'
- name: Deploy to GitHub Pages - name: Deploy to GitHub Pages
id: deployment id: deployment
uses: actions/deploy-pages@v4 uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4

View File

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

View File

@@ -8,19 +8,22 @@
# #
# Source repository: https://github.com/actions/dependency-review-action # 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 # 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] on: [pull_request]
permissions: permissions: read-all
contents: read
jobs: jobs:
dependency-review: dependency-review:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
pull-requests: write
steps: steps:
- name: "Checkout Repository" - name: 'Checkout Repository'
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: "Dependency Review" - name: 'Dependency Review'
uses: actions/dependency-review-action@v4 uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4
with:
comment-summary-in-pr: always

View File

@@ -5,24 +5,22 @@ name: Build
on: on:
pull_request: pull_request:
branches: ["main"] branches: ['main']
permissions: read-all
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Use Node.js ${{ matrix.node-version }} - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
with: with:
node-version: ${{ matrix.node-version }} node-version-file: '.nvmrc'
cache: 'npm' cache: 'npm'
- run: npm ci - run: npm ci
shell: bash
- run: npm run build --if-present - 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. # 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. # See https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#onpushpull_requestpaths for reference.
paths: paths:
- "**.jpg" - '**.jpg'
- "**.jpeg" - '**.jpeg'
- "**.png" - '**.png'
- "**.webp" - '**.webp'
permissions: read-all
jobs: jobs:
CompressInPR: CompressInPR:
# Only run on Pull Requests within the same repository, and not from forks. # Only run on Pull Requests within the same repository, and not from forks.
if: github.event.pull_request.head.repo.full_name == github.repository if: github.event.pull_request.head.repo.full_name == github.repository
name: calibreapp/image-actions name: calibreapp/image-actions
permissions: write-all
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout Repo - name: Checkout Repo
uses: actions/checkout@v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Compress Images - name: Compress Images
uses: calibreapp/image-actions@main uses: calibreapp/image-actions@737ceeaeed61e17b8d358358a303f1b8d177b779 # 1.1.0
with: 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 }} githubToken: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,68 +1,26 @@
--- ---
################################# # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
#################################
## Super Linter GitHub Actions ##
#################################
#################################
name: Lint Code Base name: Lint Code Base
#
# Documentation:
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
#
env: env:
MAIN_BRANCH: main MAIN_BRANCH: main
#############################
# Start the job on all push #
#############################
on: on:
push: push:
branches-ignore: [master, main] branches: [master, main]
# Remove the line above to run when pushing to master
pull_request: pull_request:
branches: [master, main] branches: [master, main]
############### permissions: read-all
# Set the Job #
###############
jobs: jobs:
build: lint:
# Name the Job
name: Lint Code Base
# Set the agent to run on
runs-on: ubuntu-latest runs-on: ubuntu-latest
############################################
# Grant status permission for MULTI_STATUS #
############################################
permissions: permissions:
statuses: write
contents: read contents: read
packages: read packages: read
statuses: write
##################
# Load all steps #
##################
steps: steps:
########################## # https://github.com/ivuorinen/actions
# Checkout the code base # - uses: ivuorinen/actions/pr-lint@85811a09abc994fcc6bdb7930faab3678ca9655a # 25.3.13
##########################
- 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 }}

View File

@@ -4,13 +4,25 @@ name: Release Drafter
# yamllint disable-line rule:truthy # yamllint disable-line rule:truthy
on: on:
workflow_call: 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: jobs:
update_release_draft: update_release_draft:
name: ✏️ Draft release 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 runs-on: ubuntu-latest
steps: steps:
- name: 🚀 Run Release Drafter - name: 🚀 Run Release Drafter
uses: release-drafter/release-drafter@v6.0.0 uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5 # v6.1.0
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

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

View File

@@ -1,7 +1,3 @@
{ {
"recommendations": [ "recommendations": ["Vue.volar", "dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
"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"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8" />
<link rel="icon" href="favicon.ico"> <link rel="icon" href="favicon.ico" />
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png"> <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="32x32" href="favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png"> <link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png" />
<link rel="manifest" href="site.webmanifest"> <link rel="manifest" href="site.webmanifest" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>sysvinit service generator</title> <title>sysvinit service generator</title>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
<script type="module" src="/src/main.ts"></script> <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", "preview": "vite preview",
"build-only": "vite build", "build-only": "vite build",
"type-check": "vue-tsc --build --force", "type-check": "vue-tsc --build --force",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore", "lint": "eslint . --fix",
"format": "prettier --write src/" "format": "prettier --write src/ index.html .github/ .vscode/"
}, },
"dependencies": { "dependencies": {
"vue": "^3.4.21" "vue": "^3.4.21"
}, },
"devDependencies": { "devDependencies": {
"@rushstack/eslint-patch": "^1.3.3", "@eslint/compat": "^1.2.0",
"@tsconfig/node20": "^20.1.2", "@eslint/eslintrc": "^3.1.0",
"@types/node": "^20.11.28", "@eslint/js": "^9.12.0",
"@tsconfig/node22": "^22",
"@types/node": "^22",
"@vitejs/plugin-vue": "^5.0.4", "@vitejs/plugin-vue": "^5.0.4",
"@vue/eslint-config-prettier": "^9.0.0", "@vue/eslint-config-prettier": "^10",
"@vue/eslint-config-typescript": "^13.0.0", "@vue/eslint-config-typescript": "^14",
"@vue/tsconfig": "^0.5.1", "@vue/tsconfig": "^0.7.0",
"eslint": "^8.49.0", "eslint": "^9",
"eslint-plugin-vue": "^9.17.0", "eslint-plugin-vue": "^9.28.0",
"npm-run-all2": "^6.1.2", "npm-run-all2": "^7.0.0",
"prettier": "^3.0.3", "prettier": "^3.0.3",
"typescript": "~5.4.0", "typescript": "~5.8.0",
"vite": "^5.1.6", "vite": "^6",
"vite-plugin-vue-devtools": "^7.0.18", "vite-plugin-vue-devtools": "^7.0.18",
"vue-tsc": "^2.0.6" "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"> <script setup lang="ts">
import { ref, watch } from 'vue' import { ref, watch } from 'vue'
let service = defineModel('service', { default: 'my-service' }) const service = defineModel('service', { default: 'my-service' })
let description = defineModel('description', { default: 'This command does something' }) const description = defineModel('description', { default: 'This command does something' })
let username = defineModel('username', { default: 'root' }) const username = defineModel('username', { default: 'root' })
let command = defineModel('command', { default: '/usr/local/bin/command' }) const command = defineModel('command', { default: '/usr/local/bin/command' })
let servicePath = ref('/etc/init.d/' + service.value ) const servicePath = ref('/etc/init.d/' + service.value)
let logRotatePath = ref('/etc/logrotate.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 ### BEGIN INIT INFO
# Provides: <NAME> # Provides: <NAME>
# Required-Start: $local_fs $network $named $time $syslog # Required-Start: $local_fs $network $named $time $syslog
@@ -110,7 +112,7 @@ case "$1" in
esac esac
` `
let logRotateString = `/var/log/<NAME>.log { const logRotateString = `/var/log/<NAME>.log {
rotate 4 rotate 4
weekly weekly
missingok missingok
@@ -127,18 +129,20 @@ let serviceTemplate = serviceTemplateString
let logRotate = logRotateString.replace(/<NAME>/g, service.value) let logRotate = logRotateString.replace(/<NAME>/g, service.value)
watch([service, description, username, command], ([newService, newDescription, newUsername, newCommand]) => { watch(
serviceTemplate = serviceTemplateString [service, description, username, command],
.replace(/<NAME>/g, newService) ([newService, newDescription, newUsername, newCommand]) => {
.replace(/<DESCRIPTION>/g, newDescription) serviceTemplate = serviceTemplateString
.replace(/<USERNAME>/g, newUsername) .replace(/<NAME>/g, newService)
.replace(/<COMMAND>/g, newCommand) .replace(/<DESCRIPTION>/g, newDescription)
servicePath.value = '/etc/init.d/' + newService .replace(/<USERNAME>/g, newUsername)
logRotate = logRotateString.replace(/<NAME>/g, newService) .replace(/<COMMAND>/g, newCommand)
logRotatePath.value = '/etc/logrotate.d/' + newService servicePath.value = '/etc/init.d/' + newService
shellCommands.value = `sudo chmod +x ${servicePath.value} && sudo update-rc.d ${newService} defaults` 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> </script>
<template> <template>
@@ -168,11 +172,15 @@ watch([service, description, username, command], ([newService, newDescription, n
<main> <main>
<h3>Generated service script:</h3> <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> <textarea style="height: 400px" v-text="serviceTemplate"></textarea>
<details> <details>
<summary>Logrotate</summary> <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> <textarea class="just-right noresize" v-text="logRotate"></textarea>
</details> </details>
<details> <details>

View File

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

View File

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

View File

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

View File

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

View File

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