@haibun/core 1.33.6 → 1.34.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.
@@ -1,2 +1,2 @@
1
- export declare const currentVersion = "1.33.6";
1
+ export declare const currentVersion = "1.34.0";
2
2
  //# sourceMappingURL=currentVersion.d.ts.map
@@ -1,2 +1,2 @@
1
- export const currentVersion = '1.33.6';
1
+ export const currentVersion = '1.34.0';
2
2
  //# sourceMappingURL=currentVersion.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@haibun/core",
3
3
  "type": "module",
4
- "version": "1.33.6",
4
+ "version": "1.34.0",
5
5
  "description": "",
6
6
  "author": "",
7
7
  "xexports": {
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=gwtaRegex.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"gwtaRegex.d.ts","sourceRoot":"","sources":["../../../src/lib/util/gwtaRegex.ts"],"names":[],"mappings":""}
@@ -1,25 +0,0 @@
1
- // Function to convert a gwta string to a RegExp
2
- function gwtaToRegex(gwta, types = ['string']) {
3
- // Convert gwta pattern to regex pattern
4
- const regexPattern = gwta.replace(/\{(\w+)\}/g, (match, p1) => {
5
- const varInfo = pairToVar(p1, types);
6
- return `(?<${varInfo.name}>.+)`;
7
- });
8
- return new RegExp(regexPattern);
9
- }
10
- // Helper function to parse the type from the placeholder
11
- function pairToVar(pair, types) {
12
- let [name, type] = pair.split(':').map(i => i.trim());
13
- if (!type)
14
- type = 'string';
15
- if (!types.includes(type)) {
16
- throw Error(`unknown type ${type}`);
17
- }
18
- return { name, type };
19
- }
20
- // Example usage
21
- const gwtaExample = 'until {what} is {value}';
22
- const gwtaRegex = gwtaToRegex(gwtaExample);
23
- console.log(gwtaRegex); // Outputs: /until (?<what>.+) is (?<value>.+)/
24
- export {};
25
- //# sourceMappingURL=gwtaRegex.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"gwtaRegex.js","sourceRoot":"","sources":["../../../src/lib/util/gwtaRegex.ts"],"names":[],"mappings":"AAKA,gDAAgD;AAChD,SAAS,WAAW,CAAC,IAAY,EAAE,QAAkB,CAAC,QAAQ,CAAC;IAC3D,wCAAwC;IACxC,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE;QAC1D,MAAM,OAAO,GAAG,SAAS,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;QACrC,OAAO,MAAM,OAAO,CAAC,IAAI,MAAM,CAAC;IACpC,CAAC,CAAC,CAAC;IAEH,OAAO,IAAI,MAAM,CAAC,YAAY,CAAC,CAAC;AACpC,CAAC;AAED,yDAAyD;AACzD,SAAS,SAAS,CAAC,IAAY,EAAE,KAAe;IAC5C,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IACtD,IAAI,CAAC,IAAI;QAAE,IAAI,GAAG,QAAQ,CAAC;IAC3B,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QACxB,MAAM,KAAK,CAAC,gBAAgB,IAAI,EAAE,CAAC,CAAC;IACxC,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAC1B,CAAC;AAED,gBAAgB;AAChB,MAAM,WAAW,GAAG,yBAAyB,CAAC;AAC9C,MAAM,SAAS,GAAG,WAAW,CAAC,WAAW,CAAC,CAAC;AAC3C,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,+CAA+C"}