@augment-vir/node 31.39.0 → 31.41.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/docker.d.ts +2 -1
- package/dist/augments/docker.js +2 -1
- package/dist/augments/path/sanitize-path.d.ts +1 -0
- package/dist/augments/path/sanitize-path.js +1 -0
- package/dist/augments/terminal/shell.js +6 -2
- package/dist/docker/containers/run-container.mock.js +1 -0
- package/dist/scripts/fix-ts-bin.script.js +6 -0
- package/package.json +9 -9
- package/src/augments/docker.ts +2 -1
- package/src/augments/path/sanitize-path.ts +1 -0
- package/src/augments/terminal/shell.ts +6 -2
- package/src/docker/containers/run-container.mock.ts +2 -0
- package/src/scripts/fix-ts-bin.script.ts +6 -0
|
@@ -15,8 +15,9 @@ export { type DockerEnvMap, type DockerPortMap, type DockerVolumeMap, type Docke
|
|
|
15
15
|
export { type RunDockerContainerCommandParams } from '../docker/containers/run-command.js';
|
|
16
16
|
export { type RunDockerContainerParams } from '../docker/containers/run-container.js';
|
|
17
17
|
/**
|
|
18
|
-
* Centralized Docker API
|
|
18
|
+
* Centralized Docker API.
|
|
19
19
|
*
|
|
20
|
+
* @deprecated Use the [docker-vir](https://www.npmjs.com/package/docker-vir) package instead.
|
|
20
21
|
* @category Node : Docker
|
|
21
22
|
* @category Package : @augment-vir/node
|
|
22
23
|
* @package [`@augment-vir/node`](https://www.npmjs.com/package/@augment-vir/node)
|
package/dist/augments/docker.js
CHANGED
|
@@ -10,8 +10,9 @@ import { isImageInLocalRegistry, removeImageFromLocalRegistry, updateImage, } fr
|
|
|
10
10
|
import { isDockerRunning, startDocker } from '../docker/docker-startup.js';
|
|
11
11
|
export { DockerContainerStatus, exitedDockerContainerStatuses, } from '../docker/containers/container-status.js';
|
|
12
12
|
/**
|
|
13
|
-
* Centralized Docker API
|
|
13
|
+
* Centralized Docker API.
|
|
14
14
|
*
|
|
15
|
+
* @deprecated Use the [docker-vir](https://www.npmjs.com/package/docker-vir) package instead.
|
|
15
16
|
* @category Node : Docker
|
|
16
17
|
* @category Package : @augment-vir/node
|
|
17
18
|
* @package [`@augment-vir/node`](https://www.npmjs.com/package/@augment-vir/node)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { collapseWhiteSpace, safeSplit } from '@augment-vir/common';
|
|
2
2
|
import { extname } from 'node:path';
|
|
3
3
|
import sanitizeFileName from 'sanitize-filename';
|
|
4
|
+
/** @deprecated: use `sanitizeFilePath` from `@augment-vir/common` instead. */
|
|
4
5
|
export function sanitizePath(original) {
|
|
5
6
|
if (!original) {
|
|
6
7
|
return undefined;
|
|
@@ -99,8 +99,12 @@ export function streamShellCommand(command, cwd, shell = 'bash', env = process.e
|
|
|
99
99
|
const exitSignal = inputExitSignal ?? undefined;
|
|
100
100
|
if ((exitCode !== undefined && exitCode !== 0) || exitSignal !== undefined) {
|
|
101
101
|
const execException = new Error(`Command failed: ${command}`);
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
if (exitCode != undefined) {
|
|
103
|
+
execException.code = exitCode;
|
|
104
|
+
}
|
|
105
|
+
if (exitSignal != undefined) {
|
|
106
|
+
execException.signal = exitSignal;
|
|
107
|
+
}
|
|
104
108
|
execException.cmd = command;
|
|
105
109
|
execException.killed = childProcess.killed;
|
|
106
110
|
execException.cwd = cwd;
|
|
@@ -43,6 +43,12 @@ const packagesToFix = [
|
|
|
43
43
|
scriptPath: join('prettier', 'bin', 'prettier.cjs'),
|
|
44
44
|
fixImport: false,
|
|
45
45
|
},
|
|
46
|
+
{
|
|
47
|
+
packageName: '@web/test-runner',
|
|
48
|
+
binName: 'web-test-runner',
|
|
49
|
+
scriptPath: join('@web/test-runner', 'dist', 'bin.js'),
|
|
50
|
+
fixImport: false,
|
|
51
|
+
},
|
|
46
52
|
];
|
|
47
53
|
function createBinFileContents({ scriptPath }) {
|
|
48
54
|
return [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@augment-vir/node",
|
|
3
|
-
"version": "31.
|
|
3
|
+
"version": "31.41.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,20 +38,20 @@
|
|
|
38
38
|
"test:update": "npm test"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@augment-vir/assert": "^31.
|
|
42
|
-
"@augment-vir/common": "^31.
|
|
43
|
-
"@date-vir/duration": "^7.4.
|
|
41
|
+
"@augment-vir/assert": "^31.41.0",
|
|
42
|
+
"@augment-vir/common": "^31.41.0",
|
|
43
|
+
"@date-vir/duration": "^7.4.3",
|
|
44
44
|
"ansi-styles": "^6.2.3",
|
|
45
45
|
"sanitize-filename": "^1.6.3",
|
|
46
46
|
"terminate": "^2.8.0",
|
|
47
47
|
"tsx": "^4.20.6",
|
|
48
|
-
"type-fest": "^5.0
|
|
48
|
+
"type-fest": "^5.1.0",
|
|
49
49
|
"typed-event-target": "^4.1.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@augment-vir/test": "^31.
|
|
53
|
-
"@prisma/client": "^6.
|
|
54
|
-
"@types/node": "^24.
|
|
52
|
+
"@augment-vir/test": "^31.41.0",
|
|
53
|
+
"@prisma/client": "^6.17.1",
|
|
54
|
+
"@types/node": "^24.7.2",
|
|
55
55
|
"@web/dev-server-esbuild": "^1.0.4",
|
|
56
56
|
"@web/test-runner": "^0.20.2",
|
|
57
57
|
"@web/test-runner-commands": "^0.9.0",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@web/test-runner-visual-regression": "^0.10.0",
|
|
60
60
|
"c8": "^10.1.3",
|
|
61
61
|
"istanbul-smart-text-reporter": "^1.1.5",
|
|
62
|
-
"prisma": "^6.
|
|
62
|
+
"prisma": "^6.17.1",
|
|
63
63
|
"typescript": "^5.9.3"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
package/src/augments/docker.ts
CHANGED
|
@@ -42,8 +42,9 @@ export {type RunDockerContainerCommandParams} from '../docker/containers/run-com
|
|
|
42
42
|
export {type RunDockerContainerParams} from '../docker/containers/run-container.js';
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
|
-
* Centralized Docker API
|
|
45
|
+
* Centralized Docker API.
|
|
46
46
|
*
|
|
47
|
+
* @deprecated Use the [docker-vir](https://www.npmjs.com/package/docker-vir) package instead.
|
|
47
48
|
* @category Node : Docker
|
|
48
49
|
* @category Package : @augment-vir/node
|
|
49
50
|
* @package [`@augment-vir/node`](https://www.npmjs.com/package/@augment-vir/node)
|
|
@@ -2,6 +2,7 @@ import {collapseWhiteSpace, safeSplit} from '@augment-vir/common';
|
|
|
2
2
|
import {extname} from 'node:path';
|
|
3
3
|
import sanitizeFileName from 'sanitize-filename';
|
|
4
4
|
|
|
5
|
+
/** @deprecated: use `sanitizeFilePath` from `@augment-vir/common` instead. */
|
|
5
6
|
export function sanitizePath(original: string | null | undefined): string | undefined {
|
|
6
7
|
if (!original) {
|
|
7
8
|
return undefined;
|
|
@@ -133,8 +133,12 @@ export function streamShellCommand(
|
|
|
133
133
|
const execException: ExecException & {cwd?: string | undefined} = new Error(
|
|
134
134
|
`Command failed: ${command}`,
|
|
135
135
|
);
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
if (exitCode != undefined) {
|
|
137
|
+
execException.code = exitCode;
|
|
138
|
+
}
|
|
139
|
+
if (exitSignal != undefined) {
|
|
140
|
+
execException.signal = exitSignal;
|
|
141
|
+
}
|
|
138
142
|
execException.cmd = command;
|
|
139
143
|
execException.killed = childProcess.killed;
|
|
140
144
|
execException.cwd = cwd;
|
|
@@ -53,6 +53,12 @@ const packagesToFix: ReadonlyArray<Readonly<PackageToFix>> = [
|
|
|
53
53
|
scriptPath: join('prettier', 'bin', 'prettier.cjs'),
|
|
54
54
|
fixImport: false,
|
|
55
55
|
},
|
|
56
|
+
{
|
|
57
|
+
packageName: '@web/test-runner',
|
|
58
|
+
binName: 'web-test-runner',
|
|
59
|
+
scriptPath: join('@web/test-runner', 'dist', 'bin.js'),
|
|
60
|
+
fixImport: false,
|
|
61
|
+
},
|
|
56
62
|
];
|
|
57
63
|
|
|
58
64
|
function createBinFileContents({scriptPath}: Readonly<Pick<PackageToFix, 'scriptPath'>>): string {
|