@augment-vir/node 31.14.1 → 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.
- package/dist/augments/fs/json.d.ts +2 -2
- package/dist/augments/fs/read-dir.d.ts +1 -1
- package/dist/augments/npm/query-workspace.d.ts +2 -2
- package/dist/augments/npm/read-package-json.d.ts +1 -1
- package/dist/augments/terminal/shell.d.ts +2 -2
- package/dist/docker/containers/container-info.d.ts +2 -2
- package/dist/docker/containers/kill-container.d.ts +1 -1
- package/dist/docker/containers/run-command.d.ts +1 -1
- package/dist/docker/containers/run-container.d.ts +1 -1
- package/dist/docker/containers/run-container.mock.d.ts +1 -1
- package/dist/prisma/model-data.d.ts +3 -3
- package/package.json +5 -5
- package/src/augments/fs/download.ts +1 -1
- package/src/augments/fs/json.ts +3 -3
- package/src/augments/fs/read-dir.ts +1 -1
- package/src/augments/npm/query-workspace.ts +2 -2
- package/src/augments/npm/read-package-json.ts +1 -1
- package/src/augments/path/resolve-import.ts +1 -1
- package/src/augments/prisma.ts +1 -1
- package/src/augments/terminal/shell.ts +6 -2
- package/src/docker/containers/container-info.ts +2 -2
- package/src/docker/containers/kill-container.ts +1 -1
- package/src/docker/containers/run-command.ts +1 -1
- package/src/docker/containers/run-container.mock.ts +1 -1
- package/src/docker/containers/run-container.ts +3 -3
- package/src/prisma/model-data.ts +7 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { JsonCompatibleArray, JsonCompatibleObject, type JsonCompatibleValue } from '@augment-vir/common';
|
|
2
|
-
import type
|
|
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,5 +1,5 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type
|
|
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,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
|
|
2
|
-
import type
|
|
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
|
|
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,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,
|
|
2
|
-
import type
|
|
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
|
|
13
|
+
* import {type PrismaClient} from '@prisma/client';
|
|
14
14
|
*
|
|
15
15
|
* const mockData: PrismaAddModelData<PrismaClient> = [
|
|
16
16
|
* {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@augment-vir/node",
|
|
3
|
-
"version": "31.
|
|
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.
|
|
42
|
-
"@augment-vir/common": "^31.
|
|
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.
|
|
51
|
+
"@augment-vir/test": "^31.15.0",
|
|
52
52
|
"@prisma/client": "^6.6.0",
|
|
53
|
-
"@types/node": "^22.
|
|
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
|
|
6
|
+
import {type ReadableStream} from 'node:stream/web';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Download a file.
|
package/src/augments/fs/json.ts
CHANGED
|
@@ -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
|
|
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
|
|
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);
|
|
@@ -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';
|
package/src/augments/prisma.ts
CHANGED
|
@@ -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
|
|
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 {
|
|
3
|
-
|
|
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
|
|
1
|
+
import {type JsonCompatibleArray, type JsonCompatibleObject} from '@augment-vir/common';
|
|
2
2
|
import {runShellCommand} from '../../augments/terminal/shell.js';
|
|
3
|
-
import type
|
|
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
|
|
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`.
|
|
@@ -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,
|
package/src/prisma/model-data.ts
CHANGED
|
@@ -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
|
|
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
|
|
32
|
+
* import {type PrismaClient} from '@prisma/client';
|
|
33
33
|
*
|
|
34
34
|
* const mockData: PrismaAddModelData<PrismaClient> = [
|
|
35
35
|
* {
|