@funish/basis 0.0.1

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.
Files changed (53) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +390 -0
  3. package/dist/chunks/add.cjs +1 -0
  4. package/dist/chunks/add.mjs +1 -0
  5. package/dist/chunks/config.cjs +1 -0
  6. package/dist/chunks/config.mjs +1 -0
  7. package/dist/chunks/githooks.cjs +1 -0
  8. package/dist/chunks/githooks.mjs +1 -0
  9. package/dist/chunks/init.cjs +1 -0
  10. package/dist/chunks/init.mjs +1 -0
  11. package/dist/chunks/install.cjs +1 -0
  12. package/dist/chunks/install.mjs +1 -0
  13. package/dist/chunks/lint.cjs +1 -0
  14. package/dist/chunks/lint.mjs +1 -0
  15. package/dist/chunks/publish.cjs +1 -0
  16. package/dist/chunks/publish.mjs +1 -0
  17. package/dist/chunks/remove.cjs +1 -0
  18. package/dist/chunks/remove.mjs +1 -0
  19. package/dist/chunks/run.cjs +1 -0
  20. package/dist/chunks/run.mjs +1 -0
  21. package/dist/chunks/version.cjs +1 -0
  22. package/dist/chunks/version.mjs +1 -0
  23. package/dist/cli.cjs +2 -0
  24. package/dist/cli.d.cts +1 -0
  25. package/dist/cli.d.mts +1 -0
  26. package/dist/cli.d.ts +1 -0
  27. package/dist/cli.mjs +2 -0
  28. package/dist/config.cjs +1 -0
  29. package/dist/config.d.cts +1 -0
  30. package/dist/config.d.mts +1 -0
  31. package/dist/config.d.ts +1 -0
  32. package/dist/config.mjs +1 -0
  33. package/dist/index.cjs +1 -0
  34. package/dist/index.d.cts +89 -0
  35. package/dist/index.d.mts +89 -0
  36. package/dist/index.d.ts +89 -0
  37. package/dist/index.mjs +1 -0
  38. package/dist/shared/basis.ByJ8R9TE.cjs +1 -0
  39. package/dist/shared/basis.C0E7mwQ6.mjs +1 -0
  40. package/dist/shared/basis.C5wlo6IO.mjs +1 -0
  41. package/dist/shared/basis.CBZIV3-V.mjs +19 -0
  42. package/dist/shared/basis.CSSuyvpq.cjs +1 -0
  43. package/dist/shared/basis.CgpyxNW3.cjs +1 -0
  44. package/dist/shared/basis.D57HxVvD.cjs +4 -0
  45. package/dist/shared/basis.DeKfEQsQ.cjs +5 -0
  46. package/dist/shared/basis.DweCjqFb.cjs +19 -0
  47. package/dist/shared/basis.O4so-uuj.mjs +5 -0
  48. package/dist/shared/basis.dc3ybBoz.mjs +1 -0
  49. package/dist/shared/basis.iRZ1Ylu8.d.cts +127 -0
  50. package/dist/shared/basis.iRZ1Ylu8.d.mts +127 -0
  51. package/dist/shared/basis.iRZ1Ylu8.d.ts +127 -0
  52. package/dist/shared/basis.rDVxD7qf.mjs +4 -0
  53. package/package.json +77 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Funish
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,390 @@
1
+ # @funish/basis
2
+
3
+ ![GitHub](https://img.shields.io/github/license/funish/basis)
4
+ [![npm version](https://img.shields.io/npm/v/@funish/basis.svg)](https://www.npmjs.com/package/@funish/basis)
5
+ [![npm downloads](https://img.shields.io/npm/dm/@funish/basis.svg)](https://www.npmjs.com/package/@funish/basis)
6
+
7
+ > A unified development toolkit with CLI for package management, versioning, publishing, linting, and git hooks management for JavaScript/TypeScript projects, powered by [Funish](https://funish.net/).
8
+
9
+ ## What is Basis?
10
+
11
+ Basis is your **unified development toolkit** for modern JavaScript/TypeScript projects. Instead of juggling multiple CLI tools, Basis provides a single interface for all your development workflow needs.
12
+
13
+ ## Features
14
+
15
+ - 🎯 **Unified CLI**: One command interface for all development tasks
16
+ - 📦 **Package Management**: Install, add, remove dependencies with auto-detected package manager (npm, yarn, pnpm, bun, deno)
17
+ - 🏷️ **Version Management**: Semantic versioning with automated git tagging and releases
18
+ - 🚀 **Publishing**: Multi-tag publishing strategy with edge version tracking
19
+ - 🔧 **Tool Agnostic Linting**: Not tied to specific linters - use ESLint, Biome, or any tool you prefer
20
+ - 🪝 **Smart Git Hooks**: Automatic git repository initialization and hook management
21
+ - 💻 **Modern Stack**: Built on the unjs ecosystem (citty, consola, c12, nypm, semver)
22
+ - 💪 **TypeScript First**: Full TypeScript support with excellent DX
23
+ - 📚 **Smart Defaults**: Best practices built-in, fully customizable
24
+ - 🔧 **Single Configuration**: One config file for all functionality
25
+
26
+ ## Quick Start
27
+
28
+ ### Recommended Installation (Global with pnpm)
29
+
30
+ ```bash
31
+ # Install globally with pnpm (recommended)
32
+ pnpm add -g @funish/basis
33
+
34
+ # Or install globally with npm
35
+ npm install -g @funish/basis
36
+
37
+ # Verify installation
38
+ basis --version
39
+ ```
40
+
41
+ ### Alternative Installation Methods
42
+
43
+ ```bash
44
+ # Install in your project with pnpm
45
+ pnpm add -D @funish/basis
46
+
47
+ # Or with npm
48
+ npm install -D @funish/basis
49
+
50
+ # Or use directly with pnpx (recommended over npx)
51
+ pnpx @funish/basis init
52
+ ```
53
+
54
+ ### Initialize in Existing Project
55
+
56
+ ```bash
57
+ cd your-existing-project
58
+ basis init
59
+
60
+ # Your project now has:
61
+ # ✅ basis.config.ts configuration file
62
+ # ✅ Git hooks setup (auto-installed via package.json scripts)
63
+ # ✅ Tool-agnostic linting workflow
64
+ # ✅ Package management through unified CLI
65
+ # ✅ Version management with semantic versioning
66
+ # ✅ Publishing workflow with multi-tag strategy
67
+ ```
68
+
69
+ ## CLI Commands
70
+
71
+ ### Package Management
72
+
73
+ ```bash
74
+ # Install dependencies (auto-detects package manager)
75
+ basis install # or basis i
76
+ basis install --frozen-lockfile
77
+
78
+ # Add dependencies
79
+ basis add lodash # Add to dependencies
80
+ basis add -D typescript # Add to devDependencies
81
+ basis add --workspace app react # Add to specific workspace
82
+ basis add -g @funish/basis # Install globally
83
+
84
+ # Remove dependencies
85
+ basis remove lodash # or basis rm / basis uninstall
86
+ basis remove -D typescript
87
+
88
+ # Run scripts
89
+ basis run build # Run package.json scripts
90
+ basis run test --silent
91
+ ```
92
+
93
+ ### Version Management
94
+
95
+ ```bash
96
+ # Semantic version increments
97
+ basis version patch # 1.0.0 → 1.0.1
98
+ basis version minor # 1.0.0 → 1.1.0
99
+ basis version major # 1.0.0 → 2.0.0
100
+
101
+ # Prerelease versions
102
+ basis version --prerelease # 1.0.0 → 1.0.1-edge.0
103
+ basis version --prerelease --preid beta # 1.0.0 → 1.0.1-beta.0
104
+
105
+ # Specific version
106
+ basis version 2.0.0
107
+
108
+ # Custom commit message
109
+ basis version patch --message "fix: critical bug"
110
+ ```
111
+
112
+ ### Publishing
113
+
114
+ ```bash
115
+ # Standard publishing (to edge tag)
116
+ basis publish
117
+
118
+ # Stable release (to latest + edge tags)
119
+ basis publish --stable
120
+
121
+ # Custom tag publishing (to custom + edge tags)
122
+ basis publish --tag beta
123
+ basis publish --tag alpha
124
+
125
+ # Dry run
126
+ basis publish --dry-run
127
+
128
+ # Skip build/tests
129
+ basis publish --skip-build --skip-tests
130
+ ```
131
+
132
+ ### Linting
133
+
134
+ ```bash
135
+ # Lint staged files
136
+ basis lint --staged
137
+
138
+ # Validate commit message
139
+ basis lint --commit-msg
140
+ ```
141
+
142
+ ### Git Hooks Management
143
+
144
+ ```bash
145
+ # Install git hooks
146
+ basis githooks install
147
+ basis githooks install --auto-init-git # Auto-initialize git if needed
148
+ basis githooks install --force # Force installation
149
+
150
+ # Manage hooks
151
+ basis githooks uninstall # Remove git hooks
152
+ basis githooks list # List configured hooks
153
+ ```
154
+
155
+ ### Project Management
156
+
157
+ ```bash
158
+ # Initialize configuration
159
+ basis init # Initialize basis configuration
160
+ basis init --force # Overwrite existing configuration
161
+ basis init --skip-git-check # Skip git directory check
162
+ basis init --skip-install # Skip dependency installation
163
+
164
+ # Configuration
165
+ basis config # Show current configuration
166
+ basis config --json # Output configuration as JSON
167
+ basis config --path # Show configuration file path
168
+
169
+ # Help
170
+ basis --help # Show help
171
+ basis <command> --help # Show command-specific help
172
+ ```
173
+
174
+ ## Configuration
175
+
176
+ Basis uses a single configuration file for all its features:
177
+
178
+ ```ts
179
+ // basis.config.ts
180
+ import { defineBasisConfig } from "@funish/basis";
181
+
182
+ export default defineBasisConfig({
183
+ // Linting configuration
184
+ lint: {
185
+ // Staged files linting patterns
186
+ staged: {
187
+ "*.{ts,tsx,js,jsx}": "eslint --fix",
188
+ "*.{json,md,yml,yaml}": "prettier --write",
189
+ "*.vue": "vue-tsc --noEmit && eslint --fix",
190
+ },
191
+ // Commit message validation
192
+ commitMsg: {
193
+ types: [
194
+ "feat",
195
+ "fix",
196
+ "docs",
197
+ "style",
198
+ "refactor",
199
+ "perf",
200
+ "test",
201
+ "build",
202
+ "ci",
203
+ "chore",
204
+ ],
205
+ maxLength: 72,
206
+ minLength: 10,
207
+ scopeRequired: false,
208
+ allowedScopes: ["api", "ui", "core"],
209
+ },
210
+ },
211
+
212
+ // Git hooks configuration
213
+ githooks: {
214
+ // Hook commands
215
+ "pre-commit": "basis lint --staged",
216
+ "commit-msg": "basis lint --commit-msg",
217
+
218
+ // Options
219
+ autoInitGit: true, // Auto-initialize git repo if not found
220
+ skipGitCheck: false, // Skip git command availability check
221
+ force: false, // Force operation even if git unavailable
222
+ },
223
+
224
+ // Package manager configuration (auto-detected)
225
+ packageManager: {
226
+ autoDetect: true, // Auto-detect package manager
227
+ registry: "https://registry.npmjs.org/",
228
+ },
229
+
230
+ // Version management configuration
231
+ version: {
232
+ tagPrefix: "v", // Git tag prefix
233
+ autoCommit: true, // Auto commit version changes
234
+ autoTag: true, // Auto create git tag
235
+ autoPush: false, // Manual push control
236
+ prereleaseId: "edge", // Default prerelease identifier
237
+ commitMessage: "chore: release v{version}",
238
+ },
239
+
240
+ // Publishing configuration
241
+ publish: {
242
+ defaultTag: "edge", // Always published tag
243
+ stableTag: "latest", // Stable release tag
244
+ access: "public", // Package access level
245
+ registry: "https://registry.npmjs.org/",
246
+ buildCommand: "pnpm build", // Build before publish
247
+ testCommand: "pnpm test", // Test before publish
248
+ checkGitClean: true, // Check git status before publish
249
+ checkTests: true, // Run tests before publish
250
+ autoGitPush: true, // Push after publish
251
+ createGitTag: true, // Create git tag after publish
252
+ },
253
+ });
254
+ ```
255
+
256
+ ## Publishing Strategy
257
+
258
+ Basis implements an intelligent multi-tag publishing strategy:
259
+
260
+ ### Tag Types
261
+
262
+ - **`edge`**: Always points to the latest published version (any type)
263
+ - **`latest`**: Points to stable releases
264
+ - **Prerelease Tags**: `alpha`, `beta`, `rc` versions get their own tags
265
+ - **Custom Tags**: Flexible tagging for different release channels
266
+
267
+ ### Examples
268
+
269
+ ```bash
270
+ # Version 1.0.0 (stable)
271
+ basis publish --stable
272
+ # → Published to: latest + edge
273
+
274
+ # Version 1.1.0-beta.1 (prerelease)
275
+ basis publish
276
+ # → Published to: beta + edge
277
+
278
+ # Version 1.2.0 (custom workflow)
279
+ basis publish --tag canary
280
+ # → Published to: canary + edge
281
+ ```
282
+
283
+ ### Installation Examples
284
+
285
+ ```bash
286
+ # Install stable version
287
+ pnpm add @funish/basis # Gets latest tag
288
+
289
+ # Install edge version (latest published)
290
+ pnpm add @funish/basis@edge
291
+
292
+ # Install prerelease
293
+ pnpm add @funish/basis@beta
294
+
295
+ # Install specific version
296
+ pnpm add @funish/basis@1.0.0
297
+ ```
298
+
299
+ ## Core Concepts
300
+
301
+ ### 🎯 **Unified CLI**
302
+
303
+ Single command interface for package management, versioning, publishing, linting, and git hooks. No more switching between different tools.
304
+
305
+ ### 📦 **Auto-Detected Package Manager**
306
+
307
+ Basis automatically detects your preferred package manager (npm, yarn, pnpm, bun, deno) and uses the appropriate commands, powered by [nypm](https://github.com/unjs/nypm).
308
+
309
+ ### 🏷️ **Semantic Versioning**
310
+
311
+ Built-in semantic versioning support using the standard [semver](https://www.npmjs.com/package/semver) package, with automated git tagging and commit generation.
312
+
313
+ ### 🔧 **Tool Agnostic**
314
+
315
+ Basis doesn't force specific tools. Use ESLint, Biome, or any other linter. Basis orchestrates your existing tools, doesn't replace them.
316
+
317
+ ### 📦 **Modern Foundations**
318
+
319
+ Built on the [unjs ecosystem](https://unjs.io/), leveraging proven tools like `citty`, `consola`, `c12`, `nypm`, and `semver` for maximum reliability and performance.
320
+
321
+ ## Integration
322
+
323
+ Basis integrates seamlessly with:
324
+
325
+ - **Package Managers**: npm, yarn, pnpm, bun, deno (auto-detected)
326
+ - **Linters**: ESLint, Biome, Prettier, StyleLint
327
+ - **Git**: Works with any git workflow and hosting provider
328
+ - **CI/CD**: GitHub Actions, GitLab CI, Jenkins
329
+ - **Frameworks**: React, Vue, Angular, Next.js, Nuxt, SvelteKit
330
+
331
+ ## Why Choose Basis?
332
+
333
+ ### Instead of this:
334
+
335
+ ```bash
336
+ npm install package # Package management
337
+ yarn version patch # Version management
338
+ npm publish --tag beta # Publishing
339
+ npx lint-staged # Linting
340
+ npx husky install # Git hooks
341
+ ```
342
+
343
+ ### Do this:
344
+
345
+ ```bash
346
+ basis add package # Unified package management
347
+ basis version patch # Unified version management
348
+ basis publish --tag beta # Unified publishing
349
+ basis lint --staged # Unified linting
350
+ basis githooks install # Unified git hooks
351
+ ```
352
+
353
+ ## API
354
+
355
+ ```ts
356
+ import { createBasis, defineBasisConfig } from "@funish/basis";
357
+
358
+ // Programmatic usage
359
+ const basis = createBasis(process.cwd());
360
+
361
+ // Initialize configuration
362
+ await basis.init({ force: false, skipGitCheck: false, skipInstall: false });
363
+
364
+ // Package management
365
+ await basis.installDependencies();
366
+ await basis.addDependency("lodash");
367
+ await basis.removeDependency("lodash");
368
+ await basis.runScript("build");
369
+
370
+ // Version management
371
+ await basis.updateVersion({ patch: true });
372
+ await basis.updateVersion({ version: "2.0.0" });
373
+
374
+ // Publishing
375
+ await basis.publishPackage({ stable: true });
376
+ await basis.publishPackage({ tag: "beta" });
377
+
378
+ // Linting
379
+ await basis.lintStaged();
380
+ await basis.lintCommitMessage();
381
+
382
+ // Git hooks
383
+ await basis.installHooks();
384
+ await basis.uninstallHooks();
385
+ await basis.listHooks();
386
+ ```
387
+
388
+ ## License
389
+
390
+ [MIT](../../LICENSE) © [Funish](https://funish.net/)
@@ -0,0 +1 @@
1
+ "use strict";const citty=require("citty"),consola=require("consola"),nypm=require("nypm"),add=citty.defineCommand({meta:{name:"add",description:"Add dependencies to the project"},args:{packages:{type:"positional",description:"Packages to add",required:!0},cwd:{type:"string",description:"Working directory",default:process.cwd()},silent:{type:"boolean",description:"Silent mode",alias:"s"},"package-manager":{type:"string",description:"Package manager to use (npm, yarn, pnpm, bun, deno)",alias:"pm"},dev:{type:"boolean",description:"Add as dev dependency",alias:"D"},workspace:{type:"string",description:"Workspace name",alias:"w"},global:{type:"boolean",description:"Install globally",alias:"g"}},async run({args:e}){try{const a=Array.isArray(e.packages)?e.packages:[e.packages],s={cwd:e.cwd,silent:e.silent,packageManager:e["package-manager"],workspace:e.workspace,global:e.global};e.dev?(await nypm.addDevDependency(a,s),e.silent||consola.consola.success(`Added ${a.join(", ")} as dev dependencies`)):(await nypm.addDependency(a,s),e.silent||consola.consola.success(`Added ${a.join(", ")} as dependencies`))}catch(a){consola.consola.error("Failed to add dependencies:",a),process.exit(1)}}});exports.default=add;
@@ -0,0 +1 @@
1
+ import{defineCommand as n}from"citty";import{consola as d}from"consola";import{addDevDependency as i,addDependency as o}from"nypm";const t=n({meta:{name:"add",description:"Add dependencies to the project"},args:{packages:{type:"positional",description:"Packages to add",required:!0},cwd:{type:"string",description:"Working directory",default:process.cwd()},silent:{type:"boolean",description:"Silent mode",alias:"s"},"package-manager":{type:"string",description:"Package manager to use (npm, yarn, pnpm, bun, deno)",alias:"pm"},dev:{type:"boolean",description:"Add as dev dependency",alias:"D"},workspace:{type:"string",description:"Workspace name",alias:"w"},global:{type:"boolean",description:"Install globally",alias:"g"}},async run({args:e}){try{const a=Array.isArray(e.packages)?e.packages:[e.packages],s={cwd:e.cwd,silent:e.silent,packageManager:e["package-manager"],workspace:e.workspace,global:e.global};e.dev?(await i(a,s),e.silent||d.success(`Added ${a.join(", ")} as dev dependencies`)):(await o(a,s),e.silent||d.success(`Added ${a.join(", ")} as dependencies`))}catch(a){d.error("Failed to add dependencies:",a),process.exit(1)}}});export{t as default};
@@ -0,0 +1 @@
1
+ "use strict";const citty=require("citty"),consola=require("consola"),utils=require("../shared/basis.CSSuyvpq.cjs");require("c12"),require("../config.cjs");const config=citty.defineCommand({meta:{name:"config",description:"View current basis configuration"},args:{json:{type:"boolean",description:"Output configuration as JSON"},path:{type:"boolean",description:"Show configuration file path"}},async run({args:e}){try{const i=process.cwd(),{config:o,configFile:n}=await utils.loadConfig({cwd:i});if(e.path){n?consola.consola.info(`Configuration file: ${n}`):(consola.consola.warn("No configuration file found"),consola.consola.info("Run `basis init` to create one"));return}if(Object.keys(o).length===0){consola.consola.warn("No configuration found"),consola.consola.info("Run `basis init` to create a basis.config.ts file");return}if(e.json)consola.consola.log(JSON.stringify(o,null,2));else{if(consola.consola.info("Current basis configuration:"),n&&consola.consola.log(`\u{1F4C1} Config file: ${n}`),o.lint){if(consola.consola.log(""),consola.consola.log("\u{1F4DD} Lint:"),o.lint.staged){consola.consola.log(" Staged files:");for(const[s,t]of Object.entries(o.lint.staged))consola.consola.log(` ${s}: ${t}`)}o.lint.commitMsg&&(consola.consola.log(" Commit message:"),o.lint.commitMsg.types&&consola.consola.log(` Types: ${o.lint.commitMsg.types.join(", ")}`),o.lint.commitMsg.maxLength&&consola.consola.log(` Max length: ${o.lint.commitMsg.maxLength}`),o.lint.commitMsg.minLength&&consola.consola.log(` Min length: ${o.lint.commitMsg.minLength}`))}if(o.hooks){consola.consola.log(""),consola.consola.log("\u{1FA9D} Hooks:");for(const[s,t]of Object.entries(o.hooks))consola.consola.log(` ${s}: ${t}`)}}consola.consola.success("Configuration loaded successfully")}catch(i){consola.consola.error("Failed to load configuration:",i),process.exit(1)}}});exports.default=config;
@@ -0,0 +1 @@
1
+ import{defineCommand as a}from"citty";import{consola as o}from"consola";import{l}from"../shared/basis.C0E7mwQ6.mjs";import"c12";import"../config.mjs";const r=a({meta:{name:"config",description:"View current basis configuration"},args:{json:{type:"boolean",description:"Output configuration as JSON"},path:{type:"boolean",description:"Show configuration file path"}},async run({args:g}){try{const t=process.cwd(),{config:i,configFile:n}=await l({cwd:t});if(g.path){n?o.info(`Configuration file: ${n}`):(o.warn("No configuration file found"),o.info("Run `basis init` to create one"));return}if(Object.keys(i).length===0){o.warn("No configuration found"),o.info("Run `basis init` to create a basis.config.ts file");return}if(g.json)o.log(JSON.stringify(i,null,2));else{if(o.info("Current basis configuration:"),n&&o.log(`\u{1F4C1} Config file: ${n}`),i.lint){if(o.log(""),o.log("\u{1F4DD} Lint:"),i.lint.staged){o.log(" Staged files:");for(const[e,s]of Object.entries(i.lint.staged))o.log(` ${e}: ${s}`)}i.lint.commitMsg&&(o.log(" Commit message:"),i.lint.commitMsg.types&&o.log(` Types: ${i.lint.commitMsg.types.join(", ")}`),i.lint.commitMsg.maxLength&&o.log(` Max length: ${i.lint.commitMsg.maxLength}`),i.lint.commitMsg.minLength&&o.log(` Min length: ${i.lint.commitMsg.minLength}`))}if(i.hooks){o.log(""),o.log("\u{1FA9D} Hooks:");for(const[e,s]of Object.entries(i.hooks))o.log(` ${e}: ${s}`)}}o.success("Configuration loaded successfully")}catch(t){o.error("Failed to load configuration:",t),process.exit(1)}}});export{r as default};
@@ -0,0 +1 @@
1
+ "use strict";const citty=require("citty"),consola=require("consola"),githooks$1=require("../shared/basis.DeKfEQsQ.cjs");require("node:child_process"),require("node:fs/promises"),require("pathe"),require("../shared/basis.CSSuyvpq.cjs"),require("c12"),require("../config.cjs");const githooks=citty.defineCommand({meta:{name:"hooks",description:"Manage git hooks"},subCommands:{install:citty.defineCommand({meta:{name:"install",description:"Install git hooks"},args:{"auto-init-git":{type:"boolean",description:"Automatically initialize git repository if not found"},"skip-git-check":{type:"boolean",description:"Skip git command availability check"},force:{type:"boolean",alias:"f",description:"Force operation even if git is not available"}},async run({args:i}){try{let o;(i["auto-init-git"]!==void 0||i["skip-git-check"]!==void 0||i.force!==void 0)&&(o={},i["auto-init-git"]!==void 0&&(o.autoInitGit=!!i["auto-init-git"]),i["skip-git-check"]!==void 0&&(o.skipGitCheck=!!i["skip-git-check"]),i.force!==void 0&&(o.force=!!i.force)),await githooks$1.installHooks(process.cwd(),o)}catch(o){consola.consola.error("Failed to install hooks:",o),process.exit(1)}}}),uninstall:citty.defineCommand({meta:{name:"uninstall",description:"Uninstall git hooks"},args:{"skip-git-check":{type:"boolean",description:"Skip git command availability check"},force:{type:"boolean",alias:"f",description:"Force operation even if git is not available"}},async run({args:i}){try{let o;(i["skip-git-check"]!==void 0||i.force!==void 0)&&(o={},i["skip-git-check"]!==void 0&&(o.skipGitCheck=!!i["skip-git-check"]),i.force!==void 0&&(o.force=!!i.force)),await githooks$1.uninstallHooks(process.cwd(),o)}catch(o){consola.consola.error("Failed to uninstall hooks:",o),process.exit(1)}}}),list:citty.defineCommand({meta:{name:"list",description:"List configured hooks"},async run(){await githooks$1.listHooks()}})}});exports.default=githooks;
@@ -0,0 +1 @@
1
+ import{defineCommand as t}from"citty";import{consola as e}from"consola";import{l as a,u as s,i as c}from"../shared/basis.O4so-uuj.mjs";import"node:child_process";import"node:fs/promises";import"pathe";import"../shared/basis.C0E7mwQ6.mjs";import"c12";import"../config.mjs";const n=t({meta:{name:"hooks",description:"Manage git hooks"},subCommands:{install:t({meta:{name:"install",description:"Install git hooks"},args:{"auto-init-git":{type:"boolean",description:"Automatically initialize git repository if not found"},"skip-git-check":{type:"boolean",description:"Skip git command availability check"},force:{type:"boolean",alias:"f",description:"Force operation even if git is not available"}},async run({args:i}){try{let o;(i["auto-init-git"]!==void 0||i["skip-git-check"]!==void 0||i.force!==void 0)&&(o={},i["auto-init-git"]!==void 0&&(o.autoInitGit=!!i["auto-init-git"]),i["skip-git-check"]!==void 0&&(o.skipGitCheck=!!i["skip-git-check"]),i.force!==void 0&&(o.force=!!i.force)),await c(process.cwd(),o)}catch(o){e.error("Failed to install hooks:",o),process.exit(1)}}}),uninstall:t({meta:{name:"uninstall",description:"Uninstall git hooks"},args:{"skip-git-check":{type:"boolean",description:"Skip git command availability check"},force:{type:"boolean",alias:"f",description:"Force operation even if git is not available"}},async run({args:i}){try{let o;(i["skip-git-check"]!==void 0||i.force!==void 0)&&(o={},i["skip-git-check"]!==void 0&&(o.skipGitCheck=!!i["skip-git-check"]),i.force!==void 0&&(o.force=!!i.force)),await s(process.cwd(),o)}catch(o){e.error("Failed to uninstall hooks:",o),process.exit(1)}}}),list:t({meta:{name:"list",description:"List configured hooks"},async run(){await a()}})}});export{n as default};
@@ -0,0 +1 @@
1
+ "use strict";const citty=require("citty"),consola=require("consola"),init$1=require("../shared/basis.DweCjqFb.cjs");require("node:fs"),require("nypm"),require("pathe"),require("pkg-types");const init=citty.defineCommand({meta:{name:"init",description:"Initialize basis configuration"},args:{force:{type:"boolean",alias:"f",description:"Overwrite existing configuration"},"skip-git-check":{type:"boolean",description:"Skip git directory check"},"skip-install":{type:"boolean",description:"Skip showing install command"}},async run({args:i}){try{await init$1.init(process.cwd(),{force:i.force,skipGitCheck:i["skip-git-check"],skipInstall:i["skip-install"]})}catch(e){consola.consola.error("Init failed:",e),process.exit(1)}}});exports.default=init;
@@ -0,0 +1 @@
1
+ import{defineCommand as o}from"citty";import{consola as e}from"consola";import{i as r}from"../shared/basis.CBZIV3-V.mjs";import"node:fs";import"nypm";import"pathe";import"pkg-types";const n=o({meta:{name:"init",description:"Initialize basis configuration"},args:{force:{type:"boolean",alias:"f",description:"Overwrite existing configuration"},"skip-git-check":{type:"boolean",description:"Skip git directory check"},"skip-install":{type:"boolean",description:"Skip showing install command"}},async run({args:i}){try{await r(process.cwd(),{force:i.force,skipGitCheck:i["skip-git-check"],skipInstall:i["skip-install"]})}catch(t){e.error("Init failed:",t),process.exit(1)}}});export{n as default};
@@ -0,0 +1 @@
1
+ "use strict";const citty=require("citty"),consola=require("consola"),nypm=require("nypm"),install=citty.defineCommand({meta:{name:"install",description:"Install project dependencies"},args:{cwd:{type:"string",description:"Working directory",default:process.cwd()},silent:{type:"boolean",description:"Silent mode",alias:"s"},"package-manager":{type:"string",description:"Package manager to use (npm, yarn, pnpm, bun, deno)",alias:"pm"},"frozen-lockfile":{type:"boolean",description:"Install with frozen lockfile",alias:"f"}},async run({args:e}){try{await nypm.installDependencies({cwd:e.cwd,silent:e.silent,packageManager:e["package-manager"],frozenLockFile:e["frozen-lockfile"]}),e.silent||consola.consola.success("Dependencies installed successfully")}catch(n){consola.consola.error("Failed to install dependencies:",n),process.exit(1)}}});exports.default=install;
@@ -0,0 +1 @@
1
+ import{defineCommand as i}from"citty";import{consola as n}from"consola";import{installDependencies as s}from"nypm";const t=i({meta:{name:"install",description:"Install project dependencies"},args:{cwd:{type:"string",description:"Working directory",default:process.cwd()},silent:{type:"boolean",description:"Silent mode",alias:"s"},"package-manager":{type:"string",description:"Package manager to use (npm, yarn, pnpm, bun, deno)",alias:"pm"},"frozen-lockfile":{type:"boolean",description:"Install with frozen lockfile",alias:"f"}},async run({args:e}){try{await s({cwd:e.cwd,silent:e.silent,packageManager:e["package-manager"],frozenLockFile:e["frozen-lockfile"]}),e.silent||n.success("Dependencies installed successfully")}catch(a){n.error("Failed to install dependencies:",a),process.exit(1)}}});export{t as default};
@@ -0,0 +1 @@
1
+ "use strict";const citty=require("citty"),consola=require("consola"),lint$1=require("../shared/basis.D57HxVvD.cjs");require("node:child_process"),require("node:fs"),require("micromatch"),require("pathe"),require("../shared/basis.CSSuyvpq.cjs"),require("c12"),require("../config.cjs");const lint=citty.defineCommand({meta:{name:"lint",description:"Run linting"},args:{staged:{type:"boolean",description:"Lint only staged files"},"commit-msg":{type:"boolean",description:"Lint commit message"}},async run({args:i}){try{let e=!0;if(i["commit-msg"]){const t=await lint$1.lintCommitMessage();e=e&&t}if(i.staged||!i["commit-msg"]){const t=await lint$1.lintStaged();e=e&&t}e||process.exit(1)}catch(e){consola.consola.error("Lint failed:",e),process.exit(1)}}});exports.default=lint;
@@ -0,0 +1 @@
1
+ import{defineCommand as m}from"citty";import{consola as s}from"consola";import{a as e,l as a}from"../shared/basis.rDVxD7qf.mjs";import"node:child_process";import"node:fs";import"micromatch";import"pathe";import"../shared/basis.C0E7mwQ6.mjs";import"c12";import"../config.mjs";const r=m({meta:{name:"lint",description:"Run linting"},args:{staged:{type:"boolean",description:"Lint only staged files"},"commit-msg":{type:"boolean",description:"Lint commit message"}},async run({args:i}){try{let t=!0;if(i["commit-msg"]){const o=await e();t=t&&o}if(i.staged||!i["commit-msg"]){const o=await a();t=t&&o}t||process.exit(1)}catch(t){s.error("Lint failed:",t),process.exit(1)}}});export{r as default};
@@ -0,0 +1 @@
1
+ "use strict";const citty=require("citty"),consola=require("consola"),publish$1=require("../shared/basis.CgpyxNW3.cjs");require("node:child_process"),require("nypm"),require("pkg-types"),require("semver"),require("../shared/basis.CSSuyvpq.cjs"),require("c12"),require("../config.cjs");const publish=citty.defineCommand({meta:{name:"publish",description:"Publish package to npm registry"},args:{tag:{type:"string",description:"Specific npm tag to publish to",alias:"t"},stable:{type:"boolean",description:"Publish as stable release (latest tag)",alias:"s"},latest:{type:"boolean",description:"Publish to latest tag",alias:"l"},dryRun:{type:"boolean",description:"Perform a dry run without actually publishing",alias:"d"},access:{type:"string",description:"Package access level (public/private)",alias:"a"},registry:{type:"string",description:"NPM registry URL",alias:"r"},skipBuild:{type:"boolean",description:"Skip build step"},skipTests:{type:"boolean",description:"Skip test step"}},async run({args:e}){try{const t=process.cwd(),i={tag:e.tag,stable:e.stable,latest:e.latest,dryRun:e.dryRun,access:e.access,registry:e.registry,skipBuild:e.skipBuild,skipTests:e.skipTests},s=await publish$1.publishPackage(t,i);s.dryRun?consola.consola.success("Dry run completed successfully"):consola.consola.success(`Published ${s.packageName}@${s.version} to ${s.publishTag}`)}catch(t){consola.consola.error("Failed to publish:",t),process.exit(1)}}});exports.default=publish;
@@ -0,0 +1 @@
1
+ import{defineCommand as r}from"citty";import{consola as i}from"consola";import{p}from"../shared/basis.dc3ybBoz.mjs";import"node:child_process";import"nypm";import"pkg-types";import"semver";import"../shared/basis.C0E7mwQ6.mjs";import"c12";import"../config.mjs";const o=r({meta:{name:"publish",description:"Publish package to npm registry"},args:{tag:{type:"string",description:"Specific npm tag to publish to",alias:"t"},stable:{type:"boolean",description:"Publish as stable release (latest tag)",alias:"s"},latest:{type:"boolean",description:"Publish to latest tag",alias:"l"},dryRun:{type:"boolean",description:"Perform a dry run without actually publishing",alias:"d"},access:{type:"string",description:"Package access level (public/private)",alias:"a"},registry:{type:"string",description:"NPM registry URL",alias:"r"},skipBuild:{type:"boolean",description:"Skip build step"},skipTests:{type:"boolean",description:"Skip test step"}},async run({args:t}){try{const e=process.cwd(),a={tag:t.tag,stable:t.stable,latest:t.latest,dryRun:t.dryRun,access:t.access,registry:t.registry,skipBuild:t.skipBuild,skipTests:t.skipTests},s=await p(e,a);s.dryRun?i.success("Dry run completed successfully"):i.success(`Published ${s.packageName}@${s.version} to ${s.publishTag}`)}catch(e){i.error("Failed to publish:",e),process.exit(1)}}});export{o as default};
@@ -0,0 +1 @@
1
+ "use strict";const citty=require("citty"),consola=require("consola"),nypm=require("nypm"),remove=citty.defineCommand({meta:{name:"remove",description:"Remove dependencies from the project"},args:{packages:{type:"positional",description:"Packages to remove",required:!0},cwd:{type:"string",description:"Working directory",default:process.cwd()},silent:{type:"boolean",description:"Silent mode",alias:"s"},"package-manager":{type:"string",description:"Package manager to use (npm, yarn, pnpm, bun, deno)",alias:"pm"},dev:{type:"boolean",description:"Remove from dev dependencies",alias:"D"},workspace:{type:"string",description:"Workspace name",alias:"w"},global:{type:"boolean",description:"Remove globally",alias:"g"}},async run({args:e}){try{const a=Array.isArray(e.packages)?e.packages:[e.packages],s={cwd:e.cwd,silent:e.silent,packageManager:e["package-manager"],dev:e.dev,workspace:e.workspace,global:e.global};for(const o of a)await nypm.removeDependency(o,s),e.silent||consola.consola.success(`Removed ${o}`)}catch(a){consola.consola.error("Failed to remove dependencies:",a),process.exit(1)}}});exports.default=remove;
@@ -0,0 +1 @@
1
+ import{defineCommand as n}from"citty";import{consola as r}from"consola";import{removeDependency as i}from"nypm";const t=n({meta:{name:"remove",description:"Remove dependencies from the project"},args:{packages:{type:"positional",description:"Packages to remove",required:!0},cwd:{type:"string",description:"Working directory",default:process.cwd()},silent:{type:"boolean",description:"Silent mode",alias:"s"},"package-manager":{type:"string",description:"Package manager to use (npm, yarn, pnpm, bun, deno)",alias:"pm"},dev:{type:"boolean",description:"Remove from dev dependencies",alias:"D"},workspace:{type:"string",description:"Workspace name",alias:"w"},global:{type:"boolean",description:"Remove globally",alias:"g"}},async run({args:e}){try{const a=Array.isArray(e.packages)?e.packages:[e.packages],s={cwd:e.cwd,silent:e.silent,packageManager:e["package-manager"],dev:e.dev,workspace:e.workspace,global:e.global};for(const o of a)await i(o,s),e.silent||r.success(`Removed ${o}`)}catch(a){r.error("Failed to remove dependencies:",a),process.exit(1)}}});export{t as default};
@@ -0,0 +1 @@
1
+ "use strict";const citty=require("citty"),consola=require("consola"),nypm=require("nypm"),run=citty.defineCommand({meta:{name:"run",description:"Run package scripts"},args:{script:{type:"positional",description:"Script name to run",required:!0},cwd:{type:"string",description:"Working directory",default:process.cwd()},silent:{type:"boolean",description:"Silent mode",alias:"s"},"package-manager":{type:"string",description:"Package manager to use (npm, yarn, pnpm, bun, deno)",alias:"pm"}},async run({args:t}){try{await nypm.runScript(t.script,{cwd:t.cwd,silent:t.silent,packageManager:t["package-manager"]}),t.silent||consola.consola.success(`Script "${t.script}" completed successfully`)}catch(e){consola.consola.error(`Failed to run script "${t.script}":`,e),process.exit(1)}}});exports.default=run;
@@ -0,0 +1 @@
1
+ import{defineCommand as a}from"citty";import{consola as t}from"consola";import{runScript as i}from"nypm";const s=a({meta:{name:"run",description:"Run package scripts"},args:{script:{type:"positional",description:"Script name to run",required:!0},cwd:{type:"string",description:"Working directory",default:process.cwd()},silent:{type:"boolean",description:"Silent mode",alias:"s"},"package-manager":{type:"string",description:"Package manager to use (npm, yarn, pnpm, bun, deno)",alias:"pm"}},async run({args:r}){try{await i(r.script,{cwd:r.cwd,silent:r.silent,packageManager:r["package-manager"]}),r.silent||t.success(`Script "${r.script}" completed successfully`)}catch(e){t.error(`Failed to run script "${r.script}":`,e),process.exit(1)}}});export{s as default};
@@ -0,0 +1 @@
1
+ "use strict";const citty=require("citty"),consola=require("consola"),version$1=require("../shared/basis.ByJ8R9TE.cjs");require("node:child_process"),require("pkg-types"),require("semver"),require("../shared/basis.CSSuyvpq.cjs"),require("c12"),require("../config.cjs");const version=citty.defineCommand({meta:{name:"version",description:"Update package version"},args:{patch:{type:"boolean",description:"Increment patch version"},minor:{type:"boolean",description:"Increment minor version"},major:{type:"boolean",description:"Increment major version"},prerelease:{type:"boolean",description:"Create prerelease version"},preid:{type:"string",description:"Prerelease identifier (alpha, beta, rc)"},tag:{type:"string",description:"Git tag name"},message:{type:"string",description:"Commit message template",alias:"m"},version:{type:"positional",description:"Specific version to set"}},async run({args:e}){try{const s=process.cwd(),i={version:e.version,patch:e.patch,minor:e.minor,major:e.major,prerelease:e.prerelease,preid:e.preid,message:e.message,tag:e.tag},r=await version$1.updatePackageVersion(s,i);consola.consola.success(`Version updated: ${r.oldVersion} \u2192 ${r.newVersion}`),r.tagName&&consola.consola.info(`Git tag created: ${r.tagName}`)}catch(s){consola.consola.error("Failed to update version:",s),process.exit(1)}}});exports.default=version;
@@ -0,0 +1 @@
1
+ import{defineCommand as a}from"citty";import{consola as o}from"consola";import{u as s}from"../shared/basis.C5wlo6IO.mjs";import"node:child_process";import"pkg-types";import"semver";import"../shared/basis.C0E7mwQ6.mjs";import"c12";import"../config.mjs";const n=a({meta:{name:"version",description:"Update package version"},args:{patch:{type:"boolean",description:"Increment patch version"},minor:{type:"boolean",description:"Increment minor version"},major:{type:"boolean",description:"Increment major version"},prerelease:{type:"boolean",description:"Create prerelease version"},preid:{type:"string",description:"Prerelease identifier (alpha, beta, rc)"},tag:{type:"string",description:"Git tag name"},message:{type:"string",description:"Commit message template",alias:"m"},version:{type:"positional",description:"Specific version to set"}},async run({args:e}){try{const i=process.cwd(),t={version:e.version,patch:e.patch,minor:e.minor,major:e.major,prerelease:e.prerelease,preid:e.preid,message:e.message,tag:e.tag},r=await s(i,t);o.success(`Version updated: ${r.oldVersion} \u2192 ${r.newVersion}`),r.tagName&&o.info(`Git tag created: ${r.tagName}`)}catch(i){o.error("Failed to update version:",i),process.exit(1)}}});export{n as default};
package/dist/cli.cjs ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ "use strict";const citty=require("citty"),consola=require("consola"),pkgTypes=require("pkg-types");async function m(){const e=await pkgTypes.readPackageJSON(),n=citty.defineCommand({meta:{name:"basis",version:e.version||"",description:e.description||""},subCommands:{init:()=>import("./chunks/init.cjs").then(t=>t.default),config:()=>import("./chunks/config.cjs").then(t=>t.default),lint:()=>import("./chunks/lint.cjs").then(t=>t.default),githooks:()=>import("./chunks/githooks.cjs").then(t=>t.default),install:()=>import("./chunks/install.cjs").then(t=>t.default),i:()=>import("./chunks/install.cjs").then(t=>t.default),add:()=>import("./chunks/add.cjs").then(t=>t.default),remove:()=>import("./chunks/remove.cjs").then(t=>t.default),rm:()=>import("./chunks/remove.cjs").then(t=>t.default),uninstall:()=>import("./chunks/remove.cjs").then(t=>t.default),run:()=>import("./chunks/run.cjs").then(t=>t.default),version:()=>import("./chunks/version.cjs").then(t=>t.default),publish:()=>import("./chunks/publish.cjs").then(t=>t.default)}});await citty.runMain(n)}m().catch(consola.consola.error);
package/dist/cli.d.cts ADDED
@@ -0,0 +1 @@
1
+
package/dist/cli.d.mts ADDED
@@ -0,0 +1 @@
1
+
package/dist/cli.d.ts ADDED
@@ -0,0 +1 @@
1
+
package/dist/cli.mjs ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{defineCommand as i,runMain as o}from"citty";import{consola as r}from"consola";import{readPackageJSON as a}from"pkg-types";async function m(){const e=await a(),n=i({meta:{name:"basis",version:e.version||"",description:e.description||""},subCommands:{init:()=>import("./chunks/init.mjs").then(t=>t.default),config:()=>import("./chunks/config.mjs").then(t=>t.default),lint:()=>import("./chunks/lint.mjs").then(t=>t.default),githooks:()=>import("./chunks/githooks.mjs").then(t=>t.default),install:()=>import("./chunks/install.mjs").then(t=>t.default),i:()=>import("./chunks/install.mjs").then(t=>t.default),add:()=>import("./chunks/add.mjs").then(t=>t.default),remove:()=>import("./chunks/remove.mjs").then(t=>t.default),rm:()=>import("./chunks/remove.mjs").then(t=>t.default),uninstall:()=>import("./chunks/remove.mjs").then(t=>t.default),run:()=>import("./chunks/run.mjs").then(t=>t.default),version:()=>import("./chunks/version.mjs").then(t=>t.default),publish:()=>import("./chunks/publish.mjs").then(t=>t.default)}});await o(n)}m().catch(r.error);
@@ -0,0 +1 @@
1
+ "use strict";function defineBasisConfig(e){return e}const defaultConfig={lint:{staged:{},commitMsg:{types:["feat","fix","docs","style","refactor","perf","test","build","ci","chore","revert"],maxLength:72,minLength:10}},githooks:{autoInitGit:!0,skipGitCheck:!1,force:!1},packageManager:{autoDetect:!0,registry:"https://registry.npmjs.org/"},version:{tagPrefix:"v",prereleaseId:"edge",commitMessage:"chore: release v{version}"},publish:{defaultTag:"edge",stableTag:"latest"}};exports.defaultConfig=defaultConfig,exports.defineBasisConfig=defineBasisConfig;
@@ -0,0 +1 @@
1
+ export { c as defaultConfig, d as defineBasisConfig } from './shared/basis.iRZ1Ylu8.cjs';
@@ -0,0 +1 @@
1
+ export { c as defaultConfig, d as defineBasisConfig } from './shared/basis.iRZ1Ylu8.mjs';
@@ -0,0 +1 @@
1
+ export { c as defaultConfig, d as defineBasisConfig } from './shared/basis.iRZ1Ylu8.js';
@@ -0,0 +1 @@
1
+ function t(e){return e}const s={lint:{staged:{},commitMsg:{types:["feat","fix","docs","style","refactor","perf","test","build","ci","chore","revert"],maxLength:72,minLength:10}},githooks:{autoInitGit:!0,skipGitCheck:!1,force:!1},packageManager:{autoDetect:!0,registry:"https://registry.npmjs.org/"},version:{tagPrefix:"v",prereleaseId:"edge",commitMessage:"chore: release v{version}"},publish:{defaultTag:"edge",stableTag:"latest"}};export{s as defaultConfig,t as defineBasisConfig};
package/dist/index.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";const config=require("./config.cjs"),githooks=require("./shared/basis.DeKfEQsQ.cjs"),init=require("./shared/basis.DweCjqFb.cjs"),lint=require("./shared/basis.D57HxVvD.cjs"),utils=require("./shared/basis.CSSuyvpq.cjs"),publish=require("./shared/basis.CgpyxNW3.cjs"),version=require("./shared/basis.ByJ8R9TE.cjs");require("node:child_process"),require("node:fs/promises"),require("consola"),require("pathe"),require("node:fs"),require("nypm"),require("pkg-types"),require("micromatch"),require("c12"),require("semver");class Basis{config=null;cwd;constructor(s=process.cwd()){this.cwd=s}async getConfig(){if(!this.config){const{config:s}=await utils.loadConfig({cwd:this.cwd});this.config=s}return this.config}async init(s={}){return await init.init(this.cwd,s)}async lintStaged(){const s=await this.getConfig();return await lint.lintStaged(this.cwd,s.lint?.staged)}async lintCommitMessage(){const s=await this.getConfig();return await lint.lintCommitMessage(this.cwd,s.lint?.commitMsg)}async installHooks(){const s=await this.getConfig();await githooks.installHooks(this.cwd,s.githooks)}async uninstallHooks(){const s=await this.getConfig();await githooks.uninstallHooks(this.cwd,s.githooks)}async listHooks(){const s=await this.getConfig();await githooks.listHooks(this.cwd,s.githooks)}}function createBasis(i=process.cwd()){return new Basis(i)}exports.defaultConfig=config.defaultConfig,exports.defineBasisConfig=config.defineBasisConfig,exports.VALID_GIT_HOOKS=githooks.VALID_GIT_HOOKS,exports.installHooks=githooks.installHooks,exports.listHooks=githooks.listHooks,exports.uninstallHooks=githooks.uninstallHooks,exports.init=init.init,exports.getStagedFiles=lint.getStagedFiles,exports.lintCommitMessage=lint.lintCommitMessage,exports.lintStaged=lint.lintStaged,exports.parseCommitMessage=lint.parseCommitMessage,exports.validateCommitMessage=lint.validateCommitMessage,exports.loadConfig=utils.loadConfig,exports.publishPackage=publish.publishPackage,exports.updatePackageVersion=version.updatePackageVersion,exports.Basis=Basis,exports.createBasis=createBasis;