@aidc-toolkit/utility 0.9.4 → 0.9.6-beta

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,23 +1,7 @@
1
1
  import { IteratorProxy } from "./iterator_proxy.js";
2
2
  import i18next, { utilityNS } from "./locale/i18n.js";
3
3
  import { Sequencer } from "./sequencer.js";
4
-
5
- /**
6
- * Transformation callback, used to convert transformed value to its final value.
7
- *
8
- * @template T
9
- * Type returned by callback.
10
- *
11
- * @param transformedValue
12
- * Transformed value.
13
- *
14
- * @param index
15
- * Index in sequence transformation (0 for single transformation).
16
- *
17
- * @returns
18
- * Final value.
19
- */
20
- export type TransformationCallback<T> = (transformedValue: bigint, index: number) => T;
4
+ import type { TransformerCallback, TransformerInput, TransformerOutput } from "./types.js";
21
5
 
22
6
  /**
23
7
  * Transformer that transforms values in a numeric domain to values in a range equal to the domain or to another range
@@ -143,104 +127,45 @@ export abstract class Transformer {
143
127
  protected abstract doForward(value: bigint): bigint;
144
128
 
145
129
  /**
146
- * Transform a value forward.
147
- *
148
- * @param value
149
- * Value.
150
- *
151
- * @returns
152
- * Transformed value.
153
- */
154
- forward(value: number | bigint): bigint;
155
-
156
- /**
157
- * Transform a value forward.
158
- *
159
- * @template T
160
- * Type returned by transformation callback.
161
- *
162
- * @param value
163
- * Value.
164
- *
165
- * @param transformationCallback
166
- * Called after the value is transformed to convert it to its final value.
167
- *
168
- * @returns
169
- * Value transformed into object.
170
- */
171
- forward<T>(value: number | bigint, transformationCallback: TransformationCallback<T>): T;
172
-
173
- /**
174
- * Transform values forward.
175
- *
176
- * @param values
177
- * Values. If this is an instance of {@link Sequencer}, the minimum and maximum values are validated prior to
178
- * transformation. Otherwise, the individual values are validated at the time of transformation.
179
- *
180
- * @returns
181
- * Transformed values.
182
- */
183
- forward(values: Iterable<number | bigint>): IterableIterator<bigint>;
184
-
185
- /**
186
- * Transform values forward.
130
+ * Transform value(s) forward.
187
131
  *
188
132
  * @template T
189
- * Type returned by transformation callback.
190
- *
191
- * @param values
192
- * Values. If this is an instance of {@link Sequencer}, the minimum and maximum values are validated prior to
193
- * transformation. Otherwise, the individual values are validated at the time of transformation.
194
- *
195
- * @param transformationCallback
196
- * Called after each value is transformed to convert it to its final value.
197
- *
198
- * @returns
199
- * Values transformed into objects.
200
- */
201
- forward<T>(values: Iterable<number | bigint>, transformationCallback: TransformationCallback<T>): IterableIterator<T>;
202
-
203
- /**
204
- * Transform a value or values forward. This signature exists to allow similar overloaded methods in other classes
205
- * to call this method correctly.
133
+ * Value(s) input type.
206
134
  *
207
135
  * @param valueOrValues
136
+ * Value(s). If this is an instance of {@link Sequencer}, the minimum and maximum values are validated prior to
137
+ * transformation. Otherwise, the individual value(s) is/are validated at the time of transformation.
208
138
  *
209
139
  * @returns
140
+ * Transformed value(s).
210
141
  */
211
- forward(valueOrValues: number | bigint | Iterable<number | bigint>): bigint | IterableIterator<bigint>;
142
+ forward<T extends TransformerInput<number | bigint>>(valueOrValues: T): TransformerOutput<T, bigint>;
212
143
 
213
144
  /**
214
- * Transform a value or values forward. This signature exists to allow similar overloaded methods in other classes
215
- * to call this method correctly.
145
+ * Transform value(s) forward, optionally applying a transformation.
216
146
  *
217
147
  * @template T
148
+ * Value(s) input type.
218
149
  *
219
- * @param valueOrValues
220
- *
221
- * @param transformationCallback
222
- *
223
- * @returns
224
- */
225
- forward<T>(valueOrValues: number | bigint | Iterable<number | bigint>, transformationCallback: TransformationCallback<T>): T | IterableIterator<T>;
226
-
227
- /**
228
- * Transform a value or values forward.
229
- *
230
- * @template T
231
- * Type returned by transformation callback.
150
+ * @template U
151
+ * Transformation callback output type.
232
152
  *
233
153
  * @param valueOrValues
234
- * Value(s).
154
+ * Value(s). If this is an instance of {@link Sequencer}, the minimum and maximum values are validated prior to
155
+ * transformation. Otherwise, the individual value(s) is/are validated at the time of transformation.
235
156
  *
236
- * @param transformationCallback
237
- * Called after value(s) is/are transformed to convert it/them to its/their final value(s).
157
+ * @param transformerCallback
158
+ * Called after each value is transformed to convert it to its final value.
238
159
  *
239
160
  * @returns
240
- * Value(s) transformed into object(s).
161
+ * Transformed value(s).
241
162
  */
242
- forward<T>(valueOrValues: number | bigint | Iterable<number | bigint>, transformationCallback?: TransformationCallback<T>): bigint | T | IterableIterator<bigint> | IterableIterator<T> {
243
- let result: bigint | T | IterableIterator<bigint> | IterableIterator<T>;
163
+ forward<T extends TransformerInput<number | bigint>, U>(valueOrValues: T, transformerCallback: TransformerCallback<bigint, U>): TransformerOutput<T, U>;
164
+
165
+ // eslint-disable-next-line jsdoc/require-jsdoc -- Implementation of overloaded signatures.
166
+ forward<T extends TransformerInput<number | bigint>, U>(valueOrValues: T, transformerCallback?: TransformerCallback<bigint, U>): TransformerOutput<T, U> {
167
+ // TODO Refactor type when https://github.com/microsoft/TypeScript/pull/56941 released.
168
+ let result: bigint | U | IterableIterator<bigint> | IterableIterator<U>;
244
169
 
245
170
  if (typeof valueOrValues !== "object") {
246
171
  const valueN = BigInt(valueOrValues);
@@ -249,7 +174,7 @@ export abstract class Transformer {
249
174
 
250
175
  const transformedValue = this.doForward(valueN);
251
176
 
252
- result = transformationCallback === undefined ? transformedValue : transformationCallback(transformedValue, 0);
177
+ result = transformerCallback === undefined ? transformedValue : transformerCallback(transformedValue, 0);
253
178
  } else if (valueOrValues instanceof Sequencer) {
254
179
  if (valueOrValues.minValue < 0n) {
255
180
  throw new RangeError(i18next.t("Transformer.minValueMustBeGreaterThanOrEqualToZero", {
@@ -266,11 +191,11 @@ export abstract class Transformer {
266
191
  }));
267
192
  }
268
193
 
269
- result = transformationCallback === undefined ?
194
+ result = transformerCallback === undefined ?
270
195
  IteratorProxy.from(valueOrValues).map(value => this.doForward(value)) :
271
- IteratorProxy.from(valueOrValues).map((value, index) => transformationCallback(this.doForward(value), index));
196
+ IteratorProxy.from(valueOrValues).map((value, index) => transformerCallback(this.doForward(value), index));
272
197
  } else {
273
- result = transformationCallback === undefined ?
198
+ result = transformerCallback === undefined ?
274
199
  IteratorProxy.from(valueOrValues).map((value) => {
275
200
  const valueN = BigInt(value);
276
201
 
@@ -283,11 +208,12 @@ export abstract class Transformer {
283
208
 
284
209
  this.validate(valueN);
285
210
 
286
- return transformationCallback(this.doForward(valueN), index);
211
+ return transformerCallback(this.doForward(valueN), index);
287
212
  });
288
213
  }
289
214
 
290
- return result;
215
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Type determination is handled above.
216
+ return result as TransformerOutput<T, U>;
291
217
  }
292
218
 
293
219
  /**
package/src/types.ts ADDED
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Transformer input, one of:
3
+ *
4
+ * - T (primitive type)
5
+ * - Iterable<T>
6
+ *
7
+ * @template T
8
+ * Primitive type.
9
+ */
10
+ export type TransformerInput<T extends string | number | bigint | boolean> =
11
+ T | Iterable<T>;
12
+
13
+ /**
14
+ * Transformer callback, used to convert transformed value to its final value.
15
+ *
16
+ * @template TInput
17
+ * Type of input to callback.
18
+ *
19
+ * @template TOutput
20
+ * Type of output to callback.
21
+ *
22
+ * @param input
23
+ * Input value.
24
+ *
25
+ * @param index
26
+ * Index in sequence (0 for single transformation).
27
+ *
28
+ * @returns
29
+ * Output value.
30
+ */
31
+ export type TransformerCallback<TInput, TOutput> = (input: TInput, index: number) => TOutput;
32
+
33
+ /**
34
+ * Transformer output, based on transformer input:
35
+ *
36
+ * - If type T is primitive type, result is type U.
37
+ * - If type T is Iterable type, result is type IterableIterator<U>.
38
+ *
39
+ * @template T
40
+ * Transformer input type.
41
+ *
42
+ * @template U
43
+ * Output base type.
44
+ */
45
+ export type TransformerOutput<T extends TransformerInput<string | number | bigint | boolean>, U> =
46
+ T extends (T extends TransformerInput<infer V> ? V : never) ? U : IterableIterator<U>;
@@ -6,12 +6,11 @@ import {
6
6
  CharacterSetCreator,
7
7
  Exclusion,
8
8
  HEXADECIMAL_CREATOR,
9
- IteratorProxy,
10
9
  NUMERIC_CREATOR,
11
10
  Sequencer
12
11
  } from "../src/index.js";
13
12
 
14
- await i18nInit(I18NEnvironment.CLI, true);
13
+ await i18nInit(I18NEnvironment.CLI);
15
14
 
16
15
  function testCharacterSetCreator(name: string, characterSetCreator: CharacterSetCreator, characterSetSize: number, length: number, excludeFirstZero: boolean, excludeAllNumeric: boolean): void {
17
16
  describe(name, () => {
@@ -65,7 +64,7 @@ function testCharacterSetCreator(name: string, characterSetCreator: CharacterSet
65
64
  break;
66
65
  }
67
66
 
68
- const sequence = IteratorProxy.from(characterSetCreator.create(length, new Sequencer(0n, domain), exclusion));
67
+ const sequence = Iterator.from(characterSetCreator.create(length, new Sequencer(0n, domain), exclusion));
69
68
 
70
69
  let previousS = "";
71
70
 
@@ -86,7 +85,7 @@ function testCharacterSetCreator(name: string, characterSetCreator: CharacterSet
86
85
 
87
86
  expect(() => characterSetCreator.create(length, domain, exclusion)).toThrow(`Value ${domain} must be less than ${domain}`);
88
87
 
89
- const sparseSequence = IteratorProxy.from(characterSetCreator.create(length, new Sequencer(domain - 1, -domain), exclusion, 123456n));
88
+ const sparseSequence = Iterator.from(characterSetCreator.create(length, new Sequencer(domain - 1, -domain), exclusion, 123456n));
90
89
 
91
90
  let sequential = true;
92
91
  previousS = "~";
@@ -194,7 +193,7 @@ testCharacterSetCreator("Hexadecimal", HEXADECIMAL_CREATOR, 16, 4, true, true);
194
193
  testCharacterSetCreator("Alphabetic", ALPHABETIC_CREATOR, 26, 3, false, false);
195
194
  testCharacterSetCreator("Alphanumeric", ALPHANUMERIC_CREATOR, 36, 3, true, true);
196
195
  testCharacterSetCreator("Middle numeric", new CharacterSetCreator([
197
- "(", ")", "*", "+",
196
+ "(", ")",
198
197
  "0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
199
- ":", ";", "<", ">"
200
- ], Exclusion.AllNumeric), 18, 4, false, true);
198
+ "<", ">"
199
+ ], Exclusion.AllNumeric), 14, 4, false, true);
@@ -1,5 +1,5 @@
1
1
  import { describe, expect, test } from "vitest";
2
- import { type IterationSource, IteratorProxy } from "../src/index.js";
2
+ import { IteratorProxy } from "../src/index.js";
3
3
 
4
4
  const source: readonly string[] = [
5
5
  "1", "2", "3", "4", "5"
@@ -28,7 +28,7 @@ function callbackSource(): string[] {
28
28
  }
29
29
 
30
30
  describe("Basic", () => {
31
- function validateIterable(iterationSource: IterationSource<string>): void {
31
+ function validateIterable(iterationSource: Iterator<string> | Iterable<string>): void {
32
32
  const iteratorProxy = IteratorProxy.from(iterationSource);
33
33
 
34
34
  expect(IteratorProxy.from(iteratorProxy)).toBe(iteratorProxy);
@@ -143,6 +143,22 @@ describe("Helpers", () => {
143
143
  }
144
144
 
145
145
  expect(count).toBe(3);
146
+
147
+ count = 0;
148
+
149
+ for (const element of IteratorProxy.from(source).take(source.length + 1)) {
150
+ expect(element).toBe(String(++count));
151
+ }
152
+
153
+ expect(count).toBe(source.length);
154
+
155
+ count = 0;
156
+
157
+ for (const element of IteratorProxy.from(source).take(0)) {
158
+ expect(element).toBe(String(++count));
159
+ }
160
+
161
+ expect(count).toBe(0);
146
162
  });
147
163
 
148
164
  test("Drop", () => {
@@ -153,6 +169,22 @@ describe("Helpers", () => {
153
169
  }
154
170
 
155
171
  expect(count).toBe(source.length - 3);
172
+
173
+ count = 0;
174
+
175
+ for (const element of IteratorProxy.from(source).drop(0)) {
176
+ expect(element).toBe(String(++count));
177
+ }
178
+
179
+ expect(count).toBe(source.length);
180
+
181
+ count = 0;
182
+
183
+ for (const element of IteratorProxy.from(source).drop(source.length)) {
184
+ expect(element).toBe(String(++count));
185
+ }
186
+
187
+ expect(count).toBe(0);
156
188
  });
157
189
 
158
190
  test("To array", () => {
@@ -2,7 +2,7 @@ import { I18NEnvironment, i18nInit } from "@aidc-toolkit/core";
2
2
  import { describe, expect, test } from "vitest";
3
3
  import { RecordValidator } from "../src/index.js";
4
4
 
5
- await i18nInit(I18NEnvironment.CLI, true);
5
+ await i18nInit(I18NEnvironment.CLI);
6
6
 
7
7
  describe("Record validator", () => {
8
8
  enum StringEnum {
@@ -2,7 +2,7 @@ import { I18NEnvironment, i18nInit } from "@aidc-toolkit/core";
2
2
  import { describe, expect, test } from "vitest";
3
3
  import { RegExpValidator } from "../src/index.js";
4
4
 
5
- await i18nInit(I18NEnvironment.CLI, true);
5
+ await i18nInit(I18NEnvironment.CLI);
6
6
 
7
7
  describe("Regular expression validator", () => {
8
8
  test("Validation", () => {
@@ -1,8 +1,8 @@
1
1
  import { I18NEnvironment, i18nInit } from "@aidc-toolkit/core";
2
2
  import { describe, expect, test } from "vitest";
3
- import { IteratorProxy, Sequencer } from "../src/index.js";
3
+ import { Sequencer } from "../src/index.js";
4
4
 
5
- await i18nInit(I18NEnvironment.CLI, true);
5
+ await i18nInit(I18NEnvironment.CLI);
6
6
 
7
7
  describe("Sequence", () => {
8
8
  const sequencer1 = new Sequencer(10, 20);
@@ -29,7 +29,7 @@ describe("Sequence", () => {
29
29
  expectedValue = 10n;
30
30
  count = 0;
31
31
 
32
- for (const value of IteratorProxy.from(sequencer1)) {
32
+ for (const value of Iterator.from(sequencer1)) {
33
33
  expect(value).toBe(expectedValue);
34
34
 
35
35
  expectedValue++;
@@ -41,7 +41,7 @@ describe("Sequence", () => {
41
41
  expectedValue = 29n;
42
42
  count = 0;
43
43
 
44
- for (const value of IteratorProxy.from(sequencer2)) {
44
+ for (const value of Iterator.from(sequencer2)) {
45
45
  expect(value).toBe(expectedValue);
46
46
 
47
47
  expectedValue--;
@@ -60,7 +60,7 @@ describe("Sequence", () => {
60
60
 
61
61
  sequencer1.reset();
62
62
 
63
- for (const value of IteratorProxy.from(sequencer1)) {
63
+ for (const value of Iterator.from(sequencer1)) {
64
64
  expect(value).toBe(expectedValue);
65
65
 
66
66
  expectedValue++;
@@ -2,7 +2,7 @@ import { I18NEnvironment, i18nInit } from "@aidc-toolkit/core";
2
2
  import { describe, expect, test } from "vitest";
3
3
  import { EncryptionTransformer, IdentityTransformer, Sequencer, Transformer } from "../src/index.js";
4
4
 
5
- await i18nInit(I18NEnvironment.CLI, true);
5
+ await i18nInit(I18NEnvironment.CLI);
6
6
 
7
7
  function testTransformer(domain: number, tweak?: number, callback?: (value: bigint, forwardValue: bigint) => void): void {
8
8
  const transformer = Transformer.get(domain, tweak);
@@ -1,32 +0,0 @@
1
- ---
2
- name: Bug report
3
- about: Create a report to help us improve
4
- title: ''
5
- labels: ''
6
- assignees: ''
7
-
8
- ---
9
-
10
- **Describe the bug**
11
- A clear and concise description of what the bug is.
12
-
13
- **To Reproduce**
14
- Steps to reproduce the behavior:
15
- 1. Go to '...'
16
- 2. Click on '....'
17
- 3. Scroll down to '....'
18
- 4. See error
19
-
20
- **Expected behavior**
21
- A clear and concise description of what you expected to happen.
22
-
23
- **Screenshots**
24
- If applicable, add screenshots to help explain your problem.
25
-
26
- **Platform**
27
- - OS: [e.g. Windows, iOS]
28
- - Browser [e.g. chrome, safari]
29
- - Browser Version [e.g. 22]
30
-
31
- **Additional context**
32
- Add any other context about the problem here.
@@ -1,20 +0,0 @@
1
- ---
2
- name: Feature request
3
- about: Suggest an idea for this project
4
- title: ''
5
- labels: ''
6
- assignees: ''
7
-
8
- ---
9
-
10
- **Is your feature request related to a problem? Please describe.**
11
- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
-
13
- **Describe the solution you'd like**
14
- A clear and concise description of what you want to happen.
15
-
16
- **Describe alternatives you've considered**
17
- A clear and concise description of any alternative solutions or features you've considered.
18
-
19
- **Additional context**
20
- Add any other context or screenshots about the feature request here.
@@ -1,38 +0,0 @@
1
- # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2
- # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3
-
4
- name: Node.js Package
5
-
6
- on:
7
- release:
8
- types: [created]
9
-
10
- jobs:
11
- build:
12
- runs-on: ubuntu-latest
13
- steps:
14
- - uses: actions/checkout@v4
15
- - uses: actions/setup-node@v4
16
- with:
17
- node-version: 22
18
- - run: npm ci
19
- # This is necessary to work around platform-specific optional dependencies bug (https://github.com/npm/cli/issues/4828).
20
- # - run: npm i @rollup/rollup-linux-x64-gnu
21
- # "vitest run" fails with:
22
- # Error: failed to resolve "extends":"@aidc-toolkit/dev/tsconfig.json" in /home/runner/work/utility/utility/tsconfig.json
23
- # Caused by: Error: Cannot find module '@aidc-toolkit/dev/tsconfig.json/tsconfig.json'
24
- # - run: npm test
25
-
26
- publish-npm:
27
- needs: build
28
- runs-on: ubuntu-latest
29
- steps:
30
- - uses: actions/checkout@v4
31
- - uses: actions/setup-node@v4
32
- with:
33
- node-version: 22
34
- registry-url: https://registry.npmjs.org/
35
- - run: npm ci
36
- - run: npm publish --access public
37
- env:
38
- NODE_AUTH_TOKEN: ${{secrets.npm_token}}
@@ -1,7 +0,0 @@
1
- <component name="InspectionProjectProfileManager">
2
- <profile version="1.0">
3
- <option name="myName" value="Project Default" />
4
- <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
5
- <inspection_tool class="UpdateDependencyToLatestVersion" enabled="true" level="WARNING" enabled_by_default="true" editorAttributes="WARNING_ATTRIBUTES" />
6
- </profile>
7
- </component>
package/.idea/misc.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="openjdk-21" project-jdk-type="JavaSDK">
4
- <output url="file://$PROJECT_DIR$/out" />
5
- </component>
6
- </project>
package/.idea/modules.xml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/utility.iml" filepath="$PROJECT_DIR$/.idea/utility.iml" />
6
- </modules>
7
- </component>
8
- </project>
@@ -1,12 +0,0 @@
1
- <component name="ProjectRunConfigurationManager">
2
- <configuration default="false" name="Test all" type="JavaScriptTestRunnerVitest">
3
- <node-interpreter value="project" />
4
- <vitest-package value="$PROJECT_DIR$/node_modules/vitest" />
5
- <working-dir value="$PROJECT_DIR$" />
6
- <vitest-options value="--run" />
7
- <envs />
8
- <scope-kind value="DIRECTORY" />
9
- <test-directory value="$PROJECT_DIR$/test" />
10
- <method v="2" />
11
- </configuration>
12
- </component>
@@ -1,12 +0,0 @@
1
- <component name="ProjectRunConfigurationManager">
2
- <configuration default="false" name="Test character set" type="JavaScriptTestRunnerVitest">
3
- <node-interpreter value="project" />
4
- <vitest-package value="$PROJECT_DIR$/node_modules/vitest" />
5
- <working-dir value="$PROJECT_DIR$" />
6
- <vitest-options value="--run" />
7
- <envs />
8
- <scope-kind value="TEST_FILE" />
9
- <test-file value="$PROJECT_DIR$/test/character_set.test.ts" />
10
- <method v="2" />
11
- </configuration>
12
- </component>
@@ -1,12 +0,0 @@
1
- <component name="ProjectRunConfigurationManager">
2
- <configuration default="false" name="Test iterator proxy" type="JavaScriptTestRunnerVitest">
3
- <node-interpreter value="project" />
4
- <vitest-package value="$PROJECT_DIR$/node_modules/vitest" />
5
- <working-dir value="$PROJECT_DIR$" />
6
- <vitest-options value="--run" />
7
- <envs />
8
- <scope-kind value="TEST_FILE" />
9
- <test-file value="$PROJECT_DIR$/test/iterator_proxy.test.ts" />
10
- <method v="2" />
11
- </configuration>
12
- </component>
@@ -1,12 +0,0 @@
1
- <component name="ProjectRunConfigurationManager">
2
- <configuration default="false" name="Test record" type="JavaScriptTestRunnerVitest">
3
- <node-interpreter value="project" />
4
- <vitest-package value="$PROJECT_DIR$/node_modules/vitest" />
5
- <working-dir value="$PROJECT_DIR$" />
6
- <vitest-options value="--run" />
7
- <envs />
8
- <scope-kind value="TEST_FILE" />
9
- <test-file value="$PROJECT_DIR$/test/record.test.ts" />
10
- <method v="2" />
11
- </configuration>
12
- </component>
@@ -1,12 +0,0 @@
1
- <component name="ProjectRunConfigurationManager">
2
- <configuration default="false" name="Test regular expression" type="JavaScriptTestRunnerVitest">
3
- <node-interpreter value="project" />
4
- <vitest-package value="$PROJECT_DIR$/node_modules/vitest" />
5
- <working-dir value="$PROJECT_DIR$" />
6
- <vitest-options value="--run" />
7
- <envs />
8
- <scope-kind value="TEST_FILE" />
9
- <test-file value="$PROJECT_DIR$/test/reg_exp.test.ts" />
10
- <method v="2" />
11
- </configuration>
12
- </component>
@@ -1,12 +0,0 @@
1
- <component name="ProjectRunConfigurationManager">
2
- <configuration default="false" name="Test transformer" type="JavaScriptTestRunnerVitest">
3
- <node-interpreter value="project" />
4
- <vitest-package value="$PROJECT_DIR$/node_modules/vitest" />
5
- <working-dir value="$PROJECT_DIR$" />
6
- <vitest-options value="--run" />
7
- <envs />
8
- <scope-kind value="TEST_FILE" />
9
- <test-file value="$PROJECT_DIR$/test/transformer.test.ts" />
10
- <method v="2" />
11
- </configuration>
12
- </component>
@@ -1,12 +0,0 @@
1
- <component name="ProjectRunConfigurationManager">
2
- <configuration default="false" name="build" type="js.build_tools.npm" nameIsGenerated="true">
3
- <package-json value="$PROJECT_DIR$/package.json" />
4
- <command value="run" />
5
- <scripts>
6
- <script value="build" />
7
- </scripts>
8
- <node-interpreter value="project" />
9
- <envs />
10
- <method v="2" />
11
- </configuration>
12
- </component>
@@ -1,12 +0,0 @@
1
- <component name="ProjectRunConfigurationManager">
2
- <configuration default="false" name="build-dev" type="js.build_tools.npm" nameIsGenerated="true">
3
- <package-json value="$PROJECT_DIR$/package.json" />
4
- <command value="run" />
5
- <scripts>
6
- <script value="build-dev" />
7
- </scripts>
8
- <node-interpreter value="project" />
9
- <envs />
10
- <method v="2" />
11
- </configuration>
12
- </component>
@@ -1,12 +0,0 @@
1
- <component name="ProjectRunConfigurationManager">
2
- <configuration default="false" name="eslint" type="js.build_tools.npm" nameIsGenerated="true">
3
- <package-json value="$PROJECT_DIR$/package.json" />
4
- <command value="run" />
5
- <scripts>
6
- <script value="eslint" />
7
- </scripts>
8
- <node-interpreter value="project" />
9
- <envs />
10
- <method v="2" />
11
- </configuration>
12
- </component>
package/.idea/utility.iml DELETED
@@ -1,9 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="JAVA_MODULE" version="4">
3
- <component name="NewModuleRootManager" inherit-compiler-output="true">
4
- <exclude-output />
5
- <content url="file://$MODULE_DIR$" />
6
- <orderEntry type="inheritedJdk" />
7
- <orderEntry type="sourceFolder" forTests="false" />
8
- </component>
9
- </module>