@willbooster/shared-lib 7.1.0 → 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.
- 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/env.cjs +1 -1
- package/dist/env.cjs.map +1 -1
- package/dist/env.d.ts +0 -1
- package/dist/env.js +1 -1
- package/dist/env.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/package.json +1 -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/env.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
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
2
|
//# sourceMappingURL=env.cjs.map
|
package/dist/env.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.cjs","sources":["../src/env.ts"],"sourcesContent":["
|
|
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
CHANGED
package/dist/env.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
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
2
|
//# sourceMappingURL=env.js.map
|
package/dist/env.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.js","sources":["../src/env.ts"],"sourcesContent":["
|
|
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("./
|
|
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,5 +1,6 @@
|
|
|
1
|
+
export { ensureTruthy } from './assert.js';
|
|
1
2
|
export { errorify, ignoreError, ignoreEnoent, ignoreErrorAsync, ignoreEnoentAsync, withRetry } from './error.js';
|
|
2
|
-
export {
|
|
3
|
+
export { getRequiredEnvValue } from './env.js';
|
|
3
4
|
export { humanizeNumber } from './humanize.js';
|
|
4
5
|
export { mailTemplates } from './mail.js';
|
|
5
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{
|
|
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
|