@willbooster/shared-lib 5.2.22 → 5.3.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/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("./error.cjs"),r=require("./humanize.cjs"),s=require("./mail.cjs"),o=require("./shuffle.cjs"),n=require("./sleep.cjs"),i=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.shuffle=o.shuffle,exports.sleep=n.sleep,exports.zenkakuAlphanumericalsToHankaku=i.zenkakuAlphanumericalsToHankaku;
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"),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.zenkakuAlphanumericalsToHankaku=a.zenkakuAlphanumericalsToHankaku;
2
2
  //# sourceMappingURL=index.cjs.map
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export { errorify, ignoreError, ignoreEnoent, ignoreErrorAsync, ignoreEnoentAsync, withRetry } from './error.js';
2
2
  export { humanizeNumber } from './humanize.js';
3
3
  export { mailTemplates } from './mail.js';
4
+ export { parseCommandLineArgs } from './parseCommandLineArgs.js';
4
5
  export { shuffle } from './shuffle.js';
5
6
  export { sleep } from './sleep.js';
6
7
  export { zenkakuAlphanumericalsToHankaku } from './zenkaku.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{shuffle}from"./shuffle.js";export{sleep}from"./sleep.js";export{zenkakuAlphanumericalsToHankaku}from"./zenkaku.js";
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{zenkakuAlphanumericalsToHankaku}from"./zenkaku.js";
2
2
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";exports.parseCommandLineArgs=function(r){if(!r)return[];const s=[];let t="",n=!1,e=!1;for(const o of r)'"'!==o||e?"'"!==o||n?" "!==o||n||e?t+=o:t&&(s.push(t),t=""):e=!e:n=!n;return t&&s.push(t),s};
2
+ //# sourceMappingURL=parseCommandLineArgs.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseCommandLineArgs.cjs","sources":["../src/parseCommandLineArgs.ts"],"sourcesContent":["/**\n * Parses a command line string into an array of arguments, preserving quoted strings.\n *\n * This function handles:\n * - Space-separated arguments\n * - Double-quoted strings (preserves spaces within)\n * - Single-quoted strings (preserves spaces within)\n *\n * @param argsString The command line string to parse\n * @returns An array of parsed arguments\n */\nexport function parseCommandLineArgs(argsString: string): string[] {\n if (!argsString) return [];\n\n const result: string[] = [];\n let current = '';\n let inDoubleQuote = false;\n let inSingleQuote = false;\n\n for (const char of argsString) {\n // Handle quotes\n if (char === '\"' && !inSingleQuote) {\n inDoubleQuote = !inDoubleQuote;\n continue;\n }\n\n if (char === \"'\" && !inDoubleQuote) {\n inSingleQuote = !inSingleQuote;\n continue;\n }\n\n // Handle spaces (only split on spaces outside of quotes)\n if (char === ' ' && !inDoubleQuote && !inSingleQuote) {\n if (current) {\n result.push(current);\n current = '';\n }\n continue;\n }\n\n // Add character to current argument\n current += char;\n }\n\n // Add the last argument if there is one\n if (current) {\n result.push(current);\n }\n\n return result;\n}\n"],"names":["argsString","result","current","inDoubleQuote","inSingleQuote","char","push"],"mappings":"0CAWO,SAA8BA,GACnC,IAAKA,EAAY,MAAO,GAExB,MAAMC,EAAmB,GACzB,IAAIC,EAAU,GACVC,GAAgB,EAChBC,GAAgB,EAEpB,IAAK,MAAMC,KAAQL,EAEJ,MAATK,GAAiBD,EAKR,MAATC,GAAiBF,EAMR,MAATE,GAAiBF,GAAkBC,EASvCF,GAAWG,EARLH,IACFD,EAAOK,KAAKJ,GACZA,EAAU,IARZE,GAAiBA,EALjBD,GAAiBA,EA2BrB,OAJID,GACFD,EAAOK,KAAKJ,GAGPD,CACT"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Parses a command line string into an array of arguments, preserving quoted strings.
3
+ *
4
+ * This function handles:
5
+ * - Space-separated arguments
6
+ * - Double-quoted strings (preserves spaces within)
7
+ * - Single-quoted strings (preserves spaces within)
8
+ *
9
+ * @param argsString The command line string to parse
10
+ * @returns An array of parsed arguments
11
+ */
12
+ export declare function parseCommandLineArgs(argsString: string): string[];
@@ -0,0 +1,2 @@
1
+ function t(t){if(!t)return[];const n=[];let o="",r=!1,u=!1;for(const e of t)'"'!==e||u?"'"!==e||r?" "!==e||r||u?o+=e:o&&(n.push(o),o=""):u=!u:r=!r;return o&&n.push(o),n}export{t as parseCommandLineArgs};
2
+ //# sourceMappingURL=parseCommandLineArgs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseCommandLineArgs.js","sources":["../src/parseCommandLineArgs.ts"],"sourcesContent":["/**\n * Parses a command line string into an array of arguments, preserving quoted strings.\n *\n * This function handles:\n * - Space-separated arguments\n * - Double-quoted strings (preserves spaces within)\n * - Single-quoted strings (preserves spaces within)\n *\n * @param argsString The command line string to parse\n * @returns An array of parsed arguments\n */\nexport function parseCommandLineArgs(argsString: string): string[] {\n if (!argsString) return [];\n\n const result: string[] = [];\n let current = '';\n let inDoubleQuote = false;\n let inSingleQuote = false;\n\n for (const char of argsString) {\n // Handle quotes\n if (char === '\"' && !inSingleQuote) {\n inDoubleQuote = !inDoubleQuote;\n continue;\n }\n\n if (char === \"'\" && !inDoubleQuote) {\n inSingleQuote = !inSingleQuote;\n continue;\n }\n\n // Handle spaces (only split on spaces outside of quotes)\n if (char === ' ' && !inDoubleQuote && !inSingleQuote) {\n if (current) {\n result.push(current);\n current = '';\n }\n continue;\n }\n\n // Add character to current argument\n current += char;\n }\n\n // Add the last argument if there is one\n if (current) {\n result.push(current);\n }\n\n return result;\n}\n"],"names":["parseCommandLineArgs","argsString","result","current","inDoubleQuote","inSingleQuote","char","push"],"mappings":"AAWO,SAASA,EAAqBC,GACnC,IAAKA,EAAY,MAAO,GAExB,MAAMC,EAAmB,GACzB,IAAIC,EAAU,GACVC,GAAgB,EAChBC,GAAgB,EAEpB,IAAK,MAAMC,KAAQL,EAEJ,MAATK,GAAiBD,EAKR,MAATC,GAAiBF,EAMR,MAATE,GAAiBF,GAAkBC,EASvCF,GAAWG,EARLH,IACFD,EAAOK,KAAKJ,GACZA,EAAU,IARZE,GAAiBA,EALjBD,GAAiBA,EA2BrB,OAJID,GACFD,EAAOK,KAAKJ,GAGPD,CACT"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/shared-lib",
3
- "version": "5.2.22",
3
+ "version": "5.3.0",
4
4
  "license": "Apache-2.0",
5
5
  "author": "WillBooster Inc.",
6
6
  "sideEffects": false,
@@ -27,6 +27,7 @@
27
27
  "scripts": {
28
28
  "build": "build-ts lib",
29
29
  "check-all": "yarn cleanup && yarn typecheck && yarn test",
30
+ "check-for-ai": "yarn format > /dev/null && yarn lint-fix && yarn typecheck && yarn test --silent",
30
31
  "cleanup": "yarn format && yarn lint-fix",
31
32
  "format": "sort-package-json && yarn prettify",
32
33
  "lint": "eslint --color",
@@ -41,24 +42,24 @@
41
42
  "@types/micromatch": "4.0.9",
42
43
  "@willbooster/eslint-config-ts": "11.2.0",
43
44
  "@willbooster/prettier-config": "10.0.0",
44
- "build-ts": "13.1.39",
45
- "eslint": "9.25.0",
45
+ "build-ts": "13.2.3",
46
+ "eslint": "9.25.1",
46
47
  "eslint-config-flat-gitignore": "2.1.0",
47
48
  "eslint-config-prettier": "10.1.2",
48
- "eslint-import-resolver-typescript": "4.3.2",
49
- "eslint-plugin-import-x": "4.10.5",
49
+ "eslint-import-resolver-typescript": "4.3.4",
50
+ "eslint-plugin-import-x": "4.11.0",
50
51
  "eslint-plugin-sort-class-members": "1.21.0",
51
52
  "eslint-plugin-sort-destructure-keys": "2.0.0",
52
- "eslint-plugin-unicorn": "58.0.0",
53
+ "eslint-plugin-unicorn": "59.0.0",
53
54
  "eslint-plugin-unused-imports": "4.1.4",
54
55
  "globals": "16.0.0",
55
56
  "lint-staged": "15.5.1",
56
57
  "micromatch": "4.0.8",
57
58
  "prettier": "3.5.3",
58
- "sort-package-json": "3.0.0",
59
+ "sort-package-json": "3.1.0",
59
60
  "typescript": "5.8.3",
60
- "typescript-eslint": "8.30.1",
61
- "vitest": "3.1.1"
61
+ "typescript-eslint": "8.31.1",
62
+ "vitest": "3.1.2"
62
63
  },
63
64
  "publishConfig": {
64
65
  "access": "public"