@nu-art/build-and-install 0.204.32 → 0.204.33
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/package.json +1 -1
- package/v2/ProjectManagerV2.d.ts +1 -0
- package/v2/test/test.d.ts +17 -0
- package/v2/test/test.js +28 -1
package/package.json
CHANGED
package/v2/ProjectManagerV2.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export type PhasesImplementor<Phases extends Phase<string>[]> = {
|
|
|
5
5
|
export type Phase<PhaseMethod extends string> = {
|
|
6
6
|
name?: string;
|
|
7
7
|
method: PhaseMethod;
|
|
8
|
+
filter?: () => Promise<boolean>;
|
|
8
9
|
};
|
|
9
10
|
export declare class ProjectManagerV2<Phases extends Phase<string>[]> {
|
|
10
11
|
private manageables;
|
package/v2/test/test.d.ts
CHANGED
|
@@ -1 +1,18 @@
|
|
|
1
|
+
import { Phase } from '../ProjectManagerV2';
|
|
2
|
+
import { BasePackage } from '../BasePackage';
|
|
3
|
+
import { AsyncVoidFunction } from '@nu-art/ts-common';
|
|
4
|
+
declare const Phase_I: Phase<'install'>;
|
|
5
|
+
declare const Phase_C: Phase<'copyPackageJson'>;
|
|
6
|
+
type PhaseImplementor<P extends Phase<string>> = {
|
|
7
|
+
[K in P['method']]: AsyncVoidFunction;
|
|
8
|
+
};
|
|
9
|
+
export declare abstract class Package_Python extends BasePackage implements PhaseImplementor<typeof Phase_I> {
|
|
10
|
+
install(): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
declare abstract class Package_Typescript extends BasePackage implements PhaseImplementor<typeof Phase_C> {
|
|
13
|
+
copyPackageJson(): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
export declare class Package_Root extends Package_Typescript {
|
|
16
|
+
constructor(name: string);
|
|
17
|
+
}
|
|
1
18
|
export {};
|
package/v2/test/test.js
CHANGED
|
@@ -1,10 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Package_Root = exports.Package_Python = void 0;
|
|
3
4
|
const ProjectManagerV2_1 = require("../ProjectManagerV2");
|
|
4
5
|
const BasePackage_1 = require("../BasePackage");
|
|
6
|
+
const params_1 = require("../../core/params/params");
|
|
7
|
+
const cli_1 = require("@nu-art/commando/core/cli");
|
|
5
8
|
const Phase_A = {
|
|
6
9
|
name: 'Compile',
|
|
7
|
-
method: 'compile'
|
|
10
|
+
method: 'compile',
|
|
11
|
+
filter: async () => !params_1.RuntimeParams.noBuild
|
|
12
|
+
};
|
|
13
|
+
const Phase_I = {
|
|
14
|
+
name: 'Compile',
|
|
15
|
+
method: 'install',
|
|
16
|
+
filter: async () => !params_1.RuntimeParams.install
|
|
17
|
+
};
|
|
18
|
+
const Phase_C = {
|
|
19
|
+
name: 'Copy Package Json',
|
|
20
|
+
method: 'copyPackageJson',
|
|
8
21
|
};
|
|
9
22
|
const Phase_B = {
|
|
10
23
|
name: 'Launch',
|
|
@@ -14,8 +27,22 @@ const AllPhases = [
|
|
|
14
27
|
Phase_A,
|
|
15
28
|
Phase_B,
|
|
16
29
|
];
|
|
30
|
+
class Package_Python extends BasePackage_1.BasePackage {
|
|
31
|
+
async install() {
|
|
32
|
+
await cli_1.Commando.create().append('pip install -r requirements.txt').execute();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.Package_Python = Package_Python;
|
|
17
36
|
class Package_Typescript extends BasePackage_1.BasePackage {
|
|
37
|
+
async copyPackageJson() {
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
class Package_Root extends Package_Typescript {
|
|
41
|
+
constructor(name) {
|
|
42
|
+
super(name);
|
|
43
|
+
}
|
|
18
44
|
}
|
|
45
|
+
exports.Package_Root = Package_Root;
|
|
19
46
|
class Package_Lib extends Package_Typescript {
|
|
20
47
|
constructor(name) {
|
|
21
48
|
super(name);
|