@wocker/core 1.1.1 → 1.1.2-beta.1

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.
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.ApplicationContext = void 0;
13
4
  const cli_1 = require("@kearisp/cli");
@@ -31,58 +22,54 @@ class ApplicationContext {
31
22
  }
32
23
  return res;
33
24
  }
34
- run(args) {
35
- return __awaiter(this, void 0, void 0, function* () {
36
- return new Promise((resolve) => {
37
- AsyncStorage_1.AsyncStorage.run(this.container, () => {
38
- return resolve(this.process(args));
39
- });
25
+ async run(args) {
26
+ return new Promise((resolve) => {
27
+ AsyncStorage_1.AsyncStorage.run(this.container, () => {
28
+ return resolve(this.process(args));
40
29
  });
41
30
  });
42
31
  }
43
- process(args) {
44
- return __awaiter(this, void 0, void 0, function* () {
45
- const cli = this.get(cli_1.Cli), eventService = this.get(EventService_1.EventService);
46
- cli.command("")
47
- .option("version", {
48
- type: "boolean",
49
- alias: "v"
50
- })
51
- .action((input) => {
52
- if (input.option("version")) {
53
- return env_1.WOCKER_VERSION;
54
- }
55
- for (const [, module] of this.container.modules) {
56
- for (const [, container] of module.controllers) {
57
- if (!container.description) {
32
+ async process(args) {
33
+ const cli = this.get(cli_1.Cli), eventService = this.get(EventService_1.EventService);
34
+ cli.command("")
35
+ .option("version", {
36
+ type: "boolean",
37
+ alias: "v"
38
+ })
39
+ .action((input) => {
40
+ if (input.option("version")) {
41
+ return env_1.WOCKER_VERSION;
42
+ }
43
+ for (const [, module] of this.container.modules) {
44
+ for (const [, container] of module.controllers) {
45
+ if (!container.description) {
46
+ continue;
47
+ }
48
+ console.info(`${container.description}:`);
49
+ const spaceLength = container.commands.reduce((space, route) => {
50
+ return route.commandNames.reduce((space, command) => {
51
+ return Math.max(space, command.length + 2);
52
+ }, space);
53
+ }, 0);
54
+ for (const route of container.commands) {
55
+ if (!route.description) {
58
56
  continue;
59
57
  }
60
- console.info(`${container.description}:`);
61
- const spaceLength = container.commands.reduce((space, route) => {
62
- return route.commandNames.reduce((space, command) => {
63
- return Math.max(space, command.length + 2);
64
- }, space);
65
- }, 0);
66
- for (const route of container.commands) {
67
- if (!route.description) {
68
- continue;
69
- }
70
- for (const commandName of route.commandNames) {
71
- const space = " ".repeat(Math.max(0, spaceLength - commandName.length));
72
- console.info(` ${commandName} ${space} ${route.description}`);
73
- }
58
+ for (const commandName of route.commandNames) {
59
+ const space = " ".repeat(Math.max(0, spaceLength - commandName.length));
60
+ console.info(` ${commandName} ${space} ${route.description}`);
74
61
  }
75
- console.info("");
76
62
  }
63
+ console.info("");
77
64
  }
78
- });
79
- try {
80
- return yield cli.run(args);
81
- }
82
- finally {
83
- yield eventService.emit("finish");
84
65
  }
85
66
  });
67
+ try {
68
+ return await cli.run(args);
69
+ }
70
+ finally {
71
+ await eventService.emit("finish");
72
+ }
86
73
  }
87
74
  }
88
75
  exports.ApplicationContext = ApplicationContext;
@@ -1,25 +1,14 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.Factory = void 0;
13
4
  const ApplicationContext_1 = require("./ApplicationContext");
14
5
  const Container_1 = require("./Container");
15
6
  const Scanner_1 = require("./Scanner");
16
7
  class Factory {
17
- static create(module_1) {
18
- return __awaiter(this, arguments, void 0, function* (module, options = {}) {
19
- const container = new Container_1.Container(), scanner = new Scanner_1.Scanner(container, options);
20
- yield scanner.scan(module);
21
- return new ApplicationContext_1.ApplicationContext(module, container, options);
22
- });
8
+ static async create(module, options = {}) {
9
+ const container = new Container_1.Container(), scanner = new Scanner_1.Scanner(container, options);
10
+ await scanner.scan(module);
11
+ return new ApplicationContext_1.ApplicationContext(module, container, options);
23
12
  }
24
13
  }
25
14
  exports.Factory = Factory;
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
12
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
4
  };
@@ -33,13 +24,11 @@ class Scanner {
33
24
  useValue: fsDriver
34
25
  }));
35
26
  }
36
- scan(moduleDefinition) {
37
- return __awaiter(this, void 0, void 0, function* () {
38
- this.scanModule(CoreModule_1.CoreModule);
39
- this.scanModule(moduleDefinition);
40
- yield this.scanDynamicModules();
41
- this.scanRoutes();
42
- });
27
+ async scan(moduleDefinition) {
28
+ this.scanModule(CoreModule_1.CoreModule);
29
+ this.scanModule(moduleDefinition);
30
+ await this.scanDynamicModules();
31
+ this.scanRoutes();
43
32
  }
44
33
  getMetadata(moduleDefinition) {
45
34
  if (this.isDynamicModule(moduleDefinition)) {
@@ -165,25 +154,23 @@ class Scanner {
165
154
  }
166
155
  }
167
156
  }
168
- scanDynamicModules() {
169
- return __awaiter(this, void 0, void 0, function* () {
170
- const promises = ([...this.container.modules.keys()]).map((type) => __awaiter(this, void 0, void 0, function* () {
171
- const wrapper = this.container.modules.get(type);
172
- if (!wrapper) {
173
- return;
174
- }
175
- if (wrapper.factory) {
176
- const { imports = [], controllers = [], providers = [], exports = [] } = yield wrapper.factory(...(wrapper.factoryInject || []).map((token) => {
177
- return wrapper.get(token);
178
- }));
179
- this.scanImports(wrapper, imports);
180
- this.scanControllers(wrapper, controllers);
181
- this.scanProviders(wrapper, providers);
182
- this.scanExports(wrapper, exports);
183
- }
184
- }));
185
- yield Promise.all(promises);
157
+ async scanDynamicModules() {
158
+ const promises = ([...this.container.modules.keys()]).map(async (type) => {
159
+ const wrapper = this.container.modules.get(type);
160
+ if (!wrapper) {
161
+ return;
162
+ }
163
+ if (wrapper.factory) {
164
+ const { imports = [], controllers = [], providers = [], exports = [] } = await wrapper.factory(...(wrapper.factoryInject || []).map((token) => {
165
+ return wrapper.get(token);
166
+ }));
167
+ this.scanImports(wrapper, imports);
168
+ this.scanControllers(wrapper, controllers);
169
+ this.scanProviders(wrapper, providers);
170
+ this.scanExports(wrapper, exports);
171
+ }
186
172
  });
173
+ await Promise.all(promises);
187
174
  }
188
175
  isDynamicModule(moduleDefinition) {
189
176
  return moduleDefinition && !!moduleDefinition.module;
package/lib/env.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const WOCKER_VERSION = "1.1.0";
1
+ export declare const WOCKER_VERSION = "1.1.2";
2
2
  export declare const WOCKER_VERSION_KEY = "__WOCKER_VERSION__";
3
3
  export declare const WOCKER_DATA_DIR: string;
4
4
  export declare const WOCKER_DATA_DIR_KEY = "__WOCKER_DATA_DIR__";
package/lib/env.js CHANGED
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.MODULE_METADATA = exports.PLUGIN_NAME_METADATA = exports.INJECT_TOKEN_METADATA = exports.SELF_DECLARED_DEPS_METADATA = exports.PARAMTYPES_METADATA = exports.ALIAS_METADATA = exports.ARGS_OLD_METADATA = exports.ARGS_METADATA = exports.LISTENER_METADATA = exports.COMPLETION_METADATA = exports.COMMAND_METADATA = exports.DESCRIPTION_METADATA = exports.INJECTABLE_WATERMARK = exports.IS_MODULE_METADATA = exports.IS_GLOBAL_METADATA = exports.IS_CONTROLLER_METADATA = exports.PLUGIN_DIR_KEY = exports.FILE_SYSTEM_DRIVER_KEY = exports.WOCKER_DATA_DIR_KEY = exports.WOCKER_DATA_DIR = exports.WOCKER_VERSION_KEY = exports.WOCKER_VERSION = void 0;
7
7
  const os_1 = __importDefault(require("os"));
8
8
  const path_1 = __importDefault(require("path"));
9
- exports.WOCKER_VERSION = "1.1.0";
9
+ exports.WOCKER_VERSION = "1.1.2";
10
10
  exports.WOCKER_VERSION_KEY = "__WOCKER_VERSION__";
11
11
  exports.WOCKER_DATA_DIR = process.env.WS_DIR || path_1.default.join(os_1.default.homedir(), ".workspace");
12
12
  exports.WOCKER_DATA_DIR_KEY = "__WOCKER_DATA_DIR__";
@@ -87,11 +87,11 @@ class AppConfig {
87
87
  });
88
88
  }
89
89
  registerPreset(name, source, path) {
90
- if (source === types_1.PRESET_SOURCE_INTERNAL) {
90
+ if (source === types_1.PresetSource.INTERNAL) {
91
91
  return;
92
92
  }
93
93
  let presetData = this.presets.find((preset) => {
94
- if (source === types_1.PRESET_SOURCE_EXTERNAL && preset.path === path) {
94
+ if (source === types_1.PresetSource.EXTERNAL && preset.path === path) {
95
95
  return true;
96
96
  }
97
97
  return preset.name === name;
@@ -104,7 +104,7 @@ class AppConfig {
104
104
  this.presets.push(presetData);
105
105
  }
106
106
  presetData.source = source;
107
- if (presetData.source === types_1.PRESET_SOURCE_EXTERNAL) {
107
+ if (presetData.source === types_1.PresetSource.EXTERNAL) {
108
108
  presetData.path = path;
109
109
  }
110
110
  else if (presetData.path) {
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
12
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
4
  };
@@ -66,21 +57,19 @@ class FileSystem {
66
57
  /**
67
58
  * @deprecated
68
59
  */
69
- readdirFiles() {
70
- return __awaiter(this, arguments, void 0, function* (path = "", options) {
71
- const fullPath = this.path(path);
72
- return new Promise((resolve, reject) => {
73
- this.driver.readdir(fullPath, options, (err, files) => {
74
- if (err) {
75
- reject(err);
76
- return;
77
- }
78
- files = files.filter((path) => {
79
- const stat = this.stat(path);
80
- return stat.isFile();
81
- });
82
- resolve(files);
60
+ async readdirFiles(path = "", options) {
61
+ const fullPath = this.path(path);
62
+ return new Promise((resolve, reject) => {
63
+ this.driver.readdir(fullPath, options, (err, files) => {
64
+ if (err) {
65
+ reject(err);
66
+ return;
67
+ }
68
+ files = files.filter((path) => {
69
+ const stat = this.stat(path);
70
+ return stat.isFile();
83
71
  });
72
+ resolve(files);
84
73
  });
85
74
  });
86
75
  }
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
12
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
4
  };
@@ -31,11 +22,9 @@ class FileSystemManager {
31
22
  copy(path, options) {
32
23
  fs_1.default.cpSync(this.source.path(path), this.destination.path(path), options);
33
24
  }
34
- copyFile(path) {
35
- return __awaiter(this, void 0, void 0, function* () {
36
- const readStream = this.source.createReadStream(path), writeStream = this.destination.createWriteStream(path);
37
- yield (0, promises_1.pipeline)(readStream, writeStream);
38
- });
25
+ async copyFile(path) {
26
+ const readStream = this.source.createReadStream(path), writeStream = this.destination.createWriteStream(path);
27
+ await (0, promises_1.pipeline)(readStream, writeStream);
39
28
  }
40
29
  }
41
30
  exports.FileSystemManager = FileSystemManager;
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.Project = void 0;
13
4
  const AsyncStorage_1 = require("../core/AsyncStorage");
@@ -221,23 +212,17 @@ class Project {
221
212
  get services() {
222
213
  return this.configs.app.services;
223
214
  }
224
- getSecret(key, byDefault) {
225
- return __awaiter(this, void 0, void 0, function* () {
226
- const container = AsyncStorage_1.AsyncStorage.getContainer(), keystoreService = container.get("KEYSTORE_SERVICE");
227
- return keystoreService.get(`p:${this.name}:${key}`, byDefault);
228
- });
215
+ async getSecret(key, byDefault) {
216
+ const container = AsyncStorage_1.AsyncStorage.getContainer(), keystoreService = container.get("KEYSTORE_SERVICE");
217
+ return keystoreService.get(`p:${this.name}:${key}`, byDefault);
229
218
  }
230
- setSecret(key, value) {
231
- return __awaiter(this, void 0, void 0, function* () {
232
- const container = AsyncStorage_1.AsyncStorage.getContainer(), keystoreService = container.get("KEYSTORE_SERVICE");
233
- return keystoreService.set(`p:${this.name}:${key}`, value);
234
- });
219
+ async setSecret(key, value) {
220
+ const container = AsyncStorage_1.AsyncStorage.getContainer(), keystoreService = container.get("KEYSTORE_SERVICE");
221
+ return keystoreService.set(`p:${this.name}:${key}`, value);
235
222
  }
236
- unsetSecret(key) {
237
- return __awaiter(this, void 0, void 0, function* () {
238
- const container = AsyncStorage_1.AsyncStorage.getContainer(), keystoreService = container.get("KEYSTORE_SERVICE");
239
- return keystoreService.delete(`p:${this.name}:${key}`);
240
- });
223
+ async unsetSecret(key) {
224
+ const container = AsyncStorage_1.AsyncStorage.getContainer(), keystoreService = container.get("KEYSTORE_SERVICE");
225
+ return keystoreService.delete(`p:${this.name}:${key}`);
241
226
  }
242
227
  save() {
243
228
  const container = AsyncStorage_1.AsyncStorage.getContainer(), projectRepository = container.get(ProjectRepository_1.ProjectRepository);
@@ -11,15 +11,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  var __param = (this && this.__param) || function (paramIndex, decorator) {
12
12
  return function (target, key) { decorator(target, key, paramIndex); }
13
13
  };
14
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
- return new (P || (P = Promise))(function (resolve, reject) {
17
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
- step((generator = generator.apply(thisArg, _arguments || [])).next());
21
- });
22
- };
23
14
  Object.defineProperty(exports, "__esModule", { value: true });
24
15
  exports.PluginConfigService = void 0;
25
16
  const AppConfigService_1 = require("../../../services/AppConfigService");
@@ -64,10 +55,8 @@ let PluginConfigService = class PluginConfigService {
64
55
  this.fs.mkdir(path, options);
65
56
  }
66
57
  /** @deprecated */
67
- writeFile(path, data, options) {
68
- return __awaiter(this, void 0, void 0, function* () {
69
- this.fs.writeFile(path, data, options);
70
- });
58
+ async writeFile(path, data, options) {
59
+ this.fs.writeFile(path, data, options);
71
60
  }
72
61
  /** @deprecated */
73
62
  writeJSON(path, data, options) {
@@ -82,16 +71,12 @@ let PluginConfigService = class PluginConfigService {
82
71
  return this.fs.exists(path);
83
72
  }
84
73
  /** @deprecated */
85
- rm(path, options) {
86
- return __awaiter(this, void 0, void 0, function* () {
87
- this.fs.rm(path, options);
88
- });
74
+ async rm(path, options) {
75
+ this.fs.rm(path, options);
89
76
  }
90
77
  /** @deprecated */
91
- readdir(path) {
92
- return __awaiter(this, void 0, void 0, function* () {
93
- return this.fs.readdir(path);
94
- });
78
+ async readdir(path) {
79
+ return this.fs.readdir(path);
95
80
  }
96
81
  /** @deprecated */
97
82
  createWriteSteam(path) {
@@ -8,15 +8,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
8
  var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
13
- return new (P || (P = Promise))(function (resolve, reject) {
14
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
15
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
16
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
17
- step((generator = generator.apply(thisArg, _arguments || [])).next());
18
- });
19
- };
20
11
  Object.defineProperty(exports, "__esModule", { value: true });
21
12
  exports.EventService = void 0;
22
13
  const decorators_1 = require("../decorators");
@@ -79,16 +70,14 @@ let EventService = class EventService {
79
70
  }
80
71
  this.handles[event].delete(handle);
81
72
  }
82
- emit(event, ...args) {
83
- return __awaiter(this, void 0, void 0, function* () {
84
- this.scanListeners();
85
- if (!this.handles[event]) {
86
- return;
87
- }
88
- for (const handle of this.handles[event].values()) {
89
- yield handle(...args);
90
- }
91
- });
73
+ async emit(event, ...args) {
74
+ this.scanListeners();
75
+ if (!this.handles[event]) {
76
+ return;
77
+ }
78
+ for (const handle of this.handles[event].values()) {
79
+ await handle(...args);
80
+ }
92
81
  }
93
82
  };
94
83
  exports.EventService = EventService;
@@ -7,6 +7,8 @@ export declare class ProcessService {
7
7
  get stdin(): NodeJS.ReadStream;
8
8
  get stdout(): NodeJS.WriteStream;
9
9
  get stderr(): NodeJS.WriteStream;
10
+ get exitCode(): number | string | undefined | null;
11
+ set exitCode(exitCode: number | string | undefined | null);
10
12
  pwd(path?: string): string;
11
13
  cd(path: string): void;
12
14
  chdir(path: string): void;
@@ -39,7 +39,13 @@ let ProcessService = class ProcessService {
39
39
  return process.stdout;
40
40
  }
41
41
  get stderr() {
42
- return process.stdout;
42
+ return process.stderr;
43
+ }
44
+ get exitCode() {
45
+ return process.exitCode;
46
+ }
47
+ set exitCode(exitCode) {
48
+ process.exitCode = exitCode;
43
49
  }
44
50
  pwd(path = "") {
45
51
  return path_1.default.join(process.cwd(), path);
@@ -1,4 +1,10 @@
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;
1
+ declare enum PresetSourceEnum {
2
+ INTERNAL = "internal",
3
+ EXTERNAL = "external",
4
+ GITHUB = "github"
5
+ }
6
+ export type PresetSource = PresetSourceEnum;
7
+ export declare const PresetSource: typeof PresetSourceEnum & {
8
+ values: () => PresetSourceEnum[];
9
+ };
10
+ export {};
@@ -1,6 +1,12 @@
1
1
  "use strict";
2
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";
3
+ exports.PresetSource = void 0;
4
+ var PresetSourceEnum;
5
+ (function (PresetSourceEnum) {
6
+ PresetSourceEnum["INTERNAL"] = "internal";
7
+ PresetSourceEnum["EXTERNAL"] = "external";
8
+ PresetSourceEnum["GITHUB"] = "github";
9
+ })(PresetSourceEnum || (PresetSourceEnum = {}));
10
+ exports.PresetSource = Object.assign({}, PresetSourceEnum, {
11
+ values: () => Object.values(PresetSourceEnum)
12
+ });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wocker/core",
3
3
  "type": "commonjs",
4
- "version": "1.1.1",
4
+ "version": "1.1.2-beta.1",
5
5
  "author": "Kris Papercut <krispcut@gmail.com>",
6
6
  "description": "Core of the Wocker",
7
7
  "license": "MIT",