@willbooster/shared-lib 10.0.0 → 10.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/appEnv.cjs +2 -0
- package/dist/appEnv.cjs.map +1 -0
- package/dist/appEnv.d.ts +15 -0
- package/dist/appEnv.js +2 -0
- package/dist/appEnv.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/package.json +5 -5
package/dist/appEnv.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appEnv.cjs","names":[],"sources":["../src/appEnv.ts"],"sourcesContent":["export type AppEnv = 'development' | 'test' | 'staging' | 'production';\n\n/**\n * The runtime `WB_ENV` widened to the full domain wb standardizes.\n *\n * `wrangler types` narrows `process.env.WB_ENV` to the literal values the wrangler configuration\n * declares (typically staging and production only), while local development, E2E, and scripts\n * supply `development` and `test` through fnox (`wb gen-dev-vars` writes them into the gitignored\n * `.dev.vars` that `wrangler dev` reads). This accessor widens the generated type back to the real\n * runtime domain so environment detection stays in one place.\n *\n * Exposed as a function rather than a constant because Cloudflare Workers may not provide\n * environment variables during module evaluation; callers choose when to read. Returns undefined\n * where `process` does not exist (e.g. browsers).\n */\nexport function getAppEnv(): AppEnv | undefined {\n return typeof process === 'undefined' ? undefined : (process.env.WB_ENV as AppEnv | undefined);\n}\n"],"mappings":"aAeA,SAAgB,GAAgC,CAC9C,OAAO,OAAO,QAAY,IAAc,IAAA,GAAa,QAAQ,IAAI,MACnE"}
|
package/dist/appEnv.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type AppEnv = 'development' | 'test' | 'staging' | 'production';
|
|
2
|
+
/**
|
|
3
|
+
* The runtime `WB_ENV` widened to the full domain wb standardizes.
|
|
4
|
+
*
|
|
5
|
+
* `wrangler types` narrows `process.env.WB_ENV` to the literal values the wrangler configuration
|
|
6
|
+
* declares (typically staging and production only), while local development, E2E, and scripts
|
|
7
|
+
* supply `development` and `test` through fnox (`wb gen-dev-vars` writes them into the gitignored
|
|
8
|
+
* `.dev.vars` that `wrangler dev` reads). This accessor widens the generated type back to the real
|
|
9
|
+
* runtime domain so environment detection stays in one place.
|
|
10
|
+
*
|
|
11
|
+
* Exposed as a function rather than a constant because Cloudflare Workers may not provide
|
|
12
|
+
* environment variables during module evaluation; callers choose when to read. Returns undefined
|
|
13
|
+
* where `process` does not exist (e.g. browsers).
|
|
14
|
+
*/
|
|
15
|
+
export declare function getAppEnv(): AppEnv | undefined;
|
package/dist/appEnv.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appEnv.js","names":[],"sources":["../src/appEnv.ts"],"sourcesContent":["export type AppEnv = 'development' | 'test' | 'staging' | 'production';\n\n/**\n * The runtime `WB_ENV` widened to the full domain wb standardizes.\n *\n * `wrangler types` narrows `process.env.WB_ENV` to the literal values the wrangler configuration\n * declares (typically staging and production only), while local development, E2E, and scripts\n * supply `development` and `test` through fnox (`wb gen-dev-vars` writes them into the gitignored\n * `.dev.vars` that `wrangler dev` reads). This accessor widens the generated type back to the real\n * runtime domain so environment detection stays in one place.\n *\n * Exposed as a function rather than a constant because Cloudflare Workers may not provide\n * environment variables during module evaluation; callers choose when to read. Returns undefined\n * where `process` does not exist (e.g. browsers).\n */\nexport function getAppEnv(): AppEnv | undefined {\n return typeof process === 'undefined' ? undefined : (process.env.WB_ENV as AppEnv | undefined);\n}\n"],"mappings":"AAeA,SAAgB,GAAgC,CAC9C,OAAO,OAAO,QAAY,IAAc,IAAA,GAAa,QAAQ,IAAI,MACnE"}
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./appEnv.cjs"),t=require("./assert.cjs"),n=require("./sleep.cjs"),r=require("./error.cjs"),i=require("./humanize.cjs"),a=require("./mail.cjs"),o=require("./parseCommandLineArgs.cjs"),s=require("./shuffle.cjs"),c=require("./sqlite.cjs"),l=require("./zenkaku.cjs");exports.ensureTruthy=t.ensureTruthy,exports.errorify=r.errorify,exports.getAppEnv=e.getAppEnv,exports.getConnectionLevelSqlitePragmas=c.getConnectionLevelSqlitePragmas,exports.getPersistentSqlitePragmas=c.getPersistentSqlitePragmas,exports.humanizeNumber=i.humanizeNumber,exports.ignoreEnoent=r.ignoreEnoent,exports.ignoreEnoentAsync=r.ignoreEnoentAsync,exports.ignoreError=r.ignoreError,exports.ignoreErrorAsync=r.ignoreErrorAsync,exports.mailTemplates=a.mailTemplates,exports.parseCommandLineArgs=o.parseCommandLineArgs,exports.shuffle=s.shuffle,exports.sleep=n.sleep,exports.withRetry=r.withRetry,exports.zenkakuAlphanumericalsToHankaku=l.zenkakuAlphanumericalsToHankaku;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { getAppEnv } from './appEnv.js';
|
|
1
2
|
export { ensureTruthy } from './assert.js';
|
|
2
3
|
export { errorify, ignoreError, ignoreEnoent, ignoreErrorAsync, ignoreEnoentAsync, withRetry } from './error.js';
|
|
3
4
|
export { humanizeNumber } from './humanize.js';
|
|
@@ -7,4 +8,5 @@ export { shuffle } from './shuffle.js';
|
|
|
7
8
|
export { sleep } from './sleep.js';
|
|
8
9
|
export { getConnectionLevelSqlitePragmas, getPersistentSqlitePragmas } from './sqlite.js';
|
|
9
10
|
export { zenkakuAlphanumericalsToHankaku } from './zenkaku.js';
|
|
11
|
+
export type { AppEnv } from './appEnv.js';
|
|
10
12
|
export type { RetryOptions } from './error.js';
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{getAppEnv as e}from"./appEnv.js";import{ensureTruthy as t}from"./assert.js";import{sleep as n}from"./sleep.js";import{errorify as r,ignoreEnoent as i,ignoreEnoentAsync as a,ignoreError as o,ignoreErrorAsync as s,withRetry as c}from"./error.js";import{humanizeNumber as l}from"./humanize.js";import{mailTemplates as u}from"./mail.js";import{parseCommandLineArgs as d}from"./parseCommandLineArgs.js";import{shuffle as f}from"./shuffle.js";import{getConnectionLevelSqlitePragmas as p,getPersistentSqlitePragmas as m}from"./sqlite.js";import{zenkakuAlphanumericalsToHankaku as h}from"./zenkaku.js";export{t as ensureTruthy,r as errorify,e as getAppEnv,p as getConnectionLevelSqlitePragmas,m as getPersistentSqlitePragmas,l as humanizeNumber,i as ignoreEnoent,a as ignoreEnoentAsync,o as ignoreError,s as ignoreErrorAsync,u as mailTemplates,d as parseCommandLineArgs,f as shuffle,n as sleep,c as withRetry,h as zenkakuAlphanumericalsToHankaku};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@willbooster/shared-lib",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.1.0",
|
|
4
4
|
"description": "Shared library for WillBooster projects",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -46,17 +46,17 @@
|
|
|
46
46
|
"@tsconfig/node-lts": "24.0.0",
|
|
47
47
|
"@tsconfig/node-ts": "23.6.4",
|
|
48
48
|
"@types/bun": "1.3.14",
|
|
49
|
-
"@types/node": "25.
|
|
49
|
+
"@types/node": "25.9.5",
|
|
50
50
|
"@willbooster/oxfmt-config": "1.2.2",
|
|
51
51
|
"@willbooster/oxlint-config": "1.4.8",
|
|
52
|
-
"@willbooster/wb": "19.
|
|
53
|
-
"build-ts": "
|
|
52
|
+
"@willbooster/wb": "19.5.2",
|
|
53
|
+
"build-ts": "21.0.0",
|
|
54
54
|
"oxfmt": "0.60.0",
|
|
55
55
|
"oxlint": "1.75.0",
|
|
56
56
|
"oxlint-tsgolint": "7.0.2001",
|
|
57
57
|
"sort-package-json": "4.0.0",
|
|
58
58
|
"typescript": "7.0.2",
|
|
59
|
-
"vitest": "4.1.
|
|
59
|
+
"vitest": "4.1.10"
|
|
60
60
|
},
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"access": "public",
|