@kitschpatrol/create-project 1.2.8 → 1.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +9 -8
- package/templates/cli/.github/workflows/set-github-metadata.yml +1 -1
- package/templates/cli/.vscode/settings.json +3 -3
- package/templates/cli/package.json +6 -6
- package/templates/cli/src/index.ts +1 -1
- package/templates/cli/tsdown.config.ts +0 -2
- package/templates/cli+library/.github/workflows/set-github-metadata.yml +1 -1
- package/templates/cli+library/.vscode/settings.json +3 -3
- package/templates/cli+library/package.json +6 -6
- package/templates/cli+library/src/lib/log.ts +2 -1
- package/templates/electron/.github/workflows/set-github-metadata.yml +1 -1
- package/templates/electron/.vscode/settings.json +3 -3
- package/templates/electron/package.json +8 -8
- package/templates/library/.github/workflows/set-github-metadata.yml +1 -1
- package/templates/library/.vscode/settings.json +3 -3
- package/templates/library/package.json +6 -6
- package/templates/library/src/log.ts +2 -1
- package/templates/minimal/.github/workflows/set-github-metadata.yml +1 -1
- package/templates/minimal/.vscode/settings.json +3 -3
- package/templates/minimal/package.json +4 -4
- package/templates/unplugin/.github/workflows/set-github-metadata.yml +1 -1
- package/templates/unplugin/.vscode/settings.json +3 -3
- package/templates/unplugin/eslint.config.ts +1 -1
- package/templates/unplugin/knip.config.ts +1 -1
- package/templates/unplugin/package.json +8 -7
- package/templates/unplugin/src/bun.ts +20 -0
- package/templates/unplugin/src/core/options.ts +1 -1
- package/templates/unplugin/src/index.ts +10 -7
- package/templates/web/.github/workflows/set-github-metadata.yml +1 -1
- package/templates/web/.vscode/settings.json +3 -3
- package/templates/web/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{createTemplate as e,runTemplateCLI as t}from"bingo";import{intakeDirectory as n}from"bingo-fs";import{handlebars as r}from"bingo-handlebars";import i from"node:path";import{z as a}from"zod";var o=e({about:{description:`Create a new TypeScript library, CLI, or web project with Kitschpatrol's shared configuration.`,name:`Create Kitschpatrol Project`},options:{type:a.enum([`minimal`,`web`,`cli`,`library`,`cli+library`,`electron`,`unplugin`]).default(`minimal`).describe(`The type of project to create`),"author-name":a.string().default(`Eric Mika`).describe(`The name of the author`),"author-email":a.string().default(`eric@ericmika.com`).describe(`The email of the author`),"author-url":a.string().default(`https://ericmika.com`).describe(`The URL of the author`),"cli-command-name":a.string().default(`new-project`).describe(`CLI command name (if applicable)`),"github-owner":a.string().default(`kitschpatrol`).describe(`The owner of the repository`),"github-repository":a.string().default(`new-project`).describe(`The name of the repository / package`),"npm-auth-command":a.string().default(`op read 'op://Personal/npm/token'`).describe(`A shell command that sets the NPM_AUTH_TOKEN env variable with a granular token for publishing to npm`)},async produce({options:e}){let t={...e,year:new Date().getFullYear()};async function a(...n){let a={};for(let o of n)a[o]=await r(i.join(import.meta.dirname,`../templates/${e.type}/${o}`),t);return a}return{files:{...await n(i.join(import.meta.dirname,`../templates/${e.type}`),{exclude:/node_modules|pnpm-lock\.yaml/}),...await a(`license.txt`,`package.json`,...e.type===`unplugin`?[`src/esbuild.ts`,`src/farm.ts`,`src/index.ts`,`src/rolldown.ts`,`src/rollup.ts`,`src/rspack.ts`,`src/vite.ts`,`src/webpack.ts`,`
|
|
2
|
+
import{createTemplate as e,runTemplateCLI as t}from"bingo";import{intakeDirectory as n}from"bingo-fs";import{handlebars as r}from"bingo-handlebars";import i from"node:path";import{z as a}from"zod";var o=e({about:{description:`Create a new TypeScript library, CLI, or web project with Kitschpatrol's shared configuration.`,name:`Create Kitschpatrol Project`},options:{type:a.enum([`minimal`,`web`,`cli`,`library`,`cli+library`,`electron`,`unplugin`]).default(`minimal`).describe(`The type of project to create`),"author-name":a.string().default(`Eric Mika`).describe(`The name of the author`),"author-email":a.string().default(`eric@ericmika.com`).describe(`The email of the author`),"author-url":a.string().default(`https://ericmika.com`).describe(`The URL of the author`),"cli-command-name":a.string().default(`new-project`).describe(`CLI command name (if applicable)`),"github-owner":a.string().default(`kitschpatrol`).describe(`The owner of the repository`),"github-repository":a.string().default(`new-project`).describe(`The name of the repository / package`),"npm-auth-command":a.string().default(`op read 'op://Personal/npm/token'`).describe(`A shell command that sets the NPM_AUTH_TOKEN env variable with a granular token for publishing to npm`)},async produce({options:e}){let t={...e,year:new Date().getFullYear()};async function a(...n){let a={};for(let o of n)a[o]=await r(i.join(import.meta.dirname,`../templates/${e.type}/${o}`),t);return a}return{files:{...await n(i.join(import.meta.dirname,`../templates/${e.type}`),{exclude:/node_modules|pnpm-lock\.yaml/}),...await a(`license.txt`,`package.json`,...e.type===`unplugin`?[`src/bun.ts`,`src/esbuild.ts`,`src/farm.ts`,`src/index.ts`,`src/rolldown.ts`,`src/rollup.ts`,`src/rspack.ts`,`src/vite.ts`,`src/webpack.ts`,`test/__snapshots__/rollup.test.ts.snap`]:[])},scripts:[{commands:e.type===`electron`?[`pnpm install`,`pnpm run fix`]:[`pnpm install`,`pnpm run build`,`pnpm run fix`],phase:0,silent:!0}],suggestions:[`git commit --amend -m 'Initial commit.'`]}}});process.exitCode=await t(o);export{};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitschpatrol/create-project",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.9",
|
|
4
4
|
"description": "Kitschpatrol's TypeScript project templates.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
"zod": "^3.25.76"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@kitschpatrol/shared-config": "^6.0.
|
|
39
|
-
"@types/node": "~20.19.
|
|
40
|
-
"bumpp": "^
|
|
41
|
-
"mdat": "^1.4.
|
|
38
|
+
"@kitschpatrol/shared-config": "^6.0.3",
|
|
39
|
+
"@types/node": "~20.19.37",
|
|
40
|
+
"bumpp": "^11.0.1",
|
|
41
|
+
"mdat": "^1.4.1",
|
|
42
42
|
"taze": "^19.10.0",
|
|
43
|
-
"tsdown": "^0.21.
|
|
43
|
+
"tsdown": "^0.21.4",
|
|
44
44
|
"typescript": "~5.9.3",
|
|
45
|
-
"vitest": "^4.0
|
|
45
|
+
"vitest": "^4.1.0"
|
|
46
46
|
},
|
|
47
47
|
"engines": {
|
|
48
48
|
"node": ">=20.19.0"
|
|
@@ -63,6 +63,7 @@
|
|
|
63
63
|
"lint": "ksc-repo lint ; mdat readme check readme.md ; ksc-typescript lint ; ksc-eslint lint ; ksc-stylelint lint ; ksc-cspell lint ; ksc-knip lint ; ksc-prettier lint",
|
|
64
64
|
"release": "bumpp --commit 'Release: %s' && pnpm run build && NPM_AUTH_TOKEN=$(op read 'op://Personal/npm/token') && pnpm publish",
|
|
65
65
|
"test": "vitest run",
|
|
66
|
-
"update-templates": "for dir in ./templates/*; do taze -w --cwd \"$dir\"; done"
|
|
66
|
+
"update-templates": "for dir in ./templates/*; do taze -w --cwd \"$dir\"; done",
|
|
67
|
+
"update-templates-major": "for dir in ./templates/*; do taze major -w --cwd \"$dir\" --exclude @types/node; done"
|
|
67
68
|
}
|
|
68
69
|
}
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
".env": ".env.*, .template.env",
|
|
51
51
|
"*.js": "${basename}.ts.map, ${basename}.js.map, ${basename}.d.ts, ${basename}.d.ts.map, ${basename}.d.js.map",
|
|
52
52
|
"*.ts": "${basename}.ts.map, ${basename}.d.ts, ${basename}.d.ts.map",
|
|
53
|
-
"package.json": ".*.cjs, .*.cts, .*.js, .*.json, .*.json5, .*.jsonc, .*.mjs, .*.mts, .*.toml, .*.ts, .*.yaml, .*.yml, .*ignore, .*rc, .node-version, *config.cjs, *config.cts, *config.js, *config.json, *config.json5, *config.jsonc, *config.mjs, *config.mts, *config.toml, *config.ts, *config.yaml, *config.yml, tsconfig.*.json, lerna.json, netlify.toml, package-lock.json, pnpm*, turbo.json, vercel.json, workspace*, wrangler.toml, wrangler.json, wrangler.jsonc, yarn.lock, yarn*",
|
|
53
|
+
"package.json": ".*.cjs, .*.cts, .*.js, .*.json, .*.json5, .*.jsonc, .*.mjs, .*.mts, .*.toml, .*.ts, .*.yaml, .*.yml, .*ignore, .*rc, .node-version, *config.cjs, *config.cts, *config.js, *config.json, *config.json5, *config.jsonc, *config.mjs, *config.mts, *config.toml, *config.ts, *config.yaml, *config.yml, tsconfig.*.json, lerna.json, netlify.toml, package-lock.json, pnpm*, skills-lock.json, turbo.json, vercel.json, workspace*, wrangler.toml, wrangler.json, wrangler.jsonc, yarn.lock, yarn*",
|
|
54
54
|
"readme.md": "authors*, backers*, changelog*, citation*, code_of_conduct*, contributing*, contributors*, copying*, credits*, governance*, history*, license*, maintainers*, release_notes*, security*, sponsors*"
|
|
55
55
|
},
|
|
56
56
|
"prettier.documentSelectors": [
|
|
@@ -65,6 +65,6 @@
|
|
|
65
65
|
"prettier.enable": true,
|
|
66
66
|
"stylelint.enable": true,
|
|
67
67
|
"stylelint.validate": ["css", "html", "svelte", "astro"],
|
|
68
|
-
"
|
|
69
|
-
"
|
|
68
|
+
"js/ts.tsdk.promptToUseWorkspaceVersion": true,
|
|
69
|
+
"js/ts.tsdk.path": "node_modules/typescript/lib"
|
|
70
70
|
}
|
|
@@ -35,21 +35,21 @@
|
|
|
35
35
|
"test": "vitest run"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@types/node": "~20.19.
|
|
38
|
+
"@types/node": "~20.19.37",
|
|
39
39
|
"@types/yargs": "^17.0.35",
|
|
40
40
|
"lognow": "^0.5.2",
|
|
41
41
|
"yargs": "^18.0.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@kitschpatrol/shared-config": "^6.0.
|
|
45
|
-
"bumpp": "^
|
|
44
|
+
"@kitschpatrol/shared-config": "^6.0.3",
|
|
45
|
+
"bumpp": "^11.0.1",
|
|
46
46
|
"mdat-plugin-cli-help": "^1.0.7",
|
|
47
47
|
"publint": "^0.3.18",
|
|
48
|
-
"tsdown": "^0.21.
|
|
48
|
+
"tsdown": "^0.21.4",
|
|
49
49
|
"typescript": "~5.9.3",
|
|
50
|
-
"vitest": "^4.0
|
|
50
|
+
"vitest": "^4.1.0"
|
|
51
51
|
},
|
|
52
|
-
"packageManager": "pnpm@10.
|
|
52
|
+
"packageManager": "pnpm@10.32.1",
|
|
53
53
|
"engines": {
|
|
54
54
|
"node": ">=20.19.0"
|
|
55
55
|
},
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { log, setDefaultLogOptions } from 'lognow'
|
|
4
4
|
import yargs from 'yargs'
|
|
5
5
|
import { hideBin } from 'yargs/helpers'
|
|
6
|
-
import { bin, version } from '../package.json'
|
|
6
|
+
import { bin, version } from '../package.json' with { type: 'json' }
|
|
7
7
|
|
|
8
8
|
const cliCommandName = Object.keys(bin).at(0)!
|
|
9
9
|
const yargsInstance = yargs(hideBin(process.argv))
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
".env": ".env.*, .template.env",
|
|
51
51
|
"*.js": "${basename}.ts.map, ${basename}.js.map, ${basename}.d.ts, ${basename}.d.ts.map, ${basename}.d.js.map",
|
|
52
52
|
"*.ts": "${basename}.ts.map, ${basename}.d.ts, ${basename}.d.ts.map",
|
|
53
|
-
"package.json": ".*.cjs, .*.cts, .*.js, .*.json, .*.json5, .*.jsonc, .*.mjs, .*.mts, .*.toml, .*.ts, .*.yaml, .*.yml, .*ignore, .*rc, .node-version, *config.cjs, *config.cts, *config.js, *config.json, *config.json5, *config.jsonc, *config.mjs, *config.mts, *config.toml, *config.ts, *config.yaml, *config.yml, tsconfig.*.json, lerna.json, netlify.toml, package-lock.json, pnpm*, turbo.json, vercel.json, workspace*, wrangler.toml, wrangler.json, wrangler.jsonc, yarn.lock, yarn*",
|
|
53
|
+
"package.json": ".*.cjs, .*.cts, .*.js, .*.json, .*.json5, .*.jsonc, .*.mjs, .*.mts, .*.toml, .*.ts, .*.yaml, .*.yml, .*ignore, .*rc, .node-version, *config.cjs, *config.cts, *config.js, *config.json, *config.json5, *config.jsonc, *config.mjs, *config.mts, *config.toml, *config.ts, *config.yaml, *config.yml, tsconfig.*.json, lerna.json, netlify.toml, package-lock.json, pnpm*, skills-lock.json, turbo.json, vercel.json, workspace*, wrangler.toml, wrangler.json, wrangler.jsonc, yarn.lock, yarn*",
|
|
54
54
|
"readme.md": "authors*, backers*, changelog*, citation*, code_of_conduct*, contributing*, contributors*, copying*, credits*, governance*, history*, license*, maintainers*, release_notes*, security*, sponsors*"
|
|
55
55
|
},
|
|
56
56
|
"prettier.documentSelectors": [
|
|
@@ -65,6 +65,6 @@
|
|
|
65
65
|
"prettier.enable": true,
|
|
66
66
|
"stylelint.enable": true,
|
|
67
67
|
"stylelint.validate": ["css", "html", "svelte", "astro"],
|
|
68
|
-
"
|
|
69
|
-
"
|
|
68
|
+
"js/ts.tsdk.promptToUseWorkspaceVersion": true,
|
|
69
|
+
"js/ts.tsdk.path": "node_modules/typescript/lib"
|
|
70
70
|
}
|
|
@@ -44,22 +44,22 @@
|
|
|
44
44
|
"test": "vitest run"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@types/node": "~20.19.
|
|
47
|
+
"@types/node": "~20.19.37",
|
|
48
48
|
"@types/yargs": "^17.0.35",
|
|
49
49
|
"lognow": "^0.5.2",
|
|
50
50
|
"yargs": "^18.0.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@arethetypeswrong/core": "^0.18.2",
|
|
54
|
-
"@kitschpatrol/shared-config": "^6.0.
|
|
55
|
-
"bumpp": "^
|
|
54
|
+
"@kitschpatrol/shared-config": "^6.0.3",
|
|
55
|
+
"bumpp": "^11.0.1",
|
|
56
56
|
"mdat-plugin-cli-help": "^1.0.7",
|
|
57
57
|
"publint": "^0.3.18",
|
|
58
|
-
"tsdown": "^0.21.
|
|
58
|
+
"tsdown": "^0.21.4",
|
|
59
59
|
"typescript": "~5.9.3",
|
|
60
|
-
"vitest": "^4.0
|
|
60
|
+
"vitest": "^4.1.0"
|
|
61
61
|
},
|
|
62
|
-
"packageManager": "pnpm@10.
|
|
62
|
+
"packageManager": "pnpm@10.32.1",
|
|
63
63
|
"engines": {
|
|
64
64
|
"node": ">=20.19.0"
|
|
65
65
|
},
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { ILogBasic, ILogLayer } from 'lognow'
|
|
2
2
|
import { createLogger, injectionHelper } from 'lognow'
|
|
3
|
+
import { name } from '../../package.json' with { type: 'json' }
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* The default logger instance for the library.
|
|
6
7
|
*/
|
|
7
|
-
export let log = createLogger()
|
|
8
|
+
export let log = createLogger(name)
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Set the logger instance for the module.
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
".env": ".env.*, .template.env",
|
|
51
51
|
"*.js": "${basename}.ts.map, ${basename}.js.map, ${basename}.d.ts, ${basename}.d.ts.map, ${basename}.d.js.map",
|
|
52
52
|
"*.ts": "${basename}.ts.map, ${basename}.d.ts, ${basename}.d.ts.map",
|
|
53
|
-
"package.json": ".*.cjs, .*.cts, .*.js, .*.json, .*.json5, .*.jsonc, .*.mjs, .*.mts, .*.toml, .*.ts, .*.yaml, .*.yml, .*ignore, .*rc, .node-version, *config.cjs, *config.cts, *config.js, *config.json, *config.json5, *config.jsonc, *config.mjs, *config.mts, *config.toml, *config.ts, *config.yaml, *config.yml, tsconfig.*.json, lerna.json, netlify.toml, package-lock.json, pnpm*, turbo.json, vercel.json, workspace*, wrangler.toml, wrangler.json, wrangler.jsonc, yarn.lock, yarn*",
|
|
53
|
+
"package.json": ".*.cjs, .*.cts, .*.js, .*.json, .*.json5, .*.jsonc, .*.mjs, .*.mts, .*.toml, .*.ts, .*.yaml, .*.yml, .*ignore, .*rc, .node-version, *config.cjs, *config.cts, *config.js, *config.json, *config.json5, *config.jsonc, *config.mjs, *config.mts, *config.toml, *config.ts, *config.yaml, *config.yml, tsconfig.*.json, lerna.json, netlify.toml, package-lock.json, pnpm*, skills-lock.json, turbo.json, vercel.json, workspace*, wrangler.toml, wrangler.json, wrangler.jsonc, yarn.lock, yarn*",
|
|
54
54
|
"readme.md": "authors*, backers*, changelog*, citation*, code_of_conduct*, contributing*, contributors*, copying*, credits*, governance*, history*, license*, maintainers*, release_notes*, security*, sponsors*"
|
|
55
55
|
},
|
|
56
56
|
"prettier.documentSelectors": [
|
|
@@ -65,6 +65,6 @@
|
|
|
65
65
|
"prettier.enable": true,
|
|
66
66
|
"stylelint.enable": true,
|
|
67
67
|
"stylelint.validate": ["css", "html", "svelte", "astro"],
|
|
68
|
-
"
|
|
69
|
-
"
|
|
68
|
+
"js/ts.tsdk.promptToUseWorkspaceVersion": true,
|
|
69
|
+
"js/ts.tsdk.path": "node_modules/typescript/lib"
|
|
70
70
|
}
|
|
@@ -31,20 +31,20 @@
|
|
|
31
31
|
"test": "vitest run"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@types/node": "~22.19.
|
|
34
|
+
"@types/node": "~22.19.15",
|
|
35
35
|
"lognow": "^0.5.2"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@kitschpatrol/shared-config": "^6.0.
|
|
39
|
-
"bumpp": "^
|
|
40
|
-
"electron": "^
|
|
38
|
+
"@kitschpatrol/shared-config": "^6.0.3",
|
|
39
|
+
"bumpp": "^11.0.1",
|
|
40
|
+
"electron": "^41.0.3",
|
|
41
41
|
"electron-builder": "^26.8.1",
|
|
42
42
|
"typescript": "~5.9.3",
|
|
43
|
-
"vite": "
|
|
44
|
-
"vite-plugin-electron": "^0.29.
|
|
45
|
-
"vitest": "^4.0
|
|
43
|
+
"vite": "^8.0.1",
|
|
44
|
+
"vite-plugin-electron": "^0.29.1",
|
|
45
|
+
"vitest": "^4.1.0"
|
|
46
46
|
},
|
|
47
|
-
"packageManager": "pnpm@10.
|
|
47
|
+
"packageManager": "pnpm@10.32.1",
|
|
48
48
|
"engines": {
|
|
49
49
|
"node": ">=22.18.0"
|
|
50
50
|
}
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
".env": ".env.*, .template.env",
|
|
51
51
|
"*.js": "${basename}.ts.map, ${basename}.js.map, ${basename}.d.ts, ${basename}.d.ts.map, ${basename}.d.js.map",
|
|
52
52
|
"*.ts": "${basename}.ts.map, ${basename}.d.ts, ${basename}.d.ts.map",
|
|
53
|
-
"package.json": ".*.cjs, .*.cts, .*.js, .*.json, .*.json5, .*.jsonc, .*.mjs, .*.mts, .*.toml, .*.ts, .*.yaml, .*.yml, .*ignore, .*rc, .node-version, *config.cjs, *config.cts, *config.js, *config.json, *config.json5, *config.jsonc, *config.mjs, *config.mts, *config.toml, *config.ts, *config.yaml, *config.yml, tsconfig.*.json, lerna.json, netlify.toml, package-lock.json, pnpm*, turbo.json, vercel.json, workspace*, wrangler.toml, wrangler.json, wrangler.jsonc, yarn.lock, yarn*",
|
|
53
|
+
"package.json": ".*.cjs, .*.cts, .*.js, .*.json, .*.json5, .*.jsonc, .*.mjs, .*.mts, .*.toml, .*.ts, .*.yaml, .*.yml, .*ignore, .*rc, .node-version, *config.cjs, *config.cts, *config.js, *config.json, *config.json5, *config.jsonc, *config.mjs, *config.mts, *config.toml, *config.ts, *config.yaml, *config.yml, tsconfig.*.json, lerna.json, netlify.toml, package-lock.json, pnpm*, skills-lock.json, turbo.json, vercel.json, workspace*, wrangler.toml, wrangler.json, wrangler.jsonc, yarn.lock, yarn*",
|
|
54
54
|
"readme.md": "authors*, backers*, changelog*, citation*, code_of_conduct*, contributing*, contributors*, copying*, credits*, governance*, history*, license*, maintainers*, release_notes*, security*, sponsors*"
|
|
55
55
|
},
|
|
56
56
|
"prettier.documentSelectors": [
|
|
@@ -65,6 +65,6 @@
|
|
|
65
65
|
"prettier.enable": true,
|
|
66
66
|
"stylelint.enable": true,
|
|
67
67
|
"stylelint.validate": ["css", "html", "svelte", "astro"],
|
|
68
|
-
"
|
|
69
|
-
"
|
|
68
|
+
"js/ts.tsdk.promptToUseWorkspaceVersion": true,
|
|
69
|
+
"js/ts.tsdk.path": "node_modules/typescript/lib"
|
|
70
70
|
}
|
|
@@ -39,19 +39,19 @@
|
|
|
39
39
|
"test": "vitest run"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@types/node": "~20.19.
|
|
42
|
+
"@types/node": "~20.19.37",
|
|
43
43
|
"lognow": "^0.5.2"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@arethetypeswrong/core": "^0.18.2",
|
|
47
|
-
"@kitschpatrol/shared-config": "^6.0.
|
|
48
|
-
"bumpp": "^
|
|
47
|
+
"@kitschpatrol/shared-config": "^6.0.3",
|
|
48
|
+
"bumpp": "^11.0.1",
|
|
49
49
|
"publint": "^0.3.18",
|
|
50
|
-
"tsdown": "^0.21.
|
|
50
|
+
"tsdown": "^0.21.4",
|
|
51
51
|
"typescript": "~5.9.3",
|
|
52
|
-
"vitest": "^4.0
|
|
52
|
+
"vitest": "^4.1.0"
|
|
53
53
|
},
|
|
54
|
-
"packageManager": "pnpm@10.
|
|
54
|
+
"packageManager": "pnpm@10.32.1",
|
|
55
55
|
"engines": {
|
|
56
56
|
"node": ">=20.19.0"
|
|
57
57
|
},
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { ILogBasic, ILogLayer } from 'lognow'
|
|
2
2
|
import { createLogger, injectionHelper } from 'lognow'
|
|
3
|
+
import { name } from '../package.json' with { type: 'json' }
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* The default logger instance for the library.
|
|
6
7
|
*/
|
|
7
|
-
export let log = createLogger()
|
|
8
|
+
export let log = createLogger(name)
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Set the logger instance for the module.
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
".env": ".env.*, .template.env",
|
|
51
51
|
"*.js": "${basename}.ts.map, ${basename}.js.map, ${basename}.d.ts, ${basename}.d.ts.map, ${basename}.d.js.map",
|
|
52
52
|
"*.ts": "${basename}.ts.map, ${basename}.d.ts, ${basename}.d.ts.map",
|
|
53
|
-
"package.json": ".*.cjs, .*.cts, .*.js, .*.json, .*.json5, .*.jsonc, .*.mjs, .*.mts, .*.toml, .*.ts, .*.yaml, .*.yml, .*ignore, .*rc, .node-version, *config.cjs, *config.cts, *config.js, *config.json, *config.json5, *config.jsonc, *config.mjs, *config.mts, *config.toml, *config.ts, *config.yaml, *config.yml, tsconfig.*.json, lerna.json, netlify.toml, package-lock.json, pnpm*, turbo.json, vercel.json, workspace*, wrangler.toml, wrangler.json, wrangler.jsonc, yarn.lock, yarn*",
|
|
53
|
+
"package.json": ".*.cjs, .*.cts, .*.js, .*.json, .*.json5, .*.jsonc, .*.mjs, .*.mts, .*.toml, .*.ts, .*.yaml, .*.yml, .*ignore, .*rc, .node-version, *config.cjs, *config.cts, *config.js, *config.json, *config.json5, *config.jsonc, *config.mjs, *config.mts, *config.toml, *config.ts, *config.yaml, *config.yml, tsconfig.*.json, lerna.json, netlify.toml, package-lock.json, pnpm*, skills-lock.json, turbo.json, vercel.json, workspace*, wrangler.toml, wrangler.json, wrangler.jsonc, yarn.lock, yarn*",
|
|
54
54
|
"readme.md": "authors*, backers*, changelog*, citation*, code_of_conduct*, contributing*, contributors*, copying*, credits*, governance*, history*, license*, maintainers*, release_notes*, security*, sponsors*"
|
|
55
55
|
},
|
|
56
56
|
"prettier.documentSelectors": [
|
|
@@ -65,6 +65,6 @@
|
|
|
65
65
|
"prettier.enable": true,
|
|
66
66
|
"stylelint.enable": true,
|
|
67
67
|
"stylelint.validate": ["css", "html", "svelte", "astro"],
|
|
68
|
-
"
|
|
69
|
-
"
|
|
68
|
+
"js/ts.tsdk.promptToUseWorkspaceVersion": true,
|
|
69
|
+
"js/ts.tsdk.path": "node_modules/typescript/lib"
|
|
70
70
|
}
|
|
@@ -30,15 +30,15 @@
|
|
|
30
30
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@types/node": "~20.19.
|
|
33
|
+
"@types/node": "~20.19.37"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@kitschpatrol/shared-config": "^6.0.
|
|
37
|
-
"bumpp": "^
|
|
36
|
+
"@kitschpatrol/shared-config": "^6.0.3",
|
|
37
|
+
"bumpp": "^11.0.1",
|
|
38
38
|
"tsx": "^4.21.0",
|
|
39
39
|
"typescript": "~5.9.3"
|
|
40
40
|
},
|
|
41
|
-
"packageManager": "pnpm@10.
|
|
41
|
+
"packageManager": "pnpm@10.32.1",
|
|
42
42
|
"engines": {
|
|
43
43
|
"node": ">=20.19.0"
|
|
44
44
|
}
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
".env": ".env.*, .template.env",
|
|
51
51
|
"*.js": "${basename}.ts.map, ${basename}.js.map, ${basename}.d.ts, ${basename}.d.ts.map, ${basename}.d.js.map",
|
|
52
52
|
"*.ts": "${basename}.ts.map, ${basename}.d.ts, ${basename}.d.ts.map",
|
|
53
|
-
"package.json": ".*.cjs, .*.cts, .*.js, .*.json, .*.json5, .*.jsonc, .*.mjs, .*.mts, .*.toml, .*.ts, .*.yaml, .*.yml, .*ignore, .*rc, .node-version, *config.cjs, *config.cts, *config.js, *config.json, *config.json5, *config.jsonc, *config.mjs, *config.mts, *config.toml, *config.ts, *config.yaml, *config.yml, tsconfig.*.json, lerna.json, netlify.toml, package-lock.json, pnpm*, turbo.json, vercel.json, workspace*, wrangler.toml, wrangler.json, wrangler.jsonc, yarn.lock, yarn*",
|
|
53
|
+
"package.json": ".*.cjs, .*.cts, .*.js, .*.json, .*.json5, .*.jsonc, .*.mjs, .*.mts, .*.toml, .*.ts, .*.yaml, .*.yml, .*ignore, .*rc, .node-version, *config.cjs, *config.cts, *config.js, *config.json, *config.json5, *config.jsonc, *config.mjs, *config.mts, *config.toml, *config.ts, *config.yaml, *config.yml, tsconfig.*.json, lerna.json, netlify.toml, package-lock.json, pnpm*, skills-lock.json, turbo.json, vercel.json, workspace*, wrangler.toml, wrangler.json, wrangler.jsonc, yarn.lock, yarn*",
|
|
54
54
|
"readme.md": "authors*, backers*, changelog*, citation*, code_of_conduct*, contributing*, contributors*, copying*, credits*, governance*, history*, license*, maintainers*, release_notes*, security*, sponsors*"
|
|
55
55
|
},
|
|
56
56
|
"prettier.documentSelectors": [
|
|
@@ -65,6 +65,6 @@
|
|
|
65
65
|
"prettier.enable": true,
|
|
66
66
|
"stylelint.enable": true,
|
|
67
67
|
"stylelint.validate": ["css", "html", "svelte", "astro"],
|
|
68
|
-
"
|
|
69
|
-
"
|
|
68
|
+
"js/ts.tsdk.promptToUseWorkspaceVersion": true,
|
|
69
|
+
"js/ts.tsdk.path": "node_modules/typescript/lib"
|
|
70
70
|
}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"rolldown",
|
|
12
12
|
"esbuild",
|
|
13
13
|
"farm",
|
|
14
|
+
"bun",
|
|
14
15
|
"transform",
|
|
15
16
|
"npm-package"
|
|
16
17
|
],
|
|
@@ -32,6 +33,7 @@
|
|
|
32
33
|
".": "./dist/index.js",
|
|
33
34
|
"./*": "./*",
|
|
34
35
|
"./api": "./dist/api.js",
|
|
36
|
+
"./bun": "./dist/bun.js",
|
|
35
37
|
"./esbuild": "./dist/esbuild.js",
|
|
36
38
|
"./farm": "./dist/farm.js",
|
|
37
39
|
"./rolldown": "./dist/rolldown.js",
|
|
@@ -65,18 +67,17 @@
|
|
|
65
67
|
},
|
|
66
68
|
"dependencies": {
|
|
67
69
|
"@types/node": "~22.16.5",
|
|
68
|
-
"unplugin": "^
|
|
69
|
-
"unplugin-utils": "^0.3.1"
|
|
70
|
+
"unplugin": "^3.0.0"
|
|
70
71
|
},
|
|
71
72
|
"devDependencies": {
|
|
72
|
-
"@kitschpatrol/shared-config": "^6.0.
|
|
73
|
+
"@kitschpatrol/shared-config": "^6.0.3",
|
|
73
74
|
"@sxzz/test-utils": "^0.5.15",
|
|
74
|
-
"bumpp": "^
|
|
75
|
-
"tsdown": "^0.21.
|
|
75
|
+
"bumpp": "^11.0.1",
|
|
76
|
+
"tsdown": "^0.21.4",
|
|
76
77
|
"typescript": "~5.9.3",
|
|
77
|
-
"vitest": "^4.0
|
|
78
|
+
"vitest": "^4.1.0"
|
|
78
79
|
},
|
|
79
|
-
"packageManager": "pnpm@10.
|
|
80
|
+
"packageManager": "pnpm@10.32.1",
|
|
80
81
|
"engines": {
|
|
81
82
|
"node": ">=22.18.0"
|
|
82
83
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This entry file is for Bun plugin.
|
|
3
|
+
* @module
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { starter } from './index'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Bun plugin
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* // Build with Bun
|
|
13
|
+
* import starter from '{{{github-repository}}}/bun'
|
|
14
|
+
*
|
|
15
|
+
* Bun.build({ plugins: [starter()] })
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
const { bun } = starter
|
|
19
|
+
export default bun
|
|
20
|
+
export { bun as 'module.exports' }
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { UnpluginInstance } from 'unplugin'
|
|
2
2
|
import { createUnplugin } from 'unplugin'
|
|
3
|
-
import { createFilter } from 'unplugin-utils'
|
|
4
3
|
import type { Options } from './core/options'
|
|
5
4
|
import { resolveOptions } from './core/options'
|
|
6
5
|
|
|
@@ -10,17 +9,21 @@ import { resolveOptions } from './core/options'
|
|
|
10
9
|
export const starter: UnpluginInstance<Options | undefined, false> = createUnplugin(
|
|
11
10
|
(rawOptions = {}) => {
|
|
12
11
|
const options = resolveOptions(rawOptions)
|
|
13
|
-
const filter = createFilter(options.include, options.exclude)
|
|
14
12
|
|
|
15
13
|
const name = '{{{github-repository}}}'
|
|
16
14
|
return {
|
|
17
15
|
enforce: options.enforce,
|
|
18
16
|
name,
|
|
19
|
-
transform
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
transform: {
|
|
18
|
+
filter: {
|
|
19
|
+
id: {
|
|
20
|
+
include: options.include,
|
|
21
|
+
exclude: options.exclude,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
handler(code, _id) {
|
|
25
|
+
return `// {{{github-repository}}} injected\n${code}`
|
|
26
|
+
},
|
|
24
27
|
},
|
|
25
28
|
}
|
|
26
29
|
},
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
".env": ".env.*, .template.env",
|
|
51
51
|
"*.js": "${basename}.ts.map, ${basename}.js.map, ${basename}.d.ts, ${basename}.d.ts.map, ${basename}.d.js.map",
|
|
52
52
|
"*.ts": "${basename}.ts.map, ${basename}.d.ts, ${basename}.d.ts.map",
|
|
53
|
-
"package.json": ".*.cjs, .*.cts, .*.js, .*.json, .*.json5, .*.jsonc, .*.mjs, .*.mts, .*.toml, .*.ts, .*.yaml, .*.yml, .*ignore, .*rc, .node-version, *config.cjs, *config.cts, *config.js, *config.json, *config.json5, *config.jsonc, *config.mjs, *config.mts, *config.toml, *config.ts, *config.yaml, *config.yml, tsconfig.*.json, lerna.json, netlify.toml, package-lock.json, pnpm*, turbo.json, vercel.json, workspace*, wrangler.toml, wrangler.json, wrangler.jsonc, yarn.lock, yarn*",
|
|
53
|
+
"package.json": ".*.cjs, .*.cts, .*.js, .*.json, .*.json5, .*.jsonc, .*.mjs, .*.mts, .*.toml, .*.ts, .*.yaml, .*.yml, .*ignore, .*rc, .node-version, *config.cjs, *config.cts, *config.js, *config.json, *config.json5, *config.jsonc, *config.mjs, *config.mts, *config.toml, *config.ts, *config.yaml, *config.yml, tsconfig.*.json, lerna.json, netlify.toml, package-lock.json, pnpm*, skills-lock.json, turbo.json, vercel.json, workspace*, wrangler.toml, wrangler.json, wrangler.jsonc, yarn.lock, yarn*",
|
|
54
54
|
"readme.md": "authors*, backers*, changelog*, citation*, code_of_conduct*, contributing*, contributors*, copying*, credits*, governance*, history*, license*, maintainers*, release_notes*, security*, sponsors*"
|
|
55
55
|
},
|
|
56
56
|
"prettier.documentSelectors": [
|
|
@@ -65,6 +65,6 @@
|
|
|
65
65
|
"prettier.enable": true,
|
|
66
66
|
"stylelint.enable": true,
|
|
67
67
|
"stylelint.validate": ["css", "html", "svelte", "astro"],
|
|
68
|
-
"
|
|
69
|
-
"
|
|
68
|
+
"js/ts.tsdk.promptToUseWorkspaceVersion": true,
|
|
69
|
+
"js/ts.tsdk.path": "node_modules/typescript/lib"
|
|
70
70
|
}
|
|
@@ -31,18 +31,18 @@
|
|
|
31
31
|
"test": "vitest run"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@types/node": "~20.19.
|
|
34
|
+
"@types/node": "~20.19.37"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@kitschpatrol/shared-config": "^6.0.
|
|
38
|
-
"bumpp": "^
|
|
37
|
+
"@kitschpatrol/shared-config": "^6.0.3",
|
|
38
|
+
"bumpp": "^11.0.1",
|
|
39
39
|
"poptab": "^1.0.4",
|
|
40
40
|
"typescript": "~5.9.3",
|
|
41
|
-
"vite": "
|
|
41
|
+
"vite": "^8.0.1",
|
|
42
42
|
"vite-plugin-mkcert": "^1.17.10",
|
|
43
|
-
"vitest": "^4.0
|
|
43
|
+
"vitest": "^4.1.0"
|
|
44
44
|
},
|
|
45
|
-
"packageManager": "pnpm@10.
|
|
45
|
+
"packageManager": "pnpm@10.32.1",
|
|
46
46
|
"engines": {
|
|
47
47
|
"node": ">=20.19.0"
|
|
48
48
|
}
|