adamantite 0.0.3 → 0.0.5

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 (2) hide show
  1. package/dist/index.js +2 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1 +1,2 @@
1
- import{Command as e}from"commander";import t from"process";import{execSync as n}from"child_process";function r(e,t=[],r={}){let i=`${e} ${t.join(` `)}`;n(i,{...r,stdio:`inherit`})}function i(e){try{let t=[`@biomejs/biome`,`lint`,`--fix`];e.length>0&&t.push(...e),r(`npx`,t)}catch(e){let n=e instanceof Error?e.message:`An unknown error occurred`;console.error(`Failed to run Adamantite:`,n),t.exit(1)}}function a(e,n){try{let t=[`@biomejs/biome`,`check`,`--write`];n.unsafe&&t.push(`--unsafe`),e.length>0&&t.push(...e),r(`npx`,t)}catch(e){let n=e instanceof Error?e.message:`An unknown error occurred`;console.error(`Failed to run Adamantite:`,n),t.exit(1)}}const o=`0.0.2`,s=new e;s.version(o),s.command(`lint`).description(`Run Biome linter and fix files`).argument(`[files...]`,`specific files to lint (optional)`).action(i),s.command(`format`).description(`Run Biome formatter and fix files`).argument(`[files...]`,`specific files to format (optional)`).option(`--unsafe`,`apply unsafe fixes`).action(a),s.parse();
1
+ #!/usr/bin/env node
2
+ import{Command as e}from"commander";import t from"process";import{execSync as n}from"child_process";import{readFileSync as r}from"fs";import{dirname as i,join as a}from"path";import{fileURLToPath as o}from"url";function s(e,t=[],r={}){let i=`${e} ${t.join(` `)}`;n(i,{...r,stdio:`inherit`})}function c(){let e=o(import.meta.url),t=i(e),n=JSON.parse(r(a(t,`../package.json`),`utf-8`));return n.version}function l(e,n){try{let t=[`@biomejs/biome`,`check`,`--write`];n.unsafe&&t.push(`--unsafe`),e.length>0&&t.push(...e),s(`npx`,t)}catch(e){let n=e instanceof Error?e.message:`An unknown error occurred`;console.error(`Failed to run Adamantite:`,n),t.exit(1)}}function u(e){try{let t=[`@biomejs/biome`,`lint`,`--fix`];e.length>0&&t.push(...e),s(`npx`,t)}catch(e){let n=e instanceof Error?e.message:`An unknown error occurred`;console.error(`Failed to run Adamantite:`,n),t.exit(1)}}const d=c(),f=new e;f.version(d),f.command(`lint`).description(`Run Biome linter and fix files`).argument(`[files...]`,`specific files to lint (optional)`).action(u),f.command(`format`).description(`Run Biome formatter and fix files`).argument(`[files...]`,`specific files to format (optional)`).option(`--unsafe`,`apply unsafe fixes`).action(l),f.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adamantite",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "An strict and opinionated set of presets for modern TypeScript applications",
5
5
  "keywords": [
6
6
  "adamantite",