diff --git a/.md b/.md new file mode 100644 index 0000000..b87178d --- /dev/null +++ b/.md @@ -0,0 +1,4 @@ + + +```ts +``` \ No newline at end of file diff --git a/bun.lockb b/bun.lockb index d85d893..250472b 100644 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 7026848..7fd288c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "zod_utilz", - "version": "0.8.3", + "version": "0.8.4", "author": "JacobWeisenburger", "description": "Framework agnostic utilities for Zod", "license": "MIT", @@ -8,15 +8,16 @@ "repository": "https://github.com/JacobWeisenburger/zod_utilz", "homepage": "https://github.com/JacobWeisenburger/zod_utilz", "module": "index.js", + "main": "index.js", "type": "module", "keywords": [ "typescript" ], "scripts": { "test": "clear && bun test --watch", + "test.cmd": "cmd.exe /c start cmd /k bun run test", "build": "clear && bun --watch run scripts/build.ts", - "publish": "clear && bun run scripts/publish.ts", - "cmd": "cmd.exe /c start cmd /k wsl --cd ~/software/zod_utilz_bun" + "publish": "clear && bun run scripts/publish.ts" }, "peerDependencies": { "typescript": "^5.0.0", diff --git a/scripts/publish.ts b/scripts/publish.ts index abfb1b3..f180556 100644 --- a/scripts/publish.ts +++ b/scripts/publish.ts @@ -1,5 +1,4 @@ import { $ } from 'bun' -import { rm, cp } from 'node:fs/promises' import * as Path from 'node:path' // https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages @@ -12,37 +11,16 @@ const logError = ( ctx?: object ) => ( { message }: Error ) => { const root = Path.join( import.meta.dir, '..' ) const dist = Path.join( root, 'dist' ) -const tempSubDir = root.split( 'software' )[ 1 ] -const publishFromDir = Path.join( '/mnt/c/software/temp', tempSubDir, 'dist' ) await Promise.resolve() .then( () => console.log( 'Publishing...' ) ) - .then( async () => { - await rm( publishFromDir, { recursive: true } ) - .then( () => console.log( 'publishFromDir: deleted' ) ) - .catch( logError( { publishFromDir } ) ) - } ) - - .then( async () => { - const section = 'publishFromDir: moved all files' - await cp( dist, publishFromDir, { recursive: true } ) - .then( () => console.log( section ) ) - .catch( logError( { section, dist, publishFromDir } ) ) - } ) - .then( async () => { const section = 'npm publish' - await $`cd ${ publishFromDir } && npm publish --access public` + await $`cd ${ dist } && npm publish --access public` .then( () => console.log( 'npm publish: ran' ) ) .catch( logError( { section } ) ) } ) - .then( async () => { - await rm( publishFromDir, { recursive: true } ) - .then( () => console.log( 'publishFromDir: deleted' ) ) - .catch( logError( { publishFromDir } ) ) - } ) - .then( () => console.log( 'Publish: done' ) ) .catch( logError( { path: import.meta.path } ) ) \ No newline at end of file