@ask-ell/back-end 0.2.3 → 0.2.4
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @ask-ell/back-end
|
|
2
2
|
|
|
3
|
+
## 0.2.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#20](https://github.com/ask-ell/stacks/pull/20) [`6eb9d13`](https://github.com/ask-ell/stacks/commit/6eb9d13e6473a022eb1377d3ca688811379e0376) Thanks [@timbitwin](https://github.com/timbitwin)! - script renamed to program
|
|
8
|
+
- Updated dependencies [[`6eb9d13`](https://github.com/ask-ell/stacks/commit/6eb9d13e6473a022eb1377d3ca688811379e0376)]:
|
|
9
|
+
- @ask-ell/node@0.0.6
|
|
10
|
+
|
|
3
11
|
## 0.2.3
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/package.json
CHANGED
package/src/scripts/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './move-keyv-data.
|
|
2
|
-
export * from './update-dependencies-versions.
|
|
1
|
+
export * from './move-keyv-data.program';
|
|
2
|
+
export * from './update-dependencies-versions.program';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PercentageIncrementor } from '@ask-ell/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Program, ProgramExecutionOptions } from '@ask-ell/node';
|
|
3
3
|
import { NestLogger } from '@ask-ell/nest';
|
|
4
4
|
import { Client, QueryResult } from 'pg';
|
|
5
5
|
|
|
@@ -8,7 +8,7 @@ type KeyvRowData<Value = unknown> = {
|
|
|
8
8
|
value: Value;
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
-
export class
|
|
11
|
+
export class MoveKeyvDataProgram extends Program {
|
|
12
12
|
constructor() {
|
|
13
13
|
super({
|
|
14
14
|
arguments: [
|
|
@@ -23,7 +23,7 @@ export class MoveKeyvDataScript extends Script {
|
|
|
23
23
|
required: true,
|
|
24
24
|
},
|
|
25
25
|
],
|
|
26
|
-
logger: NestLogger.fromClass(
|
|
26
|
+
logger: NestLogger.fromClass(MoveKeyvDataProgram),
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -31,7 +31,7 @@ export class MoveKeyvDataScript extends Script {
|
|
|
31
31
|
logger,
|
|
32
32
|
arguments: { origin, target },
|
|
33
33
|
prompts: { confirm },
|
|
34
|
-
}:
|
|
34
|
+
}: ProgramExecutionOptions): Promise<void> {
|
|
35
35
|
const originPostgresClient: Client = new Client(origin);
|
|
36
36
|
const targetPostgresClient: Client = new Client(target);
|
|
37
37
|
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
UnknownEnvironmentVariableError,
|
|
5
5
|
} from '@ask-ell/core';
|
|
6
6
|
import { NestLogger } from '@ask-ell/nest';
|
|
7
|
-
import {
|
|
7
|
+
import { ProgramExecutionOptions, Program } from '@ask-ell/node';
|
|
8
8
|
import { spawnSync } from 'node:child_process';
|
|
9
9
|
import { writeFileSync } from 'node:fs';
|
|
10
10
|
import { mkdir } from 'node:fs/promises';
|
|
@@ -42,7 +42,7 @@ function getOrganisationPackageFile(packageId: string): PackageContent {
|
|
|
42
42
|
return require(packageFilePath);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
export type
|
|
45
|
+
export type UpdateDependenciesVersionsProgramParams = {
|
|
46
46
|
organisationPackagePrefix: string;
|
|
47
47
|
blackListedPackages: string[];
|
|
48
48
|
};
|
|
@@ -57,7 +57,7 @@ export type WorkspaceDependenciesMap = {
|
|
|
57
57
|
[id: string]: WorkspaceDependenciesMapElement;
|
|
58
58
|
};
|
|
59
59
|
|
|
60
|
-
export class
|
|
60
|
+
export class UpdateDependenciesVersionsProgram extends Program {
|
|
61
61
|
private organisationPackagePrefix: string;
|
|
62
62
|
private blackListedPackages: string[];
|
|
63
63
|
private workspaceDependenciesMap: WorkspaceDependenciesMap =
|
|
@@ -66,9 +66,9 @@ export class UpdateDependenciesVersionsScript extends Script {
|
|
|
66
66
|
constructor({
|
|
67
67
|
organisationPackagePrefix,
|
|
68
68
|
blackListedPackages,
|
|
69
|
-
}:
|
|
69
|
+
}: UpdateDependenciesVersionsProgramParams) {
|
|
70
70
|
super({
|
|
71
|
-
logger: NestLogger.fromClass(
|
|
71
|
+
logger: NestLogger.fromClass(UpdateDependenciesVersionsProgram),
|
|
72
72
|
arguments: [
|
|
73
73
|
{
|
|
74
74
|
name: 'targetedPackage',
|
|
@@ -83,7 +83,7 @@ export class UpdateDependenciesVersionsScript extends Script {
|
|
|
83
83
|
async execute({
|
|
84
84
|
logger,
|
|
85
85
|
arguments: { targetedPackage },
|
|
86
|
-
}:
|
|
86
|
+
}: ProgramExecutionOptions): Promise<void> {
|
|
87
87
|
const workspaceDependenciesMapElements: WorkspaceDependenciesMapElement[] =
|
|
88
88
|
Object.values(this.workspaceDependenciesMap).filter(
|
|
89
89
|
({ id }: WorkspaceDependenciesMapElement): boolean =>
|