@augment-vir/node 31.14.0 → 31.15.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,5 +1,5 @@
1
- import { JsonCompatibleArray, JsonCompatibleObject, type JsonCompatibleValue } from '@augment-vir/common';
2
- import type { PartialWithUndefined } from '@augment-vir/core';
1
+ import { type JsonCompatibleArray, type JsonCompatibleObject, type JsonCompatibleValue } from '@augment-vir/common';
2
+ import { type PartialWithUndefined } from '@augment-vir/core';
3
3
  /**
4
4
  * Read a file and also parse its contents as JSON.
5
5
  *
@@ -1,4 +1,4 @@
1
- import type { RequireExactlyOne } from 'type-fest';
1
+ import { type RequireExactlyOne } from 'type-fest';
2
2
  /**
3
3
  * Gets all files within a directory and its subdirectories, recursively. Returns an array of paths
4
4
  * relative to the given input path.
@@ -1,5 +1,5 @@
1
- import type { UnknownObject } from '@augment-vir/core';
2
- import type { PackageJson } from 'type-fest';
1
+ import { type UnknownObject } from '@augment-vir/core';
2
+ import { type PackageJson } from 'type-fest';
3
3
  /**
4
4
  * An npm workspace object. This is the return type for {@link queryNpmWorkspace}.
5
5
  *
@@ -1,4 +1,4 @@
1
- import { PackageJson } from 'type-fest';
1
+ import { type PackageJson } from 'type-fest';
2
2
  /**
3
3
  * Read the `package.json` file contained within the given directory.
4
4
  *
@@ -1,6 +1,6 @@
1
1
  import { type Logger } from '@augment-vir/common';
2
- import { type MaybePromise, PartialWithUndefined } from '@augment-vir/core';
3
- import { ChildProcess } from 'node:child_process';
2
+ import { type MaybePromise, type PartialWithUndefined } from '@augment-vir/core';
3
+ import { type ChildProcess } from 'node:child_process';
4
4
  import { ListenTarget } from 'typed-event-target';
5
5
  /**
6
6
  * All output from {@link runShellCommand}.
@@ -1,5 +1,5 @@
1
- import type { JsonCompatibleArray, JsonCompatibleObject } from '@augment-vir/common';
2
- import type { DockerContainerStatus } from './container-status.js';
1
+ import { type JsonCompatibleArray, type JsonCompatibleObject } from '@augment-vir/common';
2
+ import { type DockerContainerStatus } from './container-status.js';
3
3
  /**
4
4
  * Properties on {@link DockerContainerInfo}.State, retrieved from `docker.container.getInfo()`.
5
5
  *
@@ -1,4 +1,4 @@
1
- import type { PartialWithUndefined } from '@augment-vir/core';
1
+ import { type PartialWithUndefined } from '@augment-vir/core';
2
2
  export declare function killContainer(containerNameOrId: string, options?: PartialWithUndefined<{
3
3
  /**
4
4
  * If set to `true`, the container will be killed but won't be removed. (You'll still see it
@@ -1,4 +1,4 @@
1
- import { DockerEnvMap } from './docker-command-inputs.js';
1
+ import { type DockerEnvMap } from './docker-command-inputs.js';
2
2
  /**
3
3
  * Parameters for `docker.container.runCommand`.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { DockerEnvMap, DockerPortMap, DockerVolumeMap } from './docker-command-inputs.js';
1
+ import { type DockerEnvMap, type DockerPortMap, type DockerVolumeMap } from './docker-command-inputs.js';
2
2
  /**
3
3
  * Parameters for `docker.container.run`.
4
4
  *
@@ -1,2 +1,2 @@
1
- import { RunDockerContainerParams } from './run-container.js';
1
+ import { type RunDockerContainerParams } from './run-container.js';
2
2
  export declare function runMockLongLivingContainer(containerName: string, args?: Partial<RunDockerContainerParams>): Promise<void>;
@@ -1,5 +1,5 @@
1
- import { BasePrismaClient, PrismaAllModelsCreate, type PartialWithUndefined, type PrismaAllBasicModels, type PrismaModelName } from '@augment-vir/common';
2
- import type { IsAny } from 'type-fest';
1
+ import { type BasePrismaClient, type PartialWithUndefined, type PrismaAllBasicModels, type PrismaAllModelsCreate, type PrismaModelName } from '@augment-vir/common';
2
+ import { type IsAny } from 'type-fest';
3
3
  /**
4
4
  * Params for `prisma.client.addData()`. This is similar to {@link PrismaAllModelsCreate} but allows
5
5
  * an array of {@link PrismaAllModelsCreate} for sequential data creation.
@@ -10,7 +10,7 @@ import type { IsAny } from 'type-fest';
10
10
  *
11
11
  * ```ts
12
12
  * import {PrismaAddModelData} from '@augment-vir/common';
13
- * import type {PrismaClient} from '@prisma/client';
13
+ * import {type PrismaClient} from '@prisma/client';
14
14
  *
15
15
  * const mockData: PrismaAddModelData<PrismaClient> = [
16
16
  * {
@@ -28,7 +28,6 @@ const propertiesToReplace = [
28
28
  ];
29
29
  async function findFilesThatNeedImportFixes(monoRepoPath) {
30
30
  const { stdout } = await runShellCommand('find . -type d -name "node_modules" -prune -o -type f -path "*/dist/*.js" -exec grep -lE "from \'.*?/src/.*?\';" {} +', {
31
- rejectOnError: true,
32
31
  cwd: monoRepoPath,
33
32
  });
34
33
  const files = filterMap(stdout.trim().split('\n'), (line) => line.trim(), check.isTruthy);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@augment-vir/node",
3
- "version": "31.14.0",
3
+ "version": "31.15.0",
4
4
  "description": "A collection of augments, helpers types, functions, and classes only for Node.js (backend) JavaScript environments.",
5
5
  "keywords": [
6
6
  "augment",
@@ -38,8 +38,8 @@
38
38
  "test:update": "npm test"
39
39
  },
40
40
  "dependencies": {
41
- "@augment-vir/assert": "^31.14.0",
42
- "@augment-vir/common": "^31.14.0",
41
+ "@augment-vir/assert": "^31.15.0",
42
+ "@augment-vir/common": "^31.15.0",
43
43
  "@date-vir/duration": "^7.3.1",
44
44
  "ansi-styles": "^6.2.1",
45
45
  "terminate": "^2.8.0",
@@ -48,9 +48,9 @@
48
48
  "typed-event-target": "^4.0.3"
49
49
  },
50
50
  "devDependencies": {
51
- "@augment-vir/test": "^31.14.0",
51
+ "@augment-vir/test": "^31.15.0",
52
52
  "@prisma/client": "^6.6.0",
53
- "@types/node": "^22.14.1",
53
+ "@types/node": "^22.15.0",
54
54
  "@web/dev-server-esbuild": "^1.0.4",
55
55
  "@web/test-runner": "^0.20.1",
56
56
  "@web/test-runner-commands": "^0.9.0",
@@ -3,7 +3,7 @@ import {mkdir} from 'node:fs/promises';
3
3
  import {dirname} from 'node:path';
4
4
  import {Readable} from 'node:stream';
5
5
  import {finished} from 'node:stream/promises';
6
- import type {ReadableStream} from 'node:stream/web';
6
+ import {type ReadableStream} from 'node:stream/web';
7
7
 
8
8
  /**
9
9
  * Download a file.
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  appendJson,
3
- JsonCompatibleArray,
4
- JsonCompatibleObject,
3
+ type JsonCompatibleArray,
4
+ type JsonCompatibleObject,
5
5
  type JsonCompatibleValue,
6
6
  } from '@augment-vir/common';
7
- import type {PartialWithUndefined} from '@augment-vir/core';
7
+ import {type PartialWithUndefined} from '@augment-vir/core';
8
8
  import {mkdir, readFile} from 'node:fs/promises';
9
9
  import {dirname} from 'node:path';
10
10
  import {writeFileAndDir} from './write.js';
@@ -1,6 +1,6 @@
1
1
  import {readdir, stat} from 'node:fs/promises';
2
2
  import {join, relative} from 'node:path';
3
- import type {RequireExactlyOne} from 'type-fest';
3
+ import {type RequireExactlyOne} from 'type-fest';
4
4
 
5
5
  async function internalReadDirPathsRecursive(dirPath: string, basePath: string): Promise<string[]> {
6
6
  const dirContents = await readdir(dirPath);
@@ -1,5 +1,5 @@
1
- import type {UnknownObject} from '@augment-vir/core';
2
- import type {PackageJson} from 'type-fest';
1
+ import {type UnknownObject} from '@augment-vir/core';
2
+ import {type PackageJson} from 'type-fest';
3
3
  import {runShellCommand} from '../terminal/shell.js';
4
4
 
5
5
  /**
@@ -1,6 +1,6 @@
1
1
  import {check} from '@augment-vir/assert';
2
2
  import {join} from 'node:path';
3
- import {PackageJson} from 'type-fest';
3
+ import {type PackageJson} from 'type-fest';
4
4
  import {readJsonFile} from '../fs/json.js';
5
5
 
6
6
  /**
@@ -2,7 +2,7 @@ import {check} from '@augment-vir/assert';
2
2
  import {filterMap, getObjectTypedEntries} from '@augment-vir/common';
3
3
  import {existsSync, realpathSync} from 'node:fs';
4
4
  import {dirname, join, resolve, sep} from 'node:path';
5
- import {ParsedCommandLine} from 'typescript';
5
+ import {type ParsedCommandLine} from 'typescript';
6
6
  import {readTsconfig} from '../typescript/read-tsconfig.js';
7
7
  import {findAncestor} from './ancestor.js';
8
8
  import {replaceWithWindowsPathIfNeeded} from './os-path.js';
@@ -13,7 +13,7 @@ import {
13
13
  } from '../prisma/prisma-migrations.js';
14
14
 
15
15
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
16
- import type {PrismaMigrationNeededError, PrismaResetNeededError} from '../prisma/prisma-errors.js';
16
+ import {PrismaMigrationNeededError, PrismaResetNeededError} from '../prisma/prisma-errors.js';
17
17
 
18
18
  export type {
19
19
  PrismaAddDataData as PrismaAddModelData,
@@ -1,6 +1,10 @@
1
1
  import {combineErrors, log, type Logger} from '@augment-vir/common';
2
- import {type MaybePromise, PartialWithUndefined, RequiredAndNotNull} from '@augment-vir/core';
3
- import {ChildProcess, ExecException, spawn} from 'node:child_process';
2
+ import {
3
+ type MaybePromise,
4
+ type PartialWithUndefined,
5
+ type RequiredAndNotNull,
6
+ } from '@augment-vir/core';
7
+ import {type ChildProcess, type ExecException, spawn} from 'node:child_process';
4
8
  import {defineTypedCustomEvent, ListenTarget} from 'typed-event-target';
5
9
 
6
10
  /**
@@ -1,6 +1,6 @@
1
- import type {JsonCompatibleArray, JsonCompatibleObject} from '@augment-vir/common';
1
+ import {type JsonCompatibleArray, type JsonCompatibleObject} from '@augment-vir/common';
2
2
  import {runShellCommand} from '../../augments/terminal/shell.js';
3
- import type {DockerContainerStatus} from './container-status.js';
3
+ import {type DockerContainerStatus} from './container-status.js';
4
4
 
5
5
  /**
6
6
  * Properties on {@link DockerContainerInfo}.State, retrieved from `docker.container.getInfo()`.
@@ -1,4 +1,4 @@
1
- import type {PartialWithUndefined} from '@augment-vir/core';
1
+ import {type PartialWithUndefined} from '@augment-vir/core';
2
2
  import {runShellCommand} from '../../augments/terminal/shell.js';
3
3
  import {waitUntilContainerExited, waitUntilContainerRemoved} from './container-status.js';
4
4
 
@@ -1,6 +1,6 @@
1
1
  import {check} from '@augment-vir/assert';
2
2
  import {runShellCommand} from '../../augments/terminal/shell.js';
3
- import {DockerEnvMap, makeEnvFlags} from './docker-command-inputs.js';
3
+ import {type DockerEnvMap, makeEnvFlags} from './docker-command-inputs.js';
4
4
 
5
5
  /**
6
6
  * Parameters for `docker.container.runCommand`.
@@ -1,5 +1,5 @@
1
1
  import {docker} from '../../augments/docker.js';
2
- import {RunDockerContainerParams} from './run-container.js';
2
+ import {type RunDockerContainerParams} from './run-container.js';
3
3
 
4
4
  export async function runMockLongLivingContainer(
5
5
  containerName: string,
@@ -3,9 +3,9 @@ import {runShellCommand} from '../../augments/terminal/shell.js';
3
3
  import {updateImage} from '../docker-image.js';
4
4
  import {waitUntilContainerRunning} from './container-status.js';
5
5
  import {
6
- DockerEnvMap,
7
- DockerPortMap,
8
- DockerVolumeMap,
6
+ type DockerEnvMap,
7
+ type DockerPortMap,
8
+ type DockerVolumeMap,
9
9
  makeEnvFlags,
10
10
  makePortMapFlags,
11
11
  makeVolumeFlags,
@@ -1,23 +1,23 @@
1
1
  import {assert, check} from '@augment-vir/assert';
2
2
  import {
3
- AnyObject,
3
+ type AnyObject,
4
4
  arrayToObject,
5
5
  awaitedForEach,
6
- BasePrismaClient,
6
+ type BasePrismaClient,
7
7
  ensureErrorAndPrependMessage,
8
8
  filterMap,
9
9
  getObjectTypedEntries,
10
10
  getObjectTypedValues,
11
11
  mergeDefinedProperties,
12
12
  omitObjectKeys,
13
- PrismaAllModelsCreate,
14
- prismaModelCreateExclude,
15
- prismaModelCreateOmitId,
16
13
  type PartialWithUndefined,
17
14
  type PrismaAllBasicModels,
15
+ type PrismaAllModelsCreate,
16
+ prismaModelCreateExclude,
17
+ prismaModelCreateOmitId,
18
18
  type PrismaModelName,
19
19
  } from '@augment-vir/common';
20
- import type {IsAny} from 'type-fest';
20
+ import {type IsAny} from 'type-fest';
21
21
 
22
22
  /**
23
23
  * Params for `prisma.client.addData()`. This is similar to {@link PrismaAllModelsCreate} but allows
@@ -29,7 +29,7 @@ import type {IsAny} from 'type-fest';
29
29
  *
30
30
  * ```ts
31
31
  * import {PrismaAddModelData} from '@augment-vir/common';
32
- * import type {PrismaClient} from '@prisma/client';
32
+ * import {type PrismaClient} from '@prisma/client';
33
33
  *
34
34
  * const mockData: PrismaAddModelData<PrismaClient> = [
35
35
  * {
@@ -34,7 +34,6 @@ async function findFilesThatNeedImportFixes(monoRepoPath: string) {
34
34
  const {stdout} = await runShellCommand(
35
35
  'find . -type d -name "node_modules" -prune -o -type f -path "*/dist/*.js" -exec grep -lE "from \'.*?/src/.*?\';" {} +',
36
36
  {
37
- rejectOnError: true,
38
37
  cwd: monoRepoPath,
39
38
  },
40
39
  );