@wocker/core 1.0.31-beta.0 → 1.0.32-beta.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/lib/env.d.ts +1 -1
- package/lib/env.js +1 -1
- package/lib/makes/FileSystem.d.ts +3 -1
- package/lib/makes/FileSystem.js +8 -0
- package/lib/modules/project/repositories/ProjectRepository.d.ts +8 -6
- package/lib/modules/project/services/ProjectService.d.ts +3 -3
- package/lib/types/FileSystemDriver.d.ts +3 -1
- package/package.json +1 -1
package/lib/env.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const WOCKER_VERSION = "1.0.
|
|
1
|
+
export declare const WOCKER_VERSION = "1.0.32";
|
|
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.0.
|
|
9
|
+
exports.WOCKER_VERSION = "1.0.32";
|
|
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__";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import FS, { EncodingOption, BufferEncodingOption } from "fs";
|
|
1
|
+
import FS, { EncodingOption, BufferEncodingOption, Mode } from "fs";
|
|
2
2
|
import { Readable } from "stream";
|
|
3
3
|
import { FileSystemDriver, ReadStreamOptions, WriteStreamOptions } from "../types";
|
|
4
4
|
import { File } from "./File";
|
|
@@ -45,5 +45,7 @@ export declare class FileSystem {
|
|
|
45
45
|
watch(path: string, options?: FS.WatchOptionsWithStringEncoding): FS.FSWatcher;
|
|
46
46
|
readlink(path: string, options?: EncodingOption): string;
|
|
47
47
|
readlink(path: string, options: BufferEncodingOption): Buffer<ArrayBuffer>;
|
|
48
|
+
chmod(path: string, mode: Mode): void;
|
|
49
|
+
chown(path: string, uid: number, gid: number): void;
|
|
48
50
|
}
|
|
49
51
|
export {};
|
package/lib/makes/FileSystem.js
CHANGED
|
@@ -183,5 +183,13 @@ class FileSystem {
|
|
|
183
183
|
}
|
|
184
184
|
return link;
|
|
185
185
|
}
|
|
186
|
+
chmod(path, mode) {
|
|
187
|
+
const fullPath = this.path(path);
|
|
188
|
+
this.driver.chmodSync(fullPath, mode);
|
|
189
|
+
}
|
|
190
|
+
chown(path, uid, gid) {
|
|
191
|
+
const fullPath = this.path(path);
|
|
192
|
+
this.driver.chownSync(fullPath, uid, gid);
|
|
193
|
+
}
|
|
186
194
|
}
|
|
187
195
|
exports.FileSystem = FileSystem;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { Project } from "../makes/Project";
|
|
2
|
-
export type ProjectRepositorySearchParams = Partial<{
|
|
3
|
-
name: string;
|
|
4
|
-
path: string;
|
|
5
|
-
}>;
|
|
6
2
|
export declare abstract class ProjectRepository {
|
|
7
3
|
abstract getByName(name: string): Project;
|
|
8
4
|
abstract save(project: Project): void;
|
|
9
|
-
abstract search(params:
|
|
10
|
-
abstract searchOne(params:
|
|
5
|
+
abstract search(params: ProjectRepository.SearchParams): Project[];
|
|
6
|
+
abstract searchOne(params: ProjectRepository.SearchParams): Project;
|
|
7
|
+
}
|
|
8
|
+
export declare namespace ProjectRepository {
|
|
9
|
+
type SearchParams = Partial<{
|
|
10
|
+
name: string;
|
|
11
|
+
path: string;
|
|
12
|
+
}>;
|
|
11
13
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Project } from "../makes/Project";
|
|
2
|
-
import {
|
|
2
|
+
import { ProjectRepository } from "../repositories/ProjectRepository";
|
|
3
3
|
export declare abstract class ProjectService {
|
|
4
4
|
abstract get(name?: string): Project;
|
|
5
5
|
abstract save(project: Project): void;
|
|
6
6
|
abstract start(project: Project): Promise<void>;
|
|
7
7
|
abstract stop(project: Project): Promise<void>;
|
|
8
|
-
abstract search(params:
|
|
9
|
-
searchOne(params?:
|
|
8
|
+
abstract search(params: ProjectRepository.SearchParams): Project[];
|
|
9
|
+
searchOne(params?: ProjectRepository.SearchParams): Project | null;
|
|
10
10
|
/**
|
|
11
11
|
* @deprecated
|
|
12
12
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import FS, { type Dirent, type EncodingOption, type BufferEncodingOption } from "fs";
|
|
1
|
+
import FS, { type Dirent, type EncodingOption, type BufferEncodingOption, type Mode } from "fs";
|
|
2
2
|
type StreamOptions = {
|
|
3
3
|
flags?: string;
|
|
4
4
|
fd?: number;
|
|
@@ -37,5 +37,7 @@ export interface FileSystemDriver {
|
|
|
37
37
|
cpSync(source: string, destination: string, opts?: FS.CopySyncOptions): void;
|
|
38
38
|
renameSync(oldPath: string, newPath: string): void;
|
|
39
39
|
readlinkSync(path: string, options?: EncodingOption | BufferEncodingOption): string | Buffer<ArrayBuffer>;
|
|
40
|
+
chmodSync(path: string, mode: Mode): void;
|
|
41
|
+
chownSync(path: string, uid: number, gid: number): void;
|
|
40
42
|
}
|
|
41
43
|
export {};
|