@wocker/core 1.0.26-beta.2 → 1.0.26-beta.3
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/lib/makes/AppConfig.d.ts +1 -1
- package/lib/makes/AppConfig.js +4 -4
- package/lib/makes/Preset.d.ts +1 -4
- package/lib/makes/Preset.js +1 -4
- package/lib/services/AppConfigService.d.ts +3 -1
- package/lib/services/AppConfigService.js +3 -0
- package/lib/types/PresetRef.d.ts +1 -1
- package/lib/types/PresetSource.d.ts +4 -0
- package/lib/types/PresetSource.js +6 -0
- package/lib/types/index.d.ts +2 -0
- package/lib/types/index.js +2 -0
- package/package.json +1 -1
package/lib/makes/AppConfig.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { EnvConfig, PackageManagerType } from "../types";
|
|
|
2
2
|
import { PluginRef } from "../types/PluginRef";
|
|
3
3
|
import { PresetRef } from "../types/PresetRef";
|
|
4
4
|
import { ProjectRef, ProjectOldRef } from "../types/ProjectRef";
|
|
5
|
-
import { PresetSource } from "
|
|
5
|
+
import { PresetSource } from "../types/PresetSource";
|
|
6
6
|
export type AppConfigProperties = {
|
|
7
7
|
debug?: boolean;
|
|
8
8
|
pm?: PackageManagerType;
|
package/lib/makes/AppConfig.js
CHANGED
|
@@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.AppConfig = void 0;
|
|
15
|
-
const
|
|
15
|
+
const PresetSource_1 = require("../types/PresetSource");
|
|
16
16
|
class AppConfig {
|
|
17
17
|
constructor(data) {
|
|
18
18
|
this.logLevel = "off";
|
|
@@ -83,11 +83,11 @@ class AppConfig {
|
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
registerPreset(name, source, path) {
|
|
86
|
-
if (source ===
|
|
86
|
+
if (source === PresetSource_1.PRESET_SOURCE_INTERNAL) {
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
89
89
|
let presetData = this.presets.find((preset) => {
|
|
90
|
-
if (source ===
|
|
90
|
+
if (source === PresetSource_1.PRESET_SOURCE_EXTERNAL && preset.path === path) {
|
|
91
91
|
return true;
|
|
92
92
|
}
|
|
93
93
|
return preset.name === name;
|
|
@@ -100,7 +100,7 @@ class AppConfig {
|
|
|
100
100
|
this.presets.push(presetData);
|
|
101
101
|
}
|
|
102
102
|
presetData.source = source;
|
|
103
|
-
if (presetData.source ===
|
|
103
|
+
if (presetData.source === PresetSource_1.PRESET_SOURCE_EXTERNAL) {
|
|
104
104
|
presetData.path = path;
|
|
105
105
|
}
|
|
106
106
|
else if (presetData.path) {
|
package/lib/makes/Preset.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PickProperties } from "../types/PickProperties";
|
|
2
|
+
import { PresetSource } from "../types/PresetSource";
|
|
2
3
|
type TextOption = {
|
|
3
4
|
type: "text" | "string" | "number" | "int" | "password";
|
|
4
5
|
message?: string;
|
|
@@ -50,8 +51,4 @@ export declare abstract class Preset {
|
|
|
50
51
|
toJSON(): PresetProperties;
|
|
51
52
|
toObject(): PresetProperties;
|
|
52
53
|
}
|
|
53
|
-
export declare const PRESET_SOURCE_INTERNAL: "internal";
|
|
54
|
-
export declare const PRESET_SOURCE_EXTERNAL: "external";
|
|
55
|
-
export declare const PRESET_SOURCE_GITHUB: "github";
|
|
56
|
-
export type PresetSource = typeof PRESET_SOURCE_INTERNAL | typeof PRESET_SOURCE_EXTERNAL | typeof PRESET_SOURCE_GITHUB;
|
|
57
54
|
export {};
|
package/lib/makes/Preset.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Preset = void 0;
|
|
4
4
|
class Preset {
|
|
5
5
|
constructor(data) {
|
|
6
6
|
this.name = data.name;
|
|
@@ -36,6 +36,3 @@ class Preset {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
exports.Preset = Preset;
|
|
39
|
-
exports.PRESET_SOURCE_INTERNAL = "internal";
|
|
40
|
-
exports.PRESET_SOURCE_EXTERNAL = "external";
|
|
41
|
-
exports.PRESET_SOURCE_GITHUB = "github";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { AppConfig } from "../makes/AppConfig";
|
|
2
|
-
import {
|
|
2
|
+
import { PresetRef } from "../types/PresetRef";
|
|
3
3
|
import { ProjectRef } from "../types/ProjectRef";
|
|
4
4
|
import { PluginRef } from "../types/PluginRef";
|
|
5
|
+
import { PresetSource } from "../types/PresetSource";
|
|
5
6
|
import { AppFileSystemService } from "./AppFileSystemService";
|
|
6
7
|
import { ProcessService } from "./ProcessService";
|
|
7
8
|
type TypeMap = {
|
|
@@ -19,6 +20,7 @@ export declare class AppConfigService {
|
|
|
19
20
|
get debug(): boolean;
|
|
20
21
|
set debug(debug: boolean);
|
|
21
22
|
get config(): AppConfig;
|
|
23
|
+
get presets(): PresetRef[];
|
|
22
24
|
get projects(): ProjectRef[];
|
|
23
25
|
get plugins(): PluginRef[];
|
|
24
26
|
/**
|
package/lib/types/PresetRef.d.ts
CHANGED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const PRESET_SOURCE_INTERNAL: "internal";
|
|
2
|
+
export declare const PRESET_SOURCE_EXTERNAL: "external";
|
|
3
|
+
export declare const PRESET_SOURCE_GITHUB: "github";
|
|
4
|
+
export type PresetSource = typeof PRESET_SOURCE_INTERNAL | typeof PRESET_SOURCE_EXTERNAL | typeof PRESET_SOURCE_GITHUB;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PRESET_SOURCE_GITHUB = exports.PRESET_SOURCE_EXTERNAL = exports.PRESET_SOURCE_INTERNAL = void 0;
|
|
4
|
+
exports.PRESET_SOURCE_INTERNAL = "internal";
|
|
5
|
+
exports.PRESET_SOURCE_EXTERNAL = "external";
|
|
6
|
+
exports.PRESET_SOURCE_GITHUB = "github";
|
package/lib/types/index.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export * from "./ModuleMetadata";
|
|
|
6
6
|
export * from "./PackageManagerType";
|
|
7
7
|
export * from "./PickProperties";
|
|
8
8
|
export * from "./PluginMetadata";
|
|
9
|
+
export * from "./PresetRef";
|
|
10
|
+
export * from "./PresetSource";
|
|
9
11
|
export * from "./Type";
|
|
10
12
|
export * from "./Volume";
|
|
11
13
|
export * from "./ProviderType";
|
package/lib/types/index.js
CHANGED
|
@@ -22,6 +22,8 @@ __exportStar(require("./ModuleMetadata"), exports);
|
|
|
22
22
|
__exportStar(require("./PackageManagerType"), exports);
|
|
23
23
|
__exportStar(require("./PickProperties"), exports);
|
|
24
24
|
__exportStar(require("./PluginMetadata"), exports);
|
|
25
|
+
__exportStar(require("./PresetRef"), exports);
|
|
26
|
+
__exportStar(require("./PresetSource"), exports);
|
|
25
27
|
__exportStar(require("./Type"), exports);
|
|
26
28
|
__exportStar(require("./Volume"), exports);
|
|
27
29
|
__exportStar(require("./ProviderType"), exports);
|