@stacksjs/actions 0.75.127 → 0.75.129

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.
@@ -1 +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)}
1
+ const lintableFile=/\.(?:ts|js|stx|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)}
@@ -5,7 +5,7 @@ export declare function standalonePackageUpdateCommand(): string;
5
5
  * already-declared `stacks` package refreshes its dependency graph without
6
6
  * rewriting the application's ownership boundary.
7
7
  */
8
- export declare function frameworkPackageUpdateCommand(): string;
8
+ export declare function frameworkPackageUpdateCommand(force?: boolean): string;
9
9
  /** The installed meta-package version, or null when dependencies are absent/incomplete. */
10
10
  export declare function installedStacksVersion(projectRoot: string): string | null;
11
11
  /** Whether the declared target still needs to be installed locally. */
@@ -1,4 +1,4 @@
1
- import{existsSync,readdirSync,readFileSync,statSync,writeFileSync}from"node:fs";import{join,relative}from"node:path";import process from"node:process";import{runCommand}from"@stacksjs/cli";import{installedDefaultsVersion}from"@stacksjs/path";import{detectProjectAiProviders,measureDefaultsDrift,migratePackageProjectManifest,migratePackageProjectTsconfig,summarizeStructureChanges,syncPackageProjectFiles}from"./package-project";import{describeDanglingRouteActions,findDanglingRouteActions,pruneRetiredScaffoldRoutes}from"./route-actions";export function hasStacksDependency(pkg){return Boolean(pkg.dependencies?.stacks||pkg.devDependencies?.stacks)}export function standalonePackageUpdateCommand(){return"bun update"}export function frameworkPackageUpdateCommand(){return"bun update stacks"}export function installedStacksVersion(projectRoot){try{const manifest=JSON.parse(readFileSync(join(projectRoot,"node_modules/stacks/package.json"),"utf-8"));return typeof manifest.version==="string"?manifest.version:null}catch{return null}}export function needsFrameworkInstall(projectRoot,target){return installedStacksVersion(projectRoot)!==target}async function updateStandalonePackage(projectRoot,options){console.log(`
1
+ import{existsSync,readdirSync,readFileSync,statSync,writeFileSync}from"node:fs";import{join,relative}from"node:path";import process from"node:process";import{runCommand}from"@stacksjs/cli";import{installedDefaultsVersion}from"@stacksjs/path";import{detectProjectAiProviders,measureDefaultsDrift,migratePackageProjectManifest,migratePackageProjectTsconfig,summarizeStructureChanges,syncPackageProjectFiles}from"./package-project";import{describeDanglingRouteActions,findDanglingRouteActions,pruneRetiredScaffoldRoutes}from"./route-actions";export function hasStacksDependency(pkg){return Boolean(pkg.dependencies?.stacks||pkg.devDependencies?.stacks)}export function standalonePackageUpdateCommand(){return"bun update"}export function frameworkPackageUpdateCommand(force=!1){return force?"bun update stacks --force":"bun update stacks"}export function installedStacksVersion(projectRoot){try{const manifest=JSON.parse(readFileSync(join(projectRoot,"node_modules/stacks/package.json"),"utf-8"));return typeof manifest.version==="string"?manifest.version:null}catch{return null}}export function needsFrameworkInstall(projectRoot,target){return installedStacksVersion(projectRoot)!==target}async function updateStandalonePackage(projectRoot,options){console.log(`
2
2
  Standalone package detected. No Stacks framework source is installed.`);if(options.dryRun){console.log(" --dry-run: would refresh the package dependencies with `bun update`. No files were changed.\n");process.exit(0)}if(options.noPostinstall){console.log(" --no-postinstall: skipping the dependency refresh. Run `bun update` when ready.\n");process.exit(0)}console.log(` Refreshing declared dependencies...
3
3
  `);if((await runCommand(standalonePackageUpdateCommand(),{cwd:projectRoot})).isErr){console.error("\n\u2717 The dependency refresh failed. Resolve the reported error and re-run `buddy update`.\n");process.exit(1)}console.log(`
4
4
  \u2714 Standalone package dependencies are up to date.
@@ -11,7 +11,7 @@ import{existsSync,readdirSync,readFileSync,statSync,writeFileSync}from"node:fs";
11
11
  `)?`
12
12
  `:"";writeFileSync(pkgPath,`${JSON.stringify(pkg,null,2)}${trailing}`);console.log("\u2714 Updated package.json")}if(options.noPostinstall){console.log(" --no-postinstall: skipping install. Run this to pull the new versions:");console.log(` ${frameworkPackageUpdateCommand()}
13
13
  `);process.exit(0)}const dependenciesNeedInstall=needsFrameworkInstall(projectRoot,target);if(changes.length>0||manifestChanges.length>0||projectManifestChanges.length>0||dependenciesNeedInstall||options.force){console.log(` Installing\u2026
14
- `);if((await runCommand(frameworkPackageUpdateCommand(),{cwd:projectRoot})).isErr){console.error("\n\u2717 The install step failed. Your package.json was updated - resolve the error and re-run `bun update`.\n");process.exit(1)}}const defaultsPackageRoot=join(projectRoot,"node_modules/@stacksjs/defaults"),structureChanges=existsSync(join(defaultsPackageRoot,"package.json"))?syncPackageProjectFiles(projectRoot,defaultsPackageRoot):[],tsconfigChanges=migratePackageProjectTsconfig(projectRoot),prunedRoutes=reportRouteActions(projectRoot,!1);if(structureChanges.length>0||tsconfigChanges.length>0){const added=structureChanges.filter((change)=>change.action==="add").length,updated=structureChanges.filter((change)=>change.action==="update").length+tsconfigChanges.length,removed=structureChanges.filter((change)=>change.action==="remove").length;console.log(` Project structure: +${added} ~${updated} -${removed}`)}if(structureChanges.length>0)await regenerateAutoImports(projectRoot);for(const provider of detectProjectAiProviders(projectRoot))if((await runCommand(`./buddy setup:ai ${provider} --force`,{cwd:projectRoot})).isErr){console.error(`
14
+ `);if((await runCommand(frameworkPackageUpdateCommand(options.force),{cwd:projectRoot})).isErr){console.error("\n\u2717 The install step failed. Your package.json was updated - resolve the error and re-run `bun update`.\n");process.exit(1)}}const defaultsPackageRoot=join(projectRoot,"node_modules/@stacksjs/defaults"),structureChanges=existsSync(join(defaultsPackageRoot,"package.json"))?syncPackageProjectFiles(projectRoot,defaultsPackageRoot):[],tsconfigChanges=migratePackageProjectTsconfig(projectRoot),prunedRoutes=reportRouteActions(projectRoot,!1);if(structureChanges.length>0||tsconfigChanges.length>0){const added=structureChanges.filter((change)=>change.action==="add").length,updated=structureChanges.filter((change)=>change.action==="update").length+tsconfigChanges.length,removed=structureChanges.filter((change)=>change.action==="remove").length;console.log(` Project structure: +${added} ~${updated} -${removed}`)}if(structureChanges.length>0)await regenerateAutoImports(projectRoot);for(const provider of detectProjectAiProviders(projectRoot))if((await runCommand(`./buddy setup:ai ${provider} --force`,{cwd:projectRoot})).isErr){console.error(`
15
15
  \u2717 AI setup refresh failed for ${provider}. Re-run \`buddy setup:ai ${provider} --force\`.
16
16
  `);process.exit(1)}if(!(changes.length>0||manifestChanges.length>0||projectManifestChanges.length>0||dependenciesNeedInstall||structureChanges.length>0||tsconfigChanges.length>0||prunedRoutes>0)&&!options.force)console.log(`
17
17
  \u2714 Already up to date - dependencies and managed project files match the target.
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.127",
5
+ "version": "0.75.129",
6
6
  "description": "The Stacks actions.",
7
7
  "author": "Chris Breuer",
8
8
  "contributors": [
@@ -66,54 +66,54 @@
66
66
  "prepublishOnly": "bun run build"
67
67
  },
68
68
  "dependencies": {
69
- "@stacksjs/action-runner": "0.75.127",
70
- "@stacksjs/ai": "0.75.127",
71
- "@stacksjs/analytics": "0.75.127",
72
- "@stacksjs/api": "0.75.127",
73
- "@stacksjs/auth": "0.75.127",
74
- "@stacksjs/build": "0.75.127",
69
+ "@stacksjs/action-runner": "0.75.129",
70
+ "@stacksjs/ai": "0.75.129",
71
+ "@stacksjs/analytics": "0.75.129",
72
+ "@stacksjs/api": "0.75.129",
73
+ "@stacksjs/auth": "0.75.129",
74
+ "@stacksjs/build": "0.75.129",
75
75
  "@stacksjs/bumpx": "^0.2.20",
76
76
  "@stacksjs/bunpress": "^0.2.15",
77
- "@stacksjs/cli": "0.75.127",
78
- "@stacksjs/cloud": "0.75.127",
79
- "@stacksjs/cms": "0.75.127",
80
- "@stacksjs/components": "^0.2.422",
81
- "@stacksjs/config": "0.75.127",
82
- "@stacksjs/database": "0.75.127",
83
- "@stacksjs/desktop-build": "0.75.127",
84
- "@stacksjs/dns": "0.75.127",
85
- "@stacksjs/enums": "0.75.127",
86
- "@stacksjs/env": "0.75.127",
87
- "@stacksjs/error-handling": "0.75.127",
77
+ "@stacksjs/cli": "0.75.129",
78
+ "@stacksjs/cloud": "0.75.129",
79
+ "@stacksjs/cms": "0.75.129",
80
+ "@stacksjs/components": "^0.2.434",
81
+ "@stacksjs/config": "0.75.129",
82
+ "@stacksjs/database": "0.75.129",
83
+ "@stacksjs/desktop-build": "0.75.129",
84
+ "@stacksjs/dns": "0.75.129",
85
+ "@stacksjs/enums": "0.75.129",
86
+ "@stacksjs/env": "0.75.129",
87
+ "@stacksjs/error-handling": "0.75.129",
88
88
  "@stacksjs/gitit": "^0.2.5",
89
- "@stacksjs/i18n": "0.75.127",
90
- "@stacksjs/image": "0.75.127",
91
- "@stacksjs/logging": "0.75.127",
89
+ "@stacksjs/i18n": "0.75.129",
90
+ "@stacksjs/image": "0.75.129",
91
+ "@stacksjs/logging": "0.75.129",
92
92
  "@stacksjs/logsmith": "^0.2.11",
93
- "@stacksjs/mobile": "0.75.127",
94
- "@stacksjs/orm": "0.75.127",
95
- "@stacksjs/path": "0.75.127",
96
- "@stacksjs/payments": "0.75.127",
97
- "@stacksjs/queue": "0.75.127",
98
- "@stacksjs/registry": "0.75.127",
99
- "@stacksjs/router": "0.75.127",
93
+ "@stacksjs/mobile": "0.75.129",
94
+ "@stacksjs/orm": "0.75.129",
95
+ "@stacksjs/path": "0.75.129",
96
+ "@stacksjs/payments": "0.75.129",
97
+ "@stacksjs/queue": "0.75.129",
98
+ "@stacksjs/registry": "0.75.129",
99
+ "@stacksjs/router": "0.75.129",
100
100
  "@stacksjs/rpx": "^0.11.54",
101
- "@stacksjs/scheduler": "0.75.127",
102
- "@stacksjs/search-engine": "0.75.127",
103
- "@stacksjs/security": "0.75.127",
104
- "@stacksjs/server": "0.75.127",
105
- "@stacksjs/sites": "0.75.127",
106
- "@stacksjs/storage": "0.75.127",
107
- "@stacksjs/strings": "0.75.127",
108
- "@stacksjs/stx": "^0.2.422",
101
+ "@stacksjs/scheduler": "0.75.129",
102
+ "@stacksjs/search-engine": "0.75.129",
103
+ "@stacksjs/security": "0.75.129",
104
+ "@stacksjs/server": "0.75.129",
105
+ "@stacksjs/sites": "0.75.129",
106
+ "@stacksjs/storage": "0.75.129",
107
+ "@stacksjs/strings": "0.75.129",
108
+ "@stacksjs/stx": "^0.2.434",
109
109
  "@stacksjs/tlsx": "^0.13.19",
110
110
  "@stacksjs/ts-cloud": "^0.16.47",
111
111
  "@stacksjs/ts-md": "^0.1.1",
112
- "@stacksjs/tunnel": "0.75.127",
113
- "@stacksjs/types": "0.75.127",
114
- "@stacksjs/utils": "0.75.127",
115
- "@stacksjs/whois": "0.75.127",
116
- "bun-plugin-stx": "^0.2.422"
112
+ "@stacksjs/tunnel": "0.75.129",
113
+ "@stacksjs/types": "0.75.129",
114
+ "@stacksjs/utils": "0.75.129",
115
+ "@stacksjs/whois": "0.75.129",
116
+ "bun-plugin-stx": "^0.2.434"
117
117
  },
118
118
  "peerDependencies": {
119
119
  "craft-native": ">=0.0.127",
@@ -128,7 +128,7 @@
128
128
  }
129
129
  },
130
130
  "devDependencies": {
131
- "@stacksjs/validation": "0.75.127",
131
+ "@stacksjs/validation": "0.75.129",
132
132
  "better-dx": "^0.2.24"
133
133
  }
134
134
  }