@willbooster/shared-lib 7.0.3 → 7.1.1

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
+ "use strict";exports.ensureTruthy=function(r,t){if(!t)throw new Error(`The value of "${r}" must be truthy.`);return t};
2
+ //# sourceMappingURL=assert.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assert.cjs","sources":["../src/assert.ts"],"sourcesContent":["export function ensureTruthy<T>(name: string, value: T): NonNullable<T> {\n if (!value) {\n throw new Error(`The value of \"${name}\" must be truthy.`);\n }\n return value;\n}\n"],"names":["name","value","Error"],"mappings":"kCAAO,SAAyBA,EAAcC,GAC5C,IAAKA,EACH,MAAM,IAAIC,MAAM,iBAAiBF,sBAEnC,OAAOC,CACT"}
@@ -0,0 +1 @@
1
+ export declare function ensureTruthy<T>(name: string, value: T): NonNullable<T>;
package/dist/assert.js ADDED
@@ -0,0 +1,2 @@
1
+ function r(r,t){if(!t)throw new Error(`The value of "${r}" must be truthy.`);return t}export{r as ensureTruthy};
2
+ //# sourceMappingURL=assert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assert.js","sources":["../src/assert.ts"],"sourcesContent":["export function ensureTruthy<T>(name: string, value: T): NonNullable<T> {\n if (!value) {\n throw new Error(`The value of \"${name}\" must be truthy.`);\n }\n return value;\n}\n"],"names":["ensureTruthy","name","value","Error"],"mappings":"AAAO,SAASA,EAAgBC,EAAcC,GAC5C,IAAKA,EACH,MAAM,IAAIC,MAAM,iBAAiBF,sBAEnC,OAAOC,CACT"}
package/dist/env.cjs ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";exports.getRequiredEnvValue=function(e){const r=process.env[e];if(!r)throw new Error(`${e} environment variable is required.`);return r};
2
+ //# sourceMappingURL=env.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.cjs","sources":["../src/env.ts"],"sourcesContent":["export function getRequiredEnvValue(key: string): string {\n const value = process.env[key];\n if (!value) {\n throw new Error(`${key} environment variable is required.`);\n }\n return value;\n}\n"],"names":["key","value","process","env","Error"],"mappings":"yCAAO,SAA6BA,GAClC,MAAMC,EAAQC,QAAQC,IAAIH,GAC1B,IAAKC,EACH,MAAM,IAAIG,MAAM,GAAGJ,uCAErB,OAAOC,CACT"}
package/dist/env.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare function getRequiredEnvValue(key: string): string;
package/dist/env.js ADDED
@@ -0,0 +1,2 @@
1
+ function r(r){const e=process.env[r];if(!e)throw new Error(`${r} environment variable is required.`);return e}export{r as getRequiredEnvValue};
2
+ //# sourceMappingURL=env.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.js","sources":["../src/env.ts"],"sourcesContent":["export function getRequiredEnvValue(key: string): string {\n const value = process.env[key];\n if (!value) {\n throw new Error(`${key} environment variable is required.`);\n }\n return value;\n}\n"],"names":["getRequiredEnvValue","key","value","process","env","Error"],"mappings":"AAAO,SAASA,EAAoBC,GAClC,MAAMC,EAAQC,QAAQC,IAAIH,GAC1B,IAAKC,EACH,MAAM,IAAIG,MAAM,GAAGJ,uCAErB,OAAOC,CACT"}
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("./error.cjs"),r=require("./humanize.cjs"),s=require("./mail.cjs"),n=require("./parseCommandLineArgs.cjs"),o=require("./shuffle.cjs"),i=require("./sleep.cjs"),t=require("./sqlite.cjs"),a=require("./zenkaku.cjs");exports.errorify=e.errorify,exports.ignoreEnoent=e.ignoreEnoent,exports.ignoreEnoentAsync=e.ignoreEnoentAsync,exports.ignoreError=e.ignoreError,exports.ignoreErrorAsync=e.ignoreErrorAsync,exports.withRetry=e.withRetry,exports.humanizeNumber=r.humanizeNumber,exports.mailTemplates=s.mailTemplates,exports.parseCommandLineArgs=n.parseCommandLineArgs,exports.shuffle=o.shuffle,exports.sleep=i.sleep,exports.getConnectionLevelSqlitePragmas=t.getConnectionLevelSqlitePragmas,exports.getPersistentSqlitePragmas=t.getPersistentSqlitePragmas,exports.zenkakuAlphanumericalsToHankaku=a.zenkakuAlphanumericalsToHankaku;
1
+ "use strict";var e=require("./assert.cjs"),r=require("./error.cjs"),s=require("./env.cjs"),n=require("./humanize.cjs"),t=require("./mail.cjs"),i=require("./parseCommandLineArgs.cjs"),o=require("./shuffle.cjs"),a=require("./sleep.cjs"),u=require("./sqlite.cjs"),p=require("./zenkaku.cjs");exports.ensureTruthy=e.ensureTruthy,exports.errorify=r.errorify,exports.ignoreEnoent=r.ignoreEnoent,exports.ignoreEnoentAsync=r.ignoreEnoentAsync,exports.ignoreError=r.ignoreError,exports.ignoreErrorAsync=r.ignoreErrorAsync,exports.withRetry=r.withRetry,exports.getRequiredEnvValue=s.getRequiredEnvValue,exports.humanizeNumber=n.humanizeNumber,exports.mailTemplates=t.mailTemplates,exports.parseCommandLineArgs=i.parseCommandLineArgs,exports.shuffle=o.shuffle,exports.sleep=a.sleep,exports.getConnectionLevelSqlitePragmas=u.getConnectionLevelSqlitePragmas,exports.getPersistentSqlitePragmas=u.getPersistentSqlitePragmas,exports.zenkakuAlphanumericalsToHankaku=p.zenkakuAlphanumericalsToHankaku;
2
2
  //# sourceMappingURL=index.cjs.map
package/dist/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
+ export { ensureTruthy } from './assert.js';
1
2
  export { errorify, ignoreError, ignoreEnoent, ignoreErrorAsync, ignoreEnoentAsync, withRetry } from './error.js';
3
+ export { getRequiredEnvValue } from './env.js';
2
4
  export { humanizeNumber } from './humanize.js';
3
5
  export { mailTemplates } from './mail.js';
4
6
  export { parseCommandLineArgs } from './parseCommandLineArgs.js';
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export{errorify,ignoreEnoent,ignoreEnoentAsync,ignoreError,ignoreErrorAsync,withRetry}from"./error.js";export{humanizeNumber}from"./humanize.js";export{mailTemplates}from"./mail.js";export{parseCommandLineArgs}from"./parseCommandLineArgs.js";export{shuffle}from"./shuffle.js";export{sleep}from"./sleep.js";export{getConnectionLevelSqlitePragmas,getPersistentSqlitePragmas}from"./sqlite.js";export{zenkakuAlphanumericalsToHankaku}from"./zenkaku.js";
1
+ export{ensureTruthy}from"./assert.js";export{errorify,ignoreEnoent,ignoreEnoentAsync,ignoreError,ignoreErrorAsync,withRetry}from"./error.js";export{getRequiredEnvValue}from"./env.js";export{humanizeNumber}from"./humanize.js";export{mailTemplates}from"./mail.js";export{parseCommandLineArgs}from"./parseCommandLineArgs.js";export{shuffle}from"./shuffle.js";export{sleep}from"./sleep.js";export{getConnectionLevelSqlitePragmas,getPersistentSqlitePragmas}from"./sqlite.js";export{zenkakuAlphanumericalsToHankaku}from"./zenkaku.js";
2
2
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/shared-lib",
3
- "version": "7.0.3",
3
+ "version": "7.1.1",
4
4
  "description": "Shared library for WillBooster projects",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,7 +33,7 @@
33
33
  "scripts": {
34
34
  "build": "build-ts lib",
35
35
  "check-all-for-ai": "yarn check-for-ai && yarn test",
36
- "check-for-ai": "yarn install > /dev/null && yarn format > /dev/null 2> /dev/null || true && yarn lint-fix --quiet && yarn typecheck",
36
+ "check-for-ai": "yarn install > /dev/null && yarn format > /dev/null 2> /dev/null || true && yarn typecheck && yarn lint-fix --quiet",
37
37
  "cleanup": "yarn format && yarn lint-fix",
38
38
  "format": "sort-package-json && yarn prettify",
39
39
  "lint": "eslint --color",
@@ -48,8 +48,8 @@
48
48
  "@types/micromatch": "4.0.10",
49
49
  "@willbooster/eslint-config-ts": "11.4.12",
50
50
  "@willbooster/prettier-config": "10.2.4",
51
- "build-ts": "17.0.11",
52
- "eslint": "9.39.1",
51
+ "build-ts": "17.0.14",
52
+ "eslint": "9.39.2",
53
53
  "eslint-config-flat-gitignore": "2.1.0",
54
54
  "eslint-config-prettier": "10.1.8",
55
55
  "eslint-import-resolver-typescript": "4.4.4",
@@ -61,12 +61,12 @@
61
61
  "globals": "16.5.0",
62
62
  "lint-staged": "16.2.7",
63
63
  "micromatch": "4.0.8",
64
- "prettier": "3.7.4",
65
- "prettier-plugin-java": "2.7.7",
64
+ "prettier": "3.8.0",
65
+ "prettier-plugin-java": "2.8.1",
66
66
  "sort-package-json": "3.6.0",
67
67
  "typescript": "5.9.3",
68
- "typescript-eslint": "8.50.1",
69
- "vitest": "4.0.16"
68
+ "typescript-eslint": "8.53.0",
69
+ "vitest": "4.0.17"
70
70
  },
71
71
  "publishConfig": {
72
72
  "access": "public"