@willbooster/shared-lib 7.0.3 → 7.1.0
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/env.cjs +2 -0
- package/dist/env.cjs.map +1 -0
- package/dist/env.d.ts +2 -0
- package/dist/env.js +2 -0
- package/dist/env.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/package.json +8 -8
package/dist/env.cjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
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
ADDED
|
@@ -0,0 +1 @@
|
|
|
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
ADDED
package/dist/env.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
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
ADDED
|
@@ -0,0 +1 @@
|
|
|
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"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("./error.cjs"),r=require("./
|
|
1
|
+
"use strict";var e=require("./error.cjs"),r=require("./env.cjs"),s=require("./humanize.cjs"),n=require("./mail.cjs"),t=require("./parseCommandLineArgs.cjs"),i=require("./shuffle.cjs"),o=require("./sleep.cjs"),a=require("./sqlite.cjs"),u=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.getEnvValue=r.getEnvValue,exports.getRequiredEnvValue=r.getRequiredEnvValue,exports.humanizeNumber=s.humanizeNumber,exports.mailTemplates=n.mailTemplates,exports.parseCommandLineArgs=t.parseCommandLineArgs,exports.shuffle=i.shuffle,exports.sleep=o.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,4 +1,5 @@
|
|
|
1
1
|
export { errorify, ignoreError, ignoreEnoent, ignoreErrorAsync, ignoreEnoentAsync, withRetry } from './error.js';
|
|
2
|
+
export { getEnvValue, getRequiredEnvValue } from './env.js';
|
|
2
3
|
export { humanizeNumber } from './humanize.js';
|
|
3
4
|
export { mailTemplates } from './mail.js';
|
|
4
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{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{errorify,ignoreEnoent,ignoreEnoentAsync,ignoreError,ignoreErrorAsync,withRetry}from"./error.js";export{getEnvValue,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
|
+
"version": "7.1.0",
|
|
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
|
|
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.
|
|
52
|
-
"eslint": "9.39.
|
|
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.
|
|
65
|
-
"prettier-plugin-java": "2.
|
|
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.
|
|
69
|
-
"vitest": "4.0.
|
|
68
|
+
"typescript-eslint": "8.53.0",
|
|
69
|
+
"vitest": "4.0.17"
|
|
70
70
|
},
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|