@willbooster/shared-lib 10.12.0 → 10.13.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/foreignCjk.cjs +1 -1
- package/dist/foreignCjk.cjs.map +1 -1
- package/dist/foreignCjk.d.ts +9 -2
- package/dist/foreignCjk.js +1 -1
- package/dist/foreignCjk.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/foreignCjk.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=/\p{Script=Hangul}/u,t=/\p{Script=Han}/
|
|
1
|
+
"use strict";const e=/\p{Script=Hangul}/u,t=/\p{Script=Han}/u,n=new Set(`个乘亂亞从佛來們假傳僞價儉兒兩册刄剩劍劑勞勳勵勸區卷參听呀咯哇哦唔單嘛嚴囑囘圈國圍圓圖團墮壓壘壞壤壯壹壻壽奧奬姙孃學寢實寫寶將專對屆屬峽巖帶广廢廣廳彈很徑從怎恆惡惱愼慘懷戀戰戲拂拔拜挾插搖搜擇擔據擧擴攜攝收效敍敕數斷晝曉會條棧榮樂樓樞樣檢權歐歡歸殘殼毆氣沒淨淺滯滿潛澁濕濟灣燈燒營爐爭爲犧狹獨獵獸獻瓣畫當疊癡發盜盡碎碼祕禪禮稱稻穗穩竊竝粹絲經縣縱總繩繪繼續纖缺罐聲聽肅腦膽臟臺與舉舊舍舖艷莊莖萬藏藥處號螢蟲蠶蠻衞裝襃覺覽觀觸謠證譯譽讀變讓讚豐豫貳賣贊跟踐輕轉辨辭辯這遙遞遲鄰醉醫釀釋錢鎭鏈鐵鑄鑛關陷隨險隱隸雖雙雜霸靈靜顏顯飜飮餘餠騷驅驗驛髓體髮鬪鷄鹽麥麼黏默點黨齊齒齡龜`);let r;function i(t,n){let r=a(t,n),i=[];return r.some(t=>!e.test(t))&&i.push(`chinese`),r.some(t=>e.test(t))&&i.push(`korean`),i}function a(i,a=``){let s=new Set(a.normalize(`NFKC`)),c=r??=o(),l=new Set;for(let r of i.normalize(`NFKC`))s.has(r)||(e.test(r)||t.test(r)&&(!c.has(r)||n.has(r)))&&l.add(r);return[...l]}function o(){let e=new TextDecoder(`shift_jis`),t=new Set(`𠮟塡剝頰`);for(let n=129;n<=234;n++)if(!(n>=160&&n<=223))for(let r=64;r<=252;r++)t.add(e.decode(new Uint8Array([n,r])));return t}exports.detectForeignCjkInJapanese=i,exports.findForeignCjkCharactersInJapanese=a;
|
|
2
2
|
//# sourceMappingURL=foreignCjk.cjs.map
|
package/dist/foreignCjk.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"foreignCjk.cjs","names":[],"sources":["../src/foreignCjk.ts"],"sourcesContent":["export type ForeignCjkLanguage = 'chinese' | 'korean';\n\nconst HANGUL_REGEX = /\\p{Script=Hangul}/u;\nconst HAN_REGEX = /\\p{Script=Han}/
|
|
1
|
+
{"version":3,"file":"foreignCjk.cjs","names":[],"sources":["../src/foreignCjk.ts"],"sourcesContent":["export type ForeignCjkLanguage = 'chinese' | 'korean';\n\nconst HANGUL_REGEX = /\\p{Script=Hangul}/u;\nconst HAN_REGEX = /\\p{Script=Han}/u;\n// JIS X 0208 cannot encode these Jōyō kanji, which were added in 2010.\nconst JOYO_KANJI_OUTSIDE_JIS_X_0208 = '𠮟塡剝頰';\n// Characters JIS X 0208 can encode but modern Japanese prose does not use:\n// - old forms (kyūjitai) of Jōyō kanji, from the `kyujitai` npm package and Unihan's kJapaneseOldVariant,\n// except those still common in Japanese words or names (e.g., 應 in 慶應, 澤, 邊, 龍, 藝 in 東京藝術大学, 糺す)\n// - Chinese function words that Japanese writes in kana (e.g., 們, 這, 麼, 很, 怎, 跟, 嘛) and stray simplified forms (e.g., 个)\n// - traditional Chinese characters that neither table covers but Japanese never uses: 碼, 舉, 鏈, 雖\n// Other Chinese-only content characters (e.g., 媽, 豬) are not listed because separating them from rare kanji\n// that Japanese prose does use (e.g., 乖離, 瑕疵, 齟齬, 俯瞰) needs Japanese usage frequencies.\nconst CHINESE_CHARACTERS_IN_JIS_X_0208 = new Set(\n '个乘亂亞从佛來們假傳僞價儉兒兩册刄剩劍劑勞勳勵勸區卷參听呀咯哇哦唔單嘛嚴囑囘圈國圍圓圖團墮壓壘壞壤壯壹壻壽奧奬姙孃學寢實寫寶將專對屆屬峽巖帶广廢廣廳彈很徑從怎恆惡惱愼慘懷戀戰戲拂拔拜挾插搖搜擇擔據擧擴攜攝收效敍敕數斷晝曉會條棧榮樂樓樞樣檢權歐歡歸殘殼毆氣沒淨淺滯滿潛澁濕濟灣燈燒營爐爭爲犧狹獨獵獸獻瓣畫當疊癡發盜盡碎碼祕禪禮稱稻穗穩竊竝粹絲經縣縱總繩繪繼續纖缺罐聲聽肅腦膽臟臺與舉舊舍舖艷莊莖萬藏藥處號螢蟲蠶蠻衞裝襃覺覽觀觸謠證譯譽讀變讓讚豐豫貳賣贊跟踐輕轉辨辭辯這遙遞遲鄰醉醫釀釋錢鎭鏈鐵鑄鑛關陷隨險隱隸雖雙雜霸靈靜顏顯飜飮餘餠騷驅驗驛髓體髮鬪鷄鹽麥麼黏默點黨齊齒齡龜'\n);\n\nlet japaneseKanji: Set<string> | undefined;\n\n/**\n * Detects Chinese or Korean characters mixed into Japanese text, such as LLM-generated Japanese prose.\n * See {@link findForeignCjkCharactersInJapanese} for which characters count and how `allowedText` works.\n * Returns the detected languages, or an empty array if none are found.\n */\nexport function detectForeignCjkInJapanese(text: string, allowedText?: string): ForeignCjkLanguage[] {\n const characters = findForeignCjkCharactersInJapanese(text, allowedText);\n const languages: ForeignCjkLanguage[] = [];\n if (characters.some((char) => !HANGUL_REGEX.test(char))) languages.push('chinese');\n if (characters.some((char) => HANGUL_REGEX.test(char))) languages.push('korean');\n return languages;\n}\n\n/**\n * Returns the distinct Chinese or Korean characters mixed into Japanese text, NFKC-normalized, in order of appearance.\n * A kanji is treated as Chinese when it is outside JIS X 0208 (except the four Jōyō kanji 𠮟塡剝頰)\n * or is one of the listed old forms, Chinese function words, or other Chinese-only characters that modern Japanese\n * prose does not use (e.g., 對, 國, 這, 們, 很, 碼).\n * Rare kanji in personal names (e.g., 髙, 與) are therefore also reported, while Chinese containing none of\n * these characters (e.g., 最后返回答案, 豬肉) is not.\n * Characters that also occur in `allowedText` are not reported, so passing the input that an LLM may quote\n * (e.g., the prompt, a question, or an error message) keeps quoted names and code from being reported.\n */\nexport function findForeignCjkCharactersInJapanese(text: string, allowedText = ''): string[] {\n const allowedCharacters = new Set(allowedText.normalize('NFKC'));\n const kanjiSet = (japaneseKanji ??= buildJapaneseKanjiSet());\n const characters = new Set<string>();\n for (const char of text.normalize('NFKC')) {\n if (allowedCharacters.has(char)) continue;\n if (\n HANGUL_REGEX.test(char) ||\n (HAN_REGEX.test(char) && (!kanjiSet.has(char) || CHINESE_CHARACTERS_IN_JIS_X_0208.has(char)))\n ) {\n characters.add(char);\n }\n }\n return [...characters];\n}\n\nfunction buildJapaneseKanjiSet(): Set<string> {\n // The WHATWG `shift_jis` decoder is Windows-31J, so skip its vendor-extension lead bytes (0xED-0xFC) to keep JIS X 0208 only.\n const decoder = new TextDecoder('shift_jis');\n const kanjiSet = new Set(JOYO_KANJI_OUTSIDE_JIS_X_0208);\n for (let lead = 0x81; lead <= 0xEA; lead++) {\n if (lead >= 0xA0 && lead <= 0xDF) continue;\n for (let trail = 0x40; trail <= 0xFC; trail++) {\n kanjiSet.add(decoder.decode(new Uint8Array([lead, trail])));\n }\n }\n return kanjiSet;\n}\n"],"mappings":"aAEA,MAAM,EAAe,qBACf,EAAY,kBAUZ,EAAmC,IAAI,IAC3C,+RACF,EAEA,IAAI,EAOJ,SAAgB,EAA2B,EAAc,EAA4C,CACnG,IAAM,EAAa,EAAmC,EAAM,CAAW,EACjE,EAAkC,CAAC,EAGzC,OAFI,EAAW,KAAM,GAAS,CAAC,EAAa,KAAK,CAAI,CAAC,GAAG,EAAU,KAAK,SAAS,EAC7E,EAAW,KAAM,GAAS,EAAa,KAAK,CAAI,CAAC,GAAG,EAAU,KAAK,QAAQ,EACxE,CACT,CAYA,SAAgB,EAAmC,EAAc,EAAc,GAAc,CAC3F,IAAM,EAAoB,IAAI,IAAI,EAAY,UAAU,MAAM,CAAC,EACzD,EAAY,IAAkB,EAAsB,EACpD,EAAa,IAAI,IACvB,IAAK,IAAM,KAAQ,EAAK,UAAU,MAAM,EAClC,EAAkB,IAAI,CAAI,IAE5B,EAAa,KAAK,CAAI,GACrB,EAAU,KAAK,CAAI,IAAM,CAAC,EAAS,IAAI,CAAI,GAAK,EAAiC,IAAI,CAAI,KAE1F,EAAW,IAAI,CAAI,EAGvB,MAAO,CAAC,GAAG,CAAU,CACvB,CAEA,SAAS,GAAqC,CAE5C,IAAM,EAAU,IAAI,YAAY,WAAW,EACrC,EAAW,IAAI,IAAI,OAA6B,EACtD,IAAK,IAAI,EAAO,IAAM,GAAQ,IAAM,IAC9B,QAAQ,KAAQ,GAAQ,KAC5B,IAAK,IAAI,EAAQ,GAAM,GAAS,IAAM,IACpC,EAAS,IAAI,EAAQ,OAAO,IAAI,WAAW,CAAC,EAAM,CAAK,CAAC,CAAC,CAAC,EAG9D,OAAO,CACT"}
|
package/dist/foreignCjk.d.ts
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
export type ForeignCjkLanguage = 'chinese' | 'korean';
|
|
2
2
|
/**
|
|
3
3
|
* Detects Chinese or Korean characters mixed into Japanese text, such as LLM-generated Japanese prose.
|
|
4
|
+
* See {@link findForeignCjkCharactersInJapanese} for which characters count and how `allowedText` works.
|
|
5
|
+
* Returns the detected languages, or an empty array if none are found.
|
|
6
|
+
*/
|
|
7
|
+
export declare function detectForeignCjkInJapanese(text: string, allowedText?: string): ForeignCjkLanguage[];
|
|
8
|
+
/**
|
|
9
|
+
* Returns the distinct Chinese or Korean characters mixed into Japanese text, NFKC-normalized, in order of appearance.
|
|
4
10
|
* A kanji is treated as Chinese when it is outside JIS X 0208 (except the four Jōyō kanji 𠮟塡剝頰)
|
|
5
11
|
* or is one of the listed old forms, Chinese function words, or other Chinese-only characters that modern Japanese
|
|
6
12
|
* prose does not use (e.g., 對, 國, 這, 們, 很, 碼).
|
|
7
13
|
* Rare kanji in personal names (e.g., 髙, 與) are therefore also reported, while Chinese containing none of
|
|
8
14
|
* these characters (e.g., 最后返回答案, 豬肉) is not.
|
|
9
|
-
*
|
|
15
|
+
* Characters that also occur in `allowedText` are not reported, so passing the input that an LLM may quote
|
|
16
|
+
* (e.g., the prompt, a question, or an error message) keeps quoted names and code from being reported.
|
|
10
17
|
*/
|
|
11
|
-
export declare function
|
|
18
|
+
export declare function findForeignCjkCharactersInJapanese(text: string, allowedText?: string): string[];
|
package/dist/foreignCjk.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=/\p{Script=Hangul}/u,t=/\p{Script=Han}/
|
|
1
|
+
const e=/\p{Script=Hangul}/u,t=/\p{Script=Han}/u,n=new Set(`个乘亂亞从佛來們假傳僞價儉兒兩册刄剩劍劑勞勳勵勸區卷參听呀咯哇哦唔單嘛嚴囑囘圈國圍圓圖團墮壓壘壞壤壯壹壻壽奧奬姙孃學寢實寫寶將專對屆屬峽巖帶广廢廣廳彈很徑從怎恆惡惱愼慘懷戀戰戲拂拔拜挾插搖搜擇擔據擧擴攜攝收效敍敕數斷晝曉會條棧榮樂樓樞樣檢權歐歡歸殘殼毆氣沒淨淺滯滿潛澁濕濟灣燈燒營爐爭爲犧狹獨獵獸獻瓣畫當疊癡發盜盡碎碼祕禪禮稱稻穗穩竊竝粹絲經縣縱總繩繪繼續纖缺罐聲聽肅腦膽臟臺與舉舊舍舖艷莊莖萬藏藥處號螢蟲蠶蠻衞裝襃覺覽觀觸謠證譯譽讀變讓讚豐豫貳賣贊跟踐輕轉辨辭辯這遙遞遲鄰醉醫釀釋錢鎭鏈鐵鑄鑛關陷隨險隱隸雖雙雜霸靈靜顏顯飜飮餘餠騷驅驗驛髓體髮鬪鷄鹽麥麼黏默點黨齊齒齡龜`);let r;function i(t,n){let r=a(t,n),i=[];return r.some(t=>!e.test(t))&&i.push(`chinese`),r.some(t=>e.test(t))&&i.push(`korean`),i}function a(i,a=``){let s=new Set(a.normalize(`NFKC`)),c=r??=o(),l=new Set;for(let r of i.normalize(`NFKC`))s.has(r)||(e.test(r)||t.test(r)&&(!c.has(r)||n.has(r)))&&l.add(r);return[...l]}function o(){let e=new TextDecoder(`shift_jis`),t=new Set(`𠮟塡剝頰`);for(let n=129;n<=234;n++)if(!(n>=160&&n<=223))for(let r=64;r<=252;r++)t.add(e.decode(new Uint8Array([n,r])));return t}export{i as detectForeignCjkInJapanese,a as findForeignCjkCharactersInJapanese};
|
|
2
2
|
//# sourceMappingURL=foreignCjk.js.map
|
package/dist/foreignCjk.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"foreignCjk.js","names":[],"sources":["../src/foreignCjk.ts"],"sourcesContent":["export type ForeignCjkLanguage = 'chinese' | 'korean';\n\nconst HANGUL_REGEX = /\\p{Script=Hangul}/u;\nconst HAN_REGEX = /\\p{Script=Han}/
|
|
1
|
+
{"version":3,"file":"foreignCjk.js","names":[],"sources":["../src/foreignCjk.ts"],"sourcesContent":["export type ForeignCjkLanguage = 'chinese' | 'korean';\n\nconst HANGUL_REGEX = /\\p{Script=Hangul}/u;\nconst HAN_REGEX = /\\p{Script=Han}/u;\n// JIS X 0208 cannot encode these Jōyō kanji, which were added in 2010.\nconst JOYO_KANJI_OUTSIDE_JIS_X_0208 = '𠮟塡剝頰';\n// Characters JIS X 0208 can encode but modern Japanese prose does not use:\n// - old forms (kyūjitai) of Jōyō kanji, from the `kyujitai` npm package and Unihan's kJapaneseOldVariant,\n// except those still common in Japanese words or names (e.g., 應 in 慶應, 澤, 邊, 龍, 藝 in 東京藝術大学, 糺す)\n// - Chinese function words that Japanese writes in kana (e.g., 們, 這, 麼, 很, 怎, 跟, 嘛) and stray simplified forms (e.g., 个)\n// - traditional Chinese characters that neither table covers but Japanese never uses: 碼, 舉, 鏈, 雖\n// Other Chinese-only content characters (e.g., 媽, 豬) are not listed because separating them from rare kanji\n// that Japanese prose does use (e.g., 乖離, 瑕疵, 齟齬, 俯瞰) needs Japanese usage frequencies.\nconst CHINESE_CHARACTERS_IN_JIS_X_0208 = new Set(\n '个乘亂亞从佛來們假傳僞價儉兒兩册刄剩劍劑勞勳勵勸區卷參听呀咯哇哦唔單嘛嚴囑囘圈國圍圓圖團墮壓壘壞壤壯壹壻壽奧奬姙孃學寢實寫寶將專對屆屬峽巖帶广廢廣廳彈很徑從怎恆惡惱愼慘懷戀戰戲拂拔拜挾插搖搜擇擔據擧擴攜攝收效敍敕數斷晝曉會條棧榮樂樓樞樣檢權歐歡歸殘殼毆氣沒淨淺滯滿潛澁濕濟灣燈燒營爐爭爲犧狹獨獵獸獻瓣畫當疊癡發盜盡碎碼祕禪禮稱稻穗穩竊竝粹絲經縣縱總繩繪繼續纖缺罐聲聽肅腦膽臟臺與舉舊舍舖艷莊莖萬藏藥處號螢蟲蠶蠻衞裝襃覺覽觀觸謠證譯譽讀變讓讚豐豫貳賣贊跟踐輕轉辨辭辯這遙遞遲鄰醉醫釀釋錢鎭鏈鐵鑄鑛關陷隨險隱隸雖雙雜霸靈靜顏顯飜飮餘餠騷驅驗驛髓體髮鬪鷄鹽麥麼黏默點黨齊齒齡龜'\n);\n\nlet japaneseKanji: Set<string> | undefined;\n\n/**\n * Detects Chinese or Korean characters mixed into Japanese text, such as LLM-generated Japanese prose.\n * See {@link findForeignCjkCharactersInJapanese} for which characters count and how `allowedText` works.\n * Returns the detected languages, or an empty array if none are found.\n */\nexport function detectForeignCjkInJapanese(text: string, allowedText?: string): ForeignCjkLanguage[] {\n const characters = findForeignCjkCharactersInJapanese(text, allowedText);\n const languages: ForeignCjkLanguage[] = [];\n if (characters.some((char) => !HANGUL_REGEX.test(char))) languages.push('chinese');\n if (characters.some((char) => HANGUL_REGEX.test(char))) languages.push('korean');\n return languages;\n}\n\n/**\n * Returns the distinct Chinese or Korean characters mixed into Japanese text, NFKC-normalized, in order of appearance.\n * A kanji is treated as Chinese when it is outside JIS X 0208 (except the four Jōyō kanji 𠮟塡剝頰)\n * or is one of the listed old forms, Chinese function words, or other Chinese-only characters that modern Japanese\n * prose does not use (e.g., 對, 國, 這, 們, 很, 碼).\n * Rare kanji in personal names (e.g., 髙, 與) are therefore also reported, while Chinese containing none of\n * these characters (e.g., 最后返回答案, 豬肉) is not.\n * Characters that also occur in `allowedText` are not reported, so passing the input that an LLM may quote\n * (e.g., the prompt, a question, or an error message) keeps quoted names and code from being reported.\n */\nexport function findForeignCjkCharactersInJapanese(text: string, allowedText = ''): string[] {\n const allowedCharacters = new Set(allowedText.normalize('NFKC'));\n const kanjiSet = (japaneseKanji ??= buildJapaneseKanjiSet());\n const characters = new Set<string>();\n for (const char of text.normalize('NFKC')) {\n if (allowedCharacters.has(char)) continue;\n if (\n HANGUL_REGEX.test(char) ||\n (HAN_REGEX.test(char) && (!kanjiSet.has(char) || CHINESE_CHARACTERS_IN_JIS_X_0208.has(char)))\n ) {\n characters.add(char);\n }\n }\n return [...characters];\n}\n\nfunction buildJapaneseKanjiSet(): Set<string> {\n // The WHATWG `shift_jis` decoder is Windows-31J, so skip its vendor-extension lead bytes (0xED-0xFC) to keep JIS X 0208 only.\n const decoder = new TextDecoder('shift_jis');\n const kanjiSet = new Set(JOYO_KANJI_OUTSIDE_JIS_X_0208);\n for (let lead = 0x81; lead <= 0xEA; lead++) {\n if (lead >= 0xA0 && lead <= 0xDF) continue;\n for (let trail = 0x40; trail <= 0xFC; trail++) {\n kanjiSet.add(decoder.decode(new Uint8Array([lead, trail])));\n }\n }\n return kanjiSet;\n}\n"],"mappings":"AAEA,MAAM,EAAe,qBACf,EAAY,kBAUZ,EAAmC,IAAI,IAC3C,+RACF,EAEA,IAAI,EAOJ,SAAgB,EAA2B,EAAc,EAA4C,CACnG,IAAM,EAAa,EAAmC,EAAM,CAAW,EACjE,EAAkC,CAAC,EAGzC,OAFI,EAAW,KAAM,GAAS,CAAC,EAAa,KAAK,CAAI,CAAC,GAAG,EAAU,KAAK,SAAS,EAC7E,EAAW,KAAM,GAAS,EAAa,KAAK,CAAI,CAAC,GAAG,EAAU,KAAK,QAAQ,EACxE,CACT,CAYA,SAAgB,EAAmC,EAAc,EAAc,GAAc,CAC3F,IAAM,EAAoB,IAAI,IAAI,EAAY,UAAU,MAAM,CAAC,EACzD,EAAY,IAAkB,EAAsB,EACpD,EAAa,IAAI,IACvB,IAAK,IAAM,KAAQ,EAAK,UAAU,MAAM,EAClC,EAAkB,IAAI,CAAI,IAE5B,EAAa,KAAK,CAAI,GACrB,EAAU,KAAK,CAAI,IAAM,CAAC,EAAS,IAAI,CAAI,GAAK,EAAiC,IAAI,CAAI,KAE1F,EAAW,IAAI,CAAI,EAGvB,MAAO,CAAC,GAAG,CAAU,CACvB,CAEA,SAAS,GAAqC,CAE5C,IAAM,EAAU,IAAI,YAAY,WAAW,EACrC,EAAW,IAAI,IAAI,OAA6B,EACtD,IAAK,IAAI,EAAO,IAAM,GAAQ,IAAM,IAC9B,QAAQ,KAAQ,GAAQ,KAC5B,IAAK,IAAI,EAAQ,GAAM,GAAS,IAAM,IACpC,EAAS,IAAI,EAAQ,OAAO,IAAI,WAAW,CAAC,EAAM,CAAK,CAAC,CAAC,CAAC,EAG9D,OAAO,CACT"}
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./appEnv.cjs"),t=require("./assert.cjs"),n=require("./githubTemplates.cjs"),r=require("./sleep.cjs"),i=require("./error.cjs"),a=require("./foreignCjk.cjs"),o=require("./humanize.cjs"),s=require("./mail.cjs"),c=require("./markdown.cjs"),l=require("./parseIsoDate.cjs"),u=require("./parseCommandLineArgs.cjs"),d=require("./text.cjs"),f=require("./prompt.cjs"),p=require("./promptFormatters.cjs"),m=require("./shuffle.cjs"),h=require("./recoverJson.cjs"),g=require("./sqlite.cjs"),_=require("./testingRules.cjs"),v=require("./zenkaku.cjs");exports.BUG_ISSUE_SECTIONS=n.BUG_ISSUE_SECTIONS,exports.CHANGE_ISSUE_SECTIONS=n.CHANGE_ISSUE_SECTIONS,exports.ISSUE_TEMPLATE_RULES=n.ISSUE_TEMPLATE_RULES,exports.PULL_REQUEST_BODY_RULES=n.PULL_REQUEST_BODY_RULES,exports.PULL_REQUEST_REQUIREMENTS_RULES=n.PULL_REQUEST_REQUIREMENTS_RULES,exports.PULL_REQUEST_SECTIONS=n.PULL_REQUEST_SECTIONS,exports.TEST_WRITING_RULES=_.TEST_WRITING_RULES,exports.detectForeignCjkInJapanese=a.detectForeignCjkInJapanese,exports.ensureTruthy=t.ensureTruthy,exports.errorify=i.errorify,exports.escapePromptTag=f.escapePromptTag,exports.escapeRegExp=d.escapeRegExp,exports.extractCodeBlocks=c.extractCodeBlocks,exports.extractIfSingleOutermostCodeBlock=c.extractIfSingleOutermostCodeBlock,exports.extractSections=c.extractSections,exports.formatFilesForPrompt=p.formatFilesForPrompt,exports.formatMessagesForPrompt=p.formatMessagesForPrompt,exports.formatPrompt=f.formatPrompt,exports.getAppEnv=e.getAppEnv,exports.getConnectionLevelSqlitePragmas=g.getConnectionLevelSqlitePragmas,exports.getPersistentSqlitePragmas=g.getPersistentSqlitePragmas,exports.humanizeNumber=o.humanizeNumber,exports.ignoreEnoent=i.ignoreEnoent,exports.ignoreEnoentAsync=i.ignoreEnoentAsync,exports.ignoreError=i.ignoreError,exports.ignoreErrorAsync=i.ignoreErrorAsync,exports.mailTemplates=s.mailTemplates,exports.parseCommandLineArgs=u.parseCommandLineArgs,exports.parseIsoDate=l.parseIsoDate,exports.parseMarkdownSections=c.parseMarkdownSections,exports.quoteForShell=d.quoteForShell,exports.recoverJson=h.recoverJson,exports.renderSectionChecklist=n.renderSectionChecklist,exports.renderSectionTemplate=n.renderSectionTemplate,exports.serializeForPrompt=f.serializeForPrompt,exports.serializeForPromptInTag=f.serializeForPromptInTag,exports.shuffle=m.shuffle,exports.sleep=r.sleep,exports.toCodeBlock=d.toCodeBlock,exports.toTildeCodeBlock=d.toTildeCodeBlock,exports.truncateForPrompt=f.truncateForPrompt,exports.withRetry=i.withRetry,exports.zenkakuAlphanumericalsToHankaku=v.zenkakuAlphanumericalsToHankaku;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./appEnv.cjs"),t=require("./assert.cjs"),n=require("./githubTemplates.cjs"),r=require("./sleep.cjs"),i=require("./error.cjs"),a=require("./foreignCjk.cjs"),o=require("./humanize.cjs"),s=require("./mail.cjs"),c=require("./markdown.cjs"),l=require("./parseIsoDate.cjs"),u=require("./parseCommandLineArgs.cjs"),d=require("./text.cjs"),f=require("./prompt.cjs"),p=require("./promptFormatters.cjs"),m=require("./shuffle.cjs"),h=require("./recoverJson.cjs"),g=require("./sqlite.cjs"),_=require("./testingRules.cjs"),v=require("./zenkaku.cjs");exports.BUG_ISSUE_SECTIONS=n.BUG_ISSUE_SECTIONS,exports.CHANGE_ISSUE_SECTIONS=n.CHANGE_ISSUE_SECTIONS,exports.ISSUE_TEMPLATE_RULES=n.ISSUE_TEMPLATE_RULES,exports.PULL_REQUEST_BODY_RULES=n.PULL_REQUEST_BODY_RULES,exports.PULL_REQUEST_REQUIREMENTS_RULES=n.PULL_REQUEST_REQUIREMENTS_RULES,exports.PULL_REQUEST_SECTIONS=n.PULL_REQUEST_SECTIONS,exports.TEST_WRITING_RULES=_.TEST_WRITING_RULES,exports.detectForeignCjkInJapanese=a.detectForeignCjkInJapanese,exports.ensureTruthy=t.ensureTruthy,exports.errorify=i.errorify,exports.escapePromptTag=f.escapePromptTag,exports.escapeRegExp=d.escapeRegExp,exports.extractCodeBlocks=c.extractCodeBlocks,exports.extractIfSingleOutermostCodeBlock=c.extractIfSingleOutermostCodeBlock,exports.extractSections=c.extractSections,exports.findForeignCjkCharactersInJapanese=a.findForeignCjkCharactersInJapanese,exports.formatFilesForPrompt=p.formatFilesForPrompt,exports.formatMessagesForPrompt=p.formatMessagesForPrompt,exports.formatPrompt=f.formatPrompt,exports.getAppEnv=e.getAppEnv,exports.getConnectionLevelSqlitePragmas=g.getConnectionLevelSqlitePragmas,exports.getPersistentSqlitePragmas=g.getPersistentSqlitePragmas,exports.humanizeNumber=o.humanizeNumber,exports.ignoreEnoent=i.ignoreEnoent,exports.ignoreEnoentAsync=i.ignoreEnoentAsync,exports.ignoreError=i.ignoreError,exports.ignoreErrorAsync=i.ignoreErrorAsync,exports.mailTemplates=s.mailTemplates,exports.parseCommandLineArgs=u.parseCommandLineArgs,exports.parseIsoDate=l.parseIsoDate,exports.parseMarkdownSections=c.parseMarkdownSections,exports.quoteForShell=d.quoteForShell,exports.recoverJson=h.recoverJson,exports.renderSectionChecklist=n.renderSectionChecklist,exports.renderSectionTemplate=n.renderSectionTemplate,exports.serializeForPrompt=f.serializeForPrompt,exports.serializeForPromptInTag=f.serializeForPromptInTag,exports.shuffle=m.shuffle,exports.sleep=r.sleep,exports.toCodeBlock=d.toCodeBlock,exports.toTildeCodeBlock=d.toTildeCodeBlock,exports.truncateForPrompt=f.truncateForPrompt,exports.withRetry=i.withRetry,exports.zenkakuAlphanumericalsToHankaku=v.zenkakuAlphanumericalsToHankaku;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { getAppEnv } from './appEnv.js';
|
|
|
2
2
|
export { ensureTruthy } from './assert.js';
|
|
3
3
|
export { BUG_ISSUE_SECTIONS, CHANGE_ISSUE_SECTIONS, ISSUE_TEMPLATE_RULES, PULL_REQUEST_BODY_RULES, PULL_REQUEST_REQUIREMENTS_RULES, PULL_REQUEST_SECTIONS, renderSectionChecklist, renderSectionTemplate, } from './githubTemplates.js';
|
|
4
4
|
export { errorify, ignoreError, ignoreEnoent, ignoreErrorAsync, ignoreEnoentAsync, withRetry } from './error.js';
|
|
5
|
-
export { detectForeignCjkInJapanese } from './foreignCjk.js';
|
|
5
|
+
export { detectForeignCjkInJapanese, findForeignCjkCharactersInJapanese } from './foreignCjk.js';
|
|
6
6
|
export { humanizeNumber } from './humanize.js';
|
|
7
7
|
export { mailTemplates } from './mail.js';
|
|
8
8
|
export { extractCodeBlocks, extractIfSingleOutermostCodeBlock, extractSections, parseMarkdownSections, } from './markdown.js';
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getAppEnv as e}from"./appEnv.js";import{ensureTruthy as t}from"./assert.js";import{BUG_ISSUE_SECTIONS as n,CHANGE_ISSUE_SECTIONS as r,ISSUE_TEMPLATE_RULES as i,PULL_REQUEST_BODY_RULES as a,PULL_REQUEST_REQUIREMENTS_RULES as o,PULL_REQUEST_SECTIONS as s,renderSectionChecklist as c,renderSectionTemplate as l}from"./githubTemplates.js";import{sleep as u}from"./sleep.js";import{errorify as d,ignoreEnoent as f,ignoreEnoentAsync as p,ignoreError as m,ignoreErrorAsync as h,withRetry as g}from"./error.js";import{detectForeignCjkInJapanese as _}from"./foreignCjk.js";import{humanizeNumber as
|
|
1
|
+
import{getAppEnv as e}from"./appEnv.js";import{ensureTruthy as t}from"./assert.js";import{BUG_ISSUE_SECTIONS as n,CHANGE_ISSUE_SECTIONS as r,ISSUE_TEMPLATE_RULES as i,PULL_REQUEST_BODY_RULES as a,PULL_REQUEST_REQUIREMENTS_RULES as o,PULL_REQUEST_SECTIONS as s,renderSectionChecklist as c,renderSectionTemplate as l}from"./githubTemplates.js";import{sleep as u}from"./sleep.js";import{errorify as d,ignoreEnoent as f,ignoreEnoentAsync as p,ignoreError as m,ignoreErrorAsync as h,withRetry as g}from"./error.js";import{detectForeignCjkInJapanese as _,findForeignCjkCharactersInJapanese as v}from"./foreignCjk.js";import{humanizeNumber as y}from"./humanize.js";import{mailTemplates as b}from"./mail.js";import{extractCodeBlocks as x,extractIfSingleOutermostCodeBlock as S,extractSections as C,parseMarkdownSections as w}from"./markdown.js";import{parseIsoDate as T}from"./parseIsoDate.js";import{parseCommandLineArgs as E}from"./parseCommandLineArgs.js";import{escapeRegExp as D,quoteForShell as O,toCodeBlock as k,toTildeCodeBlock as A}from"./text.js";import{escapePromptTag as j,formatPrompt as M,serializeForPrompt as N,serializeForPromptInTag as P,truncateForPrompt as F}from"./prompt.js";import{formatFilesForPrompt as I,formatMessagesForPrompt as L}from"./promptFormatters.js";import{shuffle as R}from"./shuffle.js";import{recoverJson as z}from"./recoverJson.js";import{getConnectionLevelSqlitePragmas as B,getPersistentSqlitePragmas as V}from"./sqlite.js";import{TEST_WRITING_RULES as H}from"./testingRules.js";import{zenkakuAlphanumericalsToHankaku as U}from"./zenkaku.js";export{n as BUG_ISSUE_SECTIONS,r as CHANGE_ISSUE_SECTIONS,i as ISSUE_TEMPLATE_RULES,a as PULL_REQUEST_BODY_RULES,o as PULL_REQUEST_REQUIREMENTS_RULES,s as PULL_REQUEST_SECTIONS,H as TEST_WRITING_RULES,_ as detectForeignCjkInJapanese,t as ensureTruthy,d as errorify,j as escapePromptTag,D as escapeRegExp,x as extractCodeBlocks,S as extractIfSingleOutermostCodeBlock,C as extractSections,v as findForeignCjkCharactersInJapanese,I as formatFilesForPrompt,L as formatMessagesForPrompt,M as formatPrompt,e as getAppEnv,B as getConnectionLevelSqlitePragmas,V as getPersistentSqlitePragmas,y as humanizeNumber,f as ignoreEnoent,p as ignoreEnoentAsync,m as ignoreError,h as ignoreErrorAsync,b as mailTemplates,E as parseCommandLineArgs,T as parseIsoDate,w as parseMarkdownSections,O as quoteForShell,z as recoverJson,c as renderSectionChecklist,l as renderSectionTemplate,N as serializeForPrompt,P as serializeForPromptInTag,R as shuffle,u as sleep,k as toCodeBlock,A as toTildeCodeBlock,F as truncateForPrompt,g as withRetry,U as zenkakuAlphanumericalsToHankaku};
|