@stacksjs/actions 0.64.2 → 0.64.3

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/upgrade.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- var o=Object.create;var{getPrototypeOf:j,defineProperty:r,getOwnPropertyNames:h}=Object;var m=Object.prototype.hasOwnProperty;var p=(s,t,e)=>{e=s!=null?o(j(s)):{};const i=t||!s||!s.__esModule?r(e,"default",{value:s,enumerable:!0}):e;for(let c of h(s))if(!m.call(i,c))r(i,c,{get:()=>s[c],enumerable:!0});return i};var w=(s,t)=>()=>(t||s((t={exports:{}}).exports,t),t.exports);var x=(s,t)=>{for(var e in t)r(s,e,{get:t[e],enumerable:!0,configurable:!0,set:(i)=>t[e]=()=>i})};var f=(s,t)=>()=>(s&&(t=s(s=0)),t);import n from"process";import{intro as y,outro as l,runCommand as u}from"@stacksjs/cli";import{NpmScript as v}from"@stacksjs/enums";import{log as k}from"@stacksjs/logging";import{projectPath as b}from"@stacksjs/path";import*as a from"@stacksjs/storage";var d="0.64.2";function q(s){try{}catch(t){}}async function z(s){const e=b("updates");if(a.doesFolderExist(e))await a.deleteFolder(e);k.info("Downloading framework updates..."),await u("giget stacks updates",s),k.success(`Your framework updated correctly to version: v${d}`)}async function C(){const s=await y("buddy upgrade:dependencies"),t=await u(v.UpgradeDependencies,{cwd:b()});if(t.isErr())await l("While running the upgrade:dependencies command, there was an issue",{startTime:s,useSeconds:!0},t.error),n.exit();await l("Freshly updated your dependencies.",{startTime:s,useSeconds:!0}),n.exit()}export{C as updateDependencies,z as downloadFrameworkUpdate,q as checkForUncommittedChanges};
2
+ var o=Object.create;var{getPrototypeOf:j,defineProperty:r,getOwnPropertyNames:h}=Object;var m=Object.prototype.hasOwnProperty;var p=(s,t,e)=>{e=s!=null?o(j(s)):{};const i=t||!s||!s.__esModule?r(e,"default",{value:s,enumerable:!0}):e;for(let c of h(s))if(!m.call(i,c))r(i,c,{get:()=>s[c],enumerable:!0});return i};var w=(s,t)=>()=>(t||s((t={exports:{}}).exports,t),t.exports);var x=(s,t)=>{for(var e in t)r(s,e,{get:t[e],enumerable:!0,configurable:!0,set:(i)=>t[e]=()=>i})};var f=(s,t)=>()=>(s&&(t=s(s=0)),t);import n from"process";import{intro as y,outro as l,runCommand as u}from"@stacksjs/cli";import{NpmScript as v}from"@stacksjs/enums";import{log as k}from"@stacksjs/logging";import{projectPath as b}from"@stacksjs/path";import*as a from"@stacksjs/storage";var d="0.64.3";function q(s){try{}catch(t){}}async function z(s){const e=b("updates");if(a.doesFolderExist(e))await a.deleteFolder(e);k.info("Downloading framework updates..."),await u("giget stacks updates",s),k.success(`Your framework updated correctly to version: v${d}`)}async function C(){const s=await y("buddy upgrade:dependencies"),t=await u(v.UpgradeDependencies,{cwd:b()});if(t.isErr())await l("While running the upgrade:dependencies command, there was an issue",{startTime:s,useSeconds:!0},t.error),n.exit();await l("Freshly updated your dependencies.",{startTime:s,useSeconds:!0}),n.exit()}export{C as updateDependencies,z as downloadFrameworkUpdate,q as checkForUncommittedChanges};
3
3
 
4
- //# debugId=CE677860CCB663F064756E2164756E21
4
+ //# debugId=629E07E30D6B501364756E2164756E21
5
5
  //# sourceMappingURL=upgrade.js.map
@@ -5,6 +5,6 @@
5
5
  "import process from 'node:process'\nimport { intro, outro, runCommand } from '@stacksjs/cli'\nimport { NpmScript } from '@stacksjs/enums'\nimport { log } from '@stacksjs/logging'\nimport { projectPath } from '@stacksjs/path'\nimport * as storage from '@stacksjs/storage'\nimport type { UpgradeOptions } from '@stacksjs/types'\nimport { version } from '../package.json'\n\n// import { determineDebugLevel } from '@stacksjs/utils'\n\n// export async function checkForUncommittedChanges(path = './stacks', options: UpgradeOptions) {\nexport function checkForUncommittedChanges(options: UpgradeOptions) {\n try {\n // const stdio = determineDebugLevel(options) ? 'inherit' : 'ignore'\n // check if the stacks folder has any updates\n // https://carlosbecker.com/posts/git-changed/\n // await spawn(`git diff --quiet HEAD -- ${path}`, { stdio, cwd: projectPath() })\n } catch (error: any) {\n // if (error.status === 1) {\n // even though the ./stacks folder should not be edited, instead config values should be adjusted,\n // there is a chance that users may apply local core edits, as it’s totally acceptable, as long as\n // the user knows what they are doing. There is also a change that simply the deps within stacks\n // folder have been updated and that could produce a diff.\n // if (!options?.force) {\n // const confirmed = await log.prompt('We detected there are uncommitted in the ./stacks folder. Do you want to overwrite those?', {\n // type: 'confirm',\n // })\n // if (!confirmed) {\n // log.info('Aborted. Stacks did not update itself.')\n // log.info('Note: if you commit your changes and replay the update, you can see what changed.')\n // process.exit(ExitCode.Success)\n // }\n // }\n // }\n }\n}\n\nexport async function downloadFrameworkUpdate(options: UpgradeOptions) {\n const tempFolderName = 'updates'\n const tempUpdatePath = projectPath(tempFolderName)\n\n if (storage.doesFolderExist(tempUpdatePath)) await storage.deleteFolder(tempUpdatePath)\n\n log.info('Downloading framework updates...')\n await runCommand(`giget stacks ${tempFolderName}`, options)\n log.success(`Your framework updated correctly to version: v${version}`)\n}\n\n// export async function updateDependencies(options: UpgradeOptions) {\nexport async function updateDependencies() {\n const perf = await intro('buddy upgrade:dependencies')\n const result = await runCommand(NpmScript.UpgradeDependencies, {\n cwd: projectPath(),\n })\n\n if (result.isErr()) {\n await outro(\n 'While running the upgrade:dependencies command, there was an issue',\n { startTime: perf, useSeconds: true },\n result.error,\n )\n process.exit()\n }\n\n await outro('Freshly updated your dependencies.', {\n startTime: perf,\n useSeconds: true,\n })\n process.exit()\n}\n"
6
6
  ],
7
7
  "mappings": ";4fAAA,uBACA,gBAAS,WAAO,gBAAO,sBACvB,oBAAS,wBACT,cAAS,0BACT,sBAAS,uBACT,mDAOO,SAAS,CAA0B,CAAC,EAAyB,CAClE,GAAI,QAKK,EAAP,GAoBJ,eAAsB,CAAuB,CAAC,EAAyB,CAErE,MAAM,EAAiB,EADA,SAC0B,EAEjD,GAAY,kBAAgB,CAAc,EAAG,MAAc,eAAa,CAAc,EAEtF,EAAI,KAAK,kCAAkC,EAC3C,MAAM,EAAW,uBAAkC,CAAO,EAC1D,EAAI,QAAQ,iDAAiD,GAAS,EAIxE,eAAsB,CAAkB,EAAG,CACzC,MAAM,EAAO,MAAM,EAAM,4BAA4B,EAC/C,EAAS,MAAM,EAAW,EAAU,oBAAqB,CAC7D,IAAK,EAAY,CACnB,CAAC,EAED,GAAI,EAAO,MAAM,EACf,MAAM,EACJ,qEACA,CAAE,UAAW,EAAM,WAAY,EAAK,EACpC,EAAO,KACT,EACA,EAAQ,KAAK,EAGf,MAAM,EAAM,qCAAsC,CAChD,UAAW,EACX,WAAY,EACd,CAAC,EACD,EAAQ,KAAK",
8
- "debugId": "CE677860CCB663F064756E2164756E21",
8
+ "debugId": "629E07E30D6B501364756E2164756E21",
9
9
  "names": []
10
10
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/actions",
3
3
  "type": "module",
4
- "version": "0.64.2",
4
+ "version": "0.64.3",
5
5
  "description": "The Stacks actions.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",