@stacksjs/actions 0.75.41 → 0.75.42

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.
@@ -0,0 +1,2 @@
1
+ /** Whether `buddy lint` lints `file`, a path relative to the project root with `/` separators. */
2
+ export declare function isLintablePath(file: string): boolean;
@@ -0,0 +1 @@
1
+ const lintableFile=/\.(?:ts|js|json|md|yaml|yml)$/i,ignoredPath=/(?:^|\/)(?:node_modules|dist|pantry|storage\/framework\/cache|\.git|\.stx|\.stx-serve)(?:\/|$)/;export function isLintablePath(file){return lintableFile.test(file)&&!ignoredPath.test(file)}
package/dist/lint/lint.js CHANGED
@@ -1 +1 @@
1
- import process from"node:process";import{log}from"@stacksjs/cli";import{execSync}from"node:child_process";import{runFormat,runLint}from"pickier";const lintableFile=/\.(?:ts|js|json|md|yaml|yml)$/i,ignoredPath=/(?:^|\/)(?:node_modules|dist|pantry|storage\/framework\/cache|\.git|\.stx|\.stx-serve)(?:\/|$)/;export function lintableFiles(cwd){try{return execSync("git ls-files -z --cached --others --exclude-standard",{cwd,encoding:"utf8",stdio:["ignore","pipe","ignore"]}).split("\x00").filter((file)=>lintableFile.test(file)&&!ignoredPath.test(file))}catch{return[]}}export async function lintProject(options={}){const cwd=options.cwd??process.cwd();log.info(options.fix?"Ensuring Code Style...":"Checking Code Style...");const files=lintableFiles(cwd);if(!files.length){log.success("Linted");return{ok:!0}}const ok=await runLint(files,{maxWarnings:9999,fix:options.fix})===0;if(ok)log.success("Linted");return{ok}}export function lintFix(options={}){return lintProject({...options,fix:!0})}export async function formatProject(options={}){const cwd=options.cwd??process.cwd(),files=lintableFiles(cwd);if(!files.length)return{ok:!0};return{ok:await runFormat(files,{write:options.write,check:options.check})===0}}
1
+ import process from"node:process";import{log}from"@stacksjs/cli";import{execSync}from"node:child_process";import{runFormat,runLint}from"pickier";import{isLintablePath}from"./files";export function lintableFiles(cwd){try{return execSync("git ls-files -z --cached --others --exclude-standard",{cwd,encoding:"utf8",stdio:["ignore","pipe","ignore"]}).split("\x00").filter(isLintablePath)}catch{return[]}}export async function lintProject(options={}){const cwd=options.cwd??process.cwd();log.info(options.fix?"Ensuring Code Style...":"Checking Code Style...");const files=lintableFiles(cwd);if(!files.length){log.success("Linted");return{ok:!0}}const ok=await runLint(files,{maxWarnings:9999,fix:options.fix})===0;if(ok)log.success("Linted");return{ok}}export function lintFix(options={}){return lintProject({...options,fix:!0})}export async function formatProject(options={}){const cwd=options.cwd??process.cwd(),files=lintableFiles(cwd);if(!files.length)return{ok:!0};return{ok:await runFormat(files,{write:options.write,check:options.check})===0}}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/actions",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.75.41",
5
+ "version": "0.75.42",
6
6
  "description": "The Stacks actions.",
7
7
  "author": "Chris Breuer",
8
8
  "contributors": [
@@ -60,57 +60,57 @@
60
60
  "prepublishOnly": "bun run build"
61
61
  },
62
62
  "dependencies": {
63
- "@stacksjs/action-runner": "0.75.41",
64
- "@stacksjs/ai": "0.75.41",
65
- "@stacksjs/analytics": "0.75.41",
66
- "@stacksjs/api": "0.75.41",
67
- "@stacksjs/auth": "0.75.41",
68
- "@stacksjs/build": "0.75.41",
63
+ "@stacksjs/action-runner": "0.75.42",
64
+ "@stacksjs/ai": "0.75.42",
65
+ "@stacksjs/analytics": "0.75.42",
66
+ "@stacksjs/api": "0.75.42",
67
+ "@stacksjs/auth": "0.75.42",
68
+ "@stacksjs/build": "0.75.42",
69
69
  "@stacksjs/bumpx": "^0.2.18",
70
70
  "@stacksjs/bunpress": "^0.2.14",
71
- "@stacksjs/cli": "0.75.41",
72
- "@stacksjs/cloud": "0.75.41",
73
- "@stacksjs/cms": "0.75.41",
74
- "@stacksjs/components": "^0.2.348",
75
- "@stacksjs/config": "0.75.41",
76
- "@stacksjs/database": "0.75.41",
77
- "@stacksjs/desktop-build": "0.75.41",
78
- "@stacksjs/dns": "0.75.41",
79
- "@stacksjs/enums": "0.75.41",
80
- "@stacksjs/env": "0.75.41",
81
- "@stacksjs/error-handling": "0.75.41",
71
+ "@stacksjs/cli": "0.75.42",
72
+ "@stacksjs/cloud": "0.75.42",
73
+ "@stacksjs/cms": "0.75.42",
74
+ "@stacksjs/components": "^0.2.350",
75
+ "@stacksjs/config": "0.75.42",
76
+ "@stacksjs/database": "0.75.42",
77
+ "@stacksjs/desktop-build": "0.75.42",
78
+ "@stacksjs/dns": "0.75.42",
79
+ "@stacksjs/enums": "0.75.42",
80
+ "@stacksjs/env": "0.75.42",
81
+ "@stacksjs/error-handling": "0.75.42",
82
82
  "@stacksjs/gitit": "^0.2.5",
83
- "@stacksjs/i18n": "0.75.41",
84
- "@stacksjs/image": "0.75.41",
85
- "@stacksjs/logging": "0.75.41",
83
+ "@stacksjs/i18n": "0.75.42",
84
+ "@stacksjs/image": "0.75.42",
85
+ "@stacksjs/logging": "0.75.42",
86
86
  "@stacksjs/logsmith": "^0.2.11",
87
- "@stacksjs/orm": "0.75.41",
88
- "@stacksjs/path": "0.75.41",
89
- "@stacksjs/payments": "0.75.41",
90
- "@stacksjs/queue": "0.75.41",
91
- "@stacksjs/registry": "0.75.41",
92
- "@stacksjs/router": "0.75.41",
87
+ "@stacksjs/orm": "0.75.42",
88
+ "@stacksjs/path": "0.75.42",
89
+ "@stacksjs/payments": "0.75.42",
90
+ "@stacksjs/queue": "0.75.42",
91
+ "@stacksjs/registry": "0.75.42",
92
+ "@stacksjs/router": "0.75.42",
93
93
  "@stacksjs/rpx": "^0.11.54",
94
- "@stacksjs/scheduler": "0.75.41",
95
- "@stacksjs/search-engine": "0.75.41",
96
- "@stacksjs/security": "0.75.41",
97
- "@stacksjs/server": "0.75.41",
98
- "@stacksjs/sites": "0.75.41",
99
- "@stacksjs/storage": "0.75.41",
100
- "@stacksjs/strings": "0.75.41",
101
- "@stacksjs/stx": "^0.2.348",
94
+ "@stacksjs/scheduler": "0.75.42",
95
+ "@stacksjs/search-engine": "0.75.42",
96
+ "@stacksjs/security": "0.75.42",
97
+ "@stacksjs/server": "0.75.42",
98
+ "@stacksjs/sites": "0.75.42",
99
+ "@stacksjs/storage": "0.75.42",
100
+ "@stacksjs/strings": "0.75.42",
101
+ "@stacksjs/stx": "^0.2.350",
102
102
  "@stacksjs/tlsx": "^0.13.19",
103
- "@stacksjs/ts-cloud": "^0.16.16",
103
+ "@stacksjs/ts-cloud": "^0.16.23",
104
104
  "@stacksjs/ts-md": "^0.1.1",
105
- "@stacksjs/tunnel": "0.75.41",
106
- "@stacksjs/types": "0.75.41",
107
- "@stacksjs/utils": "0.75.41",
108
- "@stacksjs/whois": "0.75.41",
109
- "bun-plugin-stx": "^0.2.348"
105
+ "@stacksjs/tunnel": "0.75.42",
106
+ "@stacksjs/types": "0.75.42",
107
+ "@stacksjs/utils": "0.75.42",
108
+ "@stacksjs/whois": "0.75.42",
109
+ "bun-plugin-stx": "^0.2.350"
110
110
  },
111
111
  "peerDependencies": {
112
112
  "craft-native": ">=0.0.107",
113
- "pickier": "^0.1.65"
113
+ "pickier": "^0.1.67"
114
114
  },
115
115
  "peerDependenciesMeta": {
116
116
  "pickier": {
@@ -121,7 +121,7 @@
121
121
  }
122
122
  },
123
123
  "devDependencies": {
124
- "@stacksjs/validation": "0.75.41",
124
+ "@stacksjs/validation": "0.75.42",
125
125
  "better-dx": "^0.2.24"
126
126
  }
127
127
  }