@willbooster/shared-lib 7.1.0 → 7.1.2
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/assert.cjs +2 -0
- package/dist/assert.cjs.map +1 -0
- package/dist/assert.d.ts +1 -0
- package/dist/assert.js +2 -0
- package/dist/assert.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/dist/env.cjs +0 -2
- package/dist/env.cjs.map +0 -1
- package/dist/env.d.ts +0 -2
- package/dist/env.js +0 -2
- package/dist/env.js.map +0 -1
package/dist/assert.cjs
ADDED
|
@@ -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"}
|
package/dist/assert.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ensureTruthy<T>(name: string, value: T): NonNullable<T>;
|
package/dist/assert.js
ADDED
|
@@ -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/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("./
|
|
1
|
+
"use strict";var e=require("./assert.cjs"),r=require("./error.cjs"),s=require("./humanize.cjs"),n=require("./mail.cjs"),t=require("./parseCommandLineArgs.cjs"),o=require("./shuffle.cjs"),i=require("./sleep.cjs"),a=require("./sqlite.cjs"),u=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.humanizeNumber=s.humanizeNumber,exports.mailTemplates=n.mailTemplates,exports.parseCommandLineArgs=t.parseCommandLineArgs,exports.shuffle=o.shuffle,exports.sleep=i.sleep,exports.getConnectionLevelSqlitePragmas=a.getConnectionLevelSqlitePragmas,exports.getPersistentSqlitePragmas=a.getPersistentSqlitePragmas,exports.zenkakuAlphanumericalsToHankaku=u.zenkakuAlphanumericalsToHankaku;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
export { ensureTruthy } from './assert.js';
|
|
1
2
|
export { errorify, ignoreError, ignoreEnoent, ignoreErrorAsync, ignoreEnoentAsync, withRetry } from './error.js';
|
|
2
|
-
export { getEnvValue, getRequiredEnvValue } from './env.js';
|
|
3
3
|
export { humanizeNumber } from './humanize.js';
|
|
4
4
|
export { mailTemplates } from './mail.js';
|
|
5
5
|
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{
|
|
1
|
+
export{ensureTruthy}from"./assert.js";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";
|
|
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.1.
|
|
3
|
+
"version": "7.1.2",
|
|
4
4
|
"description": "Shared library for WillBooster projects",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -58,14 +58,14 @@
|
|
|
58
58
|
"eslint-plugin-sort-destructure-keys": "2.0.0",
|
|
59
59
|
"eslint-plugin-unicorn": "62.0.0",
|
|
60
60
|
"eslint-plugin-unused-imports": "4.3.0",
|
|
61
|
-
"globals": "
|
|
61
|
+
"globals": "17.0.0",
|
|
62
62
|
"lint-staged": "16.2.7",
|
|
63
63
|
"micromatch": "4.0.8",
|
|
64
64
|
"prettier": "3.8.0",
|
|
65
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.53.
|
|
68
|
+
"typescript-eslint": "8.53.1",
|
|
69
69
|
"vitest": "4.0.17"
|
|
70
70
|
},
|
|
71
71
|
"publishConfig": {
|
package/dist/env.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var e,n="undefined"!=typeof document?document.currentScript:null;const r=void("undefined"==typeof document?require("url").pathToFileURL(__filename).href:n&&"SCRIPT"===n.tagName.toUpperCase()&&n.src||new URL("env.cjs",document.baseURI).href),t=null==(e=globalThis.process)?void 0:e.env;function o(e){var n;return null!=(n=null==r?void 0:r[e])?n:null==t?void 0:t[e]}exports.getEnvValue=o,exports.getRequiredEnvValue=function(e){const n=o(e);if(!n)throw new Error(`${e} environment variable is required.`);return n};
|
|
2
|
-
//# sourceMappingURL=env.cjs.map
|
package/dist/env.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"env.cjs","sources":["../src/env.ts"],"sourcesContent":["type EnvSource = Record<string, string | undefined>;\n\nconst metaEnv: EnvSource | undefined = 'env' in import.meta ? (import.meta as { env?: EnvSource }).env : undefined;\nconst processEnv: EnvSource | undefined = (globalThis as { process?: { env?: EnvSource } }).process?.env;\n\nexport function getEnvValue(key: string): string | undefined {\n return metaEnv?.[key] ?? processEnv?.[key];\n}\n\nexport function getRequiredEnvValue(key: string): string {\n const value = getEnvValue(key);\n if (!value) {\n throw new Error(`${key} environment variable is required.`);\n }\n return value;\n}\n"],"names":["metaEnv","processEnv","_process","globalThis","process","env","getEnvValue","key","_metaEnv$key","value","Error"],"mappings":"8EAEA,MAAMA,0KACAC,EAA6F,OAA5DC,EAAIC,WAAiDC,cAAO,EAAzDF,EAA2DG,IAE9F,SAASC,EAAYC,GAAiC,IAAAC,EAC3D,OAAqB,OAArBA,EAAc,MAAPR,OAAO,EAAPA,EAAUO,IAAIC,EAAc,MAAVP,OAAU,EAAVA,EAAaM,EACxC,mDAEO,SAA6BA,GAClC,MAAME,EAAQH,EAAYC,GAC1B,IAAKE,EACH,MAAM,IAAIC,MAAM,GAAGH,uCAErB,OAAOE,CACT"}
|
package/dist/env.d.ts
DELETED
package/dist/env.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var n;const r="env"in import.meta?import.meta.env:void 0,o=null==(n=globalThis.process)?void 0:n.env;function e(n){var e;return null!=(e=null==r?void 0:r[n])?e:null==o?void 0:o[n]}function i(n){const r=e(n);if(!r)throw new Error(`${n} environment variable is required.`);return r}export{e as getEnvValue,i as getRequiredEnvValue};
|
|
2
|
-
//# sourceMappingURL=env.js.map
|
package/dist/env.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"env.js","sources":["../src/env.ts"],"sourcesContent":["type EnvSource = Record<string, string | undefined>;\n\nconst metaEnv: EnvSource | undefined = 'env' in import.meta ? (import.meta as { env?: EnvSource }).env : undefined;\nconst processEnv: EnvSource | undefined = (globalThis as { process?: { env?: EnvSource } }).process?.env;\n\nexport function getEnvValue(key: string): string | undefined {\n return metaEnv?.[key] ?? processEnv?.[key];\n}\n\nexport function getRequiredEnvValue(key: string): string {\n const value = getEnvValue(key);\n if (!value) {\n throw new Error(`${key} environment variable is required.`);\n }\n return value;\n}\n"],"names":["metaEnv","env","undefined","processEnv","_process","globalThis","process","getEnvValue","key","_metaEnv$key","getRequiredEnvValue","value","Error"],"mappings":"MAEA,MAAMA,EAAiC,gCAA4DC,SAAMC,EACnGC,EAA6F,OAA5DC,EAAIC,WAAiDC,cAAO,EAAzDF,EAA2DH,IAE9F,SAASM,EAAYC,GAAiC,IAAAC,EAC3D,OAAqB,OAArBA,EAAc,MAAPT,OAAO,EAAPA,EAAUQ,IAAIC,EAAc,MAAVN,OAAU,EAAVA,EAAaK,EACxC,CAEO,SAASE,EAAoBF,GAClC,MAAMG,EAAQJ,EAAYC,GAC1B,IAAKG,EACH,MAAM,IAAIC,MAAM,GAAGJ,uCAErB,OAAOG,CACT"}
|