fullstacked 0.12.0-1173 → 0.12.0-1175

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,208 +1,208 @@
1
- declare module "fs" {
2
- export type FileInfo = {
3
- name: string;
4
- isDirectory: boolean;
5
- };
6
- export type FileStats = {
7
- name: string;
8
- size: number;
9
- modTime: number;
10
- isDirectory: boolean;
11
- };
12
-
13
- export function readFile(path: string): Promise<Uint8Array>;
14
- export function readFile(
15
- path: string,
16
- options: {
17
- encoding: "utf8";
18
- }
19
- ): Promise<string>;
20
- export function writeFile(
21
- path: string,
22
- data: string | Uint8Array
23
- ): Promise<boolean>;
24
- export function unlink(path: string): Promise<boolean>;
25
- export function readdir(
26
- path: string,
27
- options?: {
28
- recursive?: boolean;
29
- withFileTypes?: false;
30
- }
31
- ): Promise<string[]>;
32
- export function readdir(
33
- path: string,
34
- options?: {
35
- recursive?: boolean;
36
- withFileTypes: true;
37
- }
38
- ): Promise<FileInfo[]>;
39
- export function mkdir(path: string): Promise<boolean>;
40
- export function rmdir(path: string): Promise<boolean>;
41
- export function exists(path: string): Promise<{
42
- isFile: boolean;
43
- }>;
44
- export function rename(oldPath: string, newPath: string): Promise<boolean>;
45
- export function stat(path: string): Promise<FileStats>;
46
-
47
- var fs: {
48
- readFile(path: string): Promise<Uint8Array>;
49
- readFile(
50
- path: string,
51
- options: {
52
- encoding: "utf8";
53
- }
54
- ): Promise<string>;
55
- writeFile(path: string, data: string | Uint8Array): Promise<boolean>;
56
- unlink(path: string): Promise<boolean>;
57
- readdir(
58
- path: string,
59
- options?: {
60
- recursive?: boolean;
61
- withFileTypes?: false;
62
- }
63
- ): Promise<string[]>;
64
- readdir(
65
- path: string,
66
- options?: {
67
- recursive?: boolean;
68
- withFileTypes: true;
69
- }
70
- ): Promise<FileInfo[]>;
71
- mkdir(path: string): Promise<boolean>;
72
- rmdir(path: string): Promise<boolean>;
73
- exists(path: string): Promise<{
74
- isFile: boolean;
75
- }>;
76
- rename(oldPath: string, newPath: string): Promise<boolean>;
77
- stat(path: string): Promise<FileStats>;
78
- };
79
- export default fs;
80
- }
81
-
82
- type FetchOptions = {
83
- method: "GET" | "POST" | "PUT" | "DELETE";
84
- headers: Record<string, string>;
85
- body: string | Uint8Array;
86
- timeout: number;
87
- stream: boolean;
88
- };
89
-
90
- type FetchResponse = {
91
- statusCode: number;
92
- statusMessage: string;
93
- headers: Record<string, string>;
94
- };
95
-
96
- declare module "fetch" {
97
- export default function core_fetch(
98
- url: string,
99
- options?: Partial<FetchOptions>
100
- ): Promise<FetchResponse & { body: Uint8Array }>;
101
- export default function core_fetch(
102
- url: string,
103
- options?: Partial<FetchOptions> & { encoding: "utf8" }
104
- ): Promise<FetchResponse & { body: string }>;
105
-
106
- export function core_fetch2(request: Request): Promise<Response>;
107
- export function core_fetch2(
108
- url: string | URL,
109
- options?: RequestInit
110
- ): Promise<Response>;
111
- }
112
-
113
- declare module "platform" {
114
- export enum Platform {
115
- NODE = "node",
116
- APPLE = "apple",
117
- ANDROID = "android",
118
- DOCKER = "docker",
119
- WINDOWS = "windows",
120
- WASM = "wasm"
121
- }
122
-
123
- const platform: Platform;
124
- export default platform;
125
- }
126
-
127
- declare module "archive" {
128
- type FileEntries<T extends string | Uint8Array> = {
129
- [filePath: string]: {
130
- isDir: boolean;
131
- contents: T;
132
- };
133
- };
134
-
135
- export function unzip(
136
- entry: string | Uint8Array
137
- ): Promise<FileEntries<Uint8Array>>;
138
- export function unzip(
139
- entry: string | Uint8Array,
140
- out: string
141
- ): Promise<boolean>;
142
-
143
- export function zip(
144
- entry: FileEntries<string | Uint8Array>
145
- ): Promise<Uint8Array>;
146
- export function zip(entry: string): Promise<Uint8Array>;
147
- export function zip(
148
- entry: string,
149
- out: null | undefined,
150
- skip: string[]
151
- ): Promise<Uint8Array>;
152
- export function zip(
153
- entry: FileEntries<string | Uint8Array> | string,
154
- out: string,
155
- skip?: string[]
156
- ): Promise<boolean>;
157
-
158
- var archive: {
159
- unzip(entry: string | Uint8Array): Promise<FileEntries<Uint8Array>>;
160
- unzip(entry: string | Uint8Array, out: string): Promise<boolean>;
161
- zip(entry: FileEntries<string | Uint8Array>): Promise<Uint8Array>;
162
- zip(entry: string): Promise<Uint8Array>;
163
- zip(
164
- entry: string,
165
- out: null | undefined,
166
- skip: string[]
167
- ): Promise<Uint8Array>;
168
- zip(
169
- entry: FileEntries<string | Uint8Array> | string,
170
- out: string,
171
- skip?: string[]
172
- ): Promise<boolean>;
173
- };
174
- export default archive;
175
- }
176
-
177
- declare module "connect" {
178
- export type Data = string | number | boolean | Uint8Array;
179
-
180
- type DataChannelCallback = (data: Data[]) => void;
181
-
182
- type DataChannel = {
183
- send(...args: Data[]): void;
184
- on(callback: DataChannelCallback): void;
185
- off(callback: DataChannelCallback): void;
186
- };
187
-
188
- type DataChannelRawCallback = (data: Uint8Array) => void;
189
-
190
- type DataChannelRaw = {
191
- send(buffer: Uint8Array): void;
192
- on(callback: DataChannelRawCallback): void;
193
- off(callback: DataChannelRawCallback): void;
194
- };
195
-
196
- export function connect(
197
- name: string,
198
- port: number,
199
- host: string,
200
- stream: true
201
- ): Promise<DataChannelRaw>;
202
- export function connect(
203
- name: string,
204
- port: number,
205
- host?: string,
206
- stream?: boolean
207
- ): Promise<DataChannel>;
208
- }
1
+ declare module "fs" {
2
+ export type FileInfo = {
3
+ name: string;
4
+ isDirectory: boolean;
5
+ };
6
+ export type FileStats = {
7
+ name: string;
8
+ size: number;
9
+ modTime: number;
10
+ isDirectory: boolean;
11
+ };
12
+
13
+ export function readFile(path: string): Promise<Uint8Array>;
14
+ export function readFile(
15
+ path: string,
16
+ options: {
17
+ encoding: "utf8";
18
+ }
19
+ ): Promise<string>;
20
+ export function writeFile(
21
+ path: string,
22
+ data: string | Uint8Array
23
+ ): Promise<boolean>;
24
+ export function unlink(path: string): Promise<boolean>;
25
+ export function readdir(
26
+ path: string,
27
+ options?: {
28
+ recursive?: boolean;
29
+ withFileTypes?: false;
30
+ }
31
+ ): Promise<string[]>;
32
+ export function readdir(
33
+ path: string,
34
+ options?: {
35
+ recursive?: boolean;
36
+ withFileTypes: true;
37
+ }
38
+ ): Promise<FileInfo[]>;
39
+ export function mkdir(path: string): Promise<boolean>;
40
+ export function rmdir(path: string): Promise<boolean>;
41
+ export function exists(path: string): Promise<{
42
+ isFile: boolean;
43
+ }>;
44
+ export function rename(oldPath: string, newPath: string): Promise<boolean>;
45
+ export function stat(path: string): Promise<FileStats>;
46
+
47
+ var fs: {
48
+ readFile(path: string): Promise<Uint8Array>;
49
+ readFile(
50
+ path: string,
51
+ options: {
52
+ encoding: "utf8";
53
+ }
54
+ ): Promise<string>;
55
+ writeFile(path: string, data: string | Uint8Array): Promise<boolean>;
56
+ unlink(path: string): Promise<boolean>;
57
+ readdir(
58
+ path: string,
59
+ options?: {
60
+ recursive?: boolean;
61
+ withFileTypes?: false;
62
+ }
63
+ ): Promise<string[]>;
64
+ readdir(
65
+ path: string,
66
+ options?: {
67
+ recursive?: boolean;
68
+ withFileTypes: true;
69
+ }
70
+ ): Promise<FileInfo[]>;
71
+ mkdir(path: string): Promise<boolean>;
72
+ rmdir(path: string): Promise<boolean>;
73
+ exists(path: string): Promise<{
74
+ isFile: boolean;
75
+ }>;
76
+ rename(oldPath: string, newPath: string): Promise<boolean>;
77
+ stat(path: string): Promise<FileStats>;
78
+ };
79
+ export default fs;
80
+ }
81
+
82
+ type FetchOptions = {
83
+ method: "GET" | "POST" | "PUT" | "DELETE";
84
+ headers: Record<string, string>;
85
+ body: string | Uint8Array;
86
+ timeout: number;
87
+ stream: boolean;
88
+ };
89
+
90
+ type FetchResponse = {
91
+ statusCode: number;
92
+ statusMessage: string;
93
+ headers: Record<string, string>;
94
+ };
95
+
96
+ declare module "fetch" {
97
+ export default function core_fetch(
98
+ url: string,
99
+ options?: Partial<FetchOptions>
100
+ ): Promise<FetchResponse & { body: Uint8Array }>;
101
+ export default function core_fetch(
102
+ url: string,
103
+ options?: Partial<FetchOptions> & { encoding: "utf8" }
104
+ ): Promise<FetchResponse & { body: string }>;
105
+
106
+ export function core_fetch2(request: Request): Promise<Response>;
107
+ export function core_fetch2(
108
+ url: string | URL,
109
+ options?: RequestInit
110
+ ): Promise<Response>;
111
+ }
112
+
113
+ declare module "platform" {
114
+ export enum Platform {
115
+ NODE = "node",
116
+ APPLE = "apple",
117
+ ANDROID = "android",
118
+ DOCKER = "docker",
119
+ WINDOWS = "windows",
120
+ WASM = "wasm"
121
+ }
122
+
123
+ const platform: Platform;
124
+ export default platform;
125
+ }
126
+
127
+ declare module "archive" {
128
+ type FileEntries<T extends string | Uint8Array> = {
129
+ [filePath: string]: {
130
+ isDir: boolean;
131
+ contents: T;
132
+ };
133
+ };
134
+
135
+ export function unzip(
136
+ entry: string | Uint8Array
137
+ ): Promise<FileEntries<Uint8Array>>;
138
+ export function unzip(
139
+ entry: string | Uint8Array,
140
+ out: string
141
+ ): Promise<boolean>;
142
+
143
+ export function zip(
144
+ entry: FileEntries<string | Uint8Array>
145
+ ): Promise<Uint8Array>;
146
+ export function zip(entry: string): Promise<Uint8Array>;
147
+ export function zip(
148
+ entry: string,
149
+ out: null | undefined,
150
+ skip: string[]
151
+ ): Promise<Uint8Array>;
152
+ export function zip(
153
+ entry: FileEntries<string | Uint8Array> | string,
154
+ out: string,
155
+ skip?: string[]
156
+ ): Promise<boolean>;
157
+
158
+ var archive: {
159
+ unzip(entry: string | Uint8Array): Promise<FileEntries<Uint8Array>>;
160
+ unzip(entry: string | Uint8Array, out: string): Promise<boolean>;
161
+ zip(entry: FileEntries<string | Uint8Array>): Promise<Uint8Array>;
162
+ zip(entry: string): Promise<Uint8Array>;
163
+ zip(
164
+ entry: string,
165
+ out: null | undefined,
166
+ skip: string[]
167
+ ): Promise<Uint8Array>;
168
+ zip(
169
+ entry: FileEntries<string | Uint8Array> | string,
170
+ out: string,
171
+ skip?: string[]
172
+ ): Promise<boolean>;
173
+ };
174
+ export default archive;
175
+ }
176
+
177
+ declare module "connect" {
178
+ export type Data = string | number | boolean | Uint8Array;
179
+
180
+ type DataChannelCallback = (data: Data[]) => void;
181
+
182
+ type DataChannel = {
183
+ send(...args: Data[]): void;
184
+ on(callback: DataChannelCallback): void;
185
+ off(callback: DataChannelCallback): void;
186
+ };
187
+
188
+ type DataChannelRawCallback = (data: Uint8Array) => void;
189
+
190
+ type DataChannelRaw = {
191
+ send(buffer: Uint8Array): void;
192
+ on(callback: DataChannelRawCallback): void;
193
+ off(callback: DataChannelRawCallback): void;
194
+ };
195
+
196
+ export function connect(
197
+ name: string,
198
+ port: number,
199
+ host: string,
200
+ stream: true
201
+ ): Promise<DataChannelRaw>;
202
+ export function connect(
203
+ name: string,
204
+ port: number,
205
+ host?: string,
206
+ stream?: boolean
207
+ ): Promise<DataChannel>;
208
+ }
@@ -1,14 +1,14 @@
1
- export enum Platform {
2
- NODE = "node",
3
- APPLE = "apple",
4
- ANDROID = "android",
5
- DOCKER = "docker",
6
- WINDOWS = "windows",
7
- WASM = "wasm",
8
- LINUX_GTK = "linux-gtk",
9
- LINUX_QT = "linux-qt",
10
- ELECTRON = "electron"
11
- }
12
-
13
- const platform = await (await fetch("/platform")).text();
14
- export default platform;
1
+ export enum Platform {
2
+ NODE = "node",
3
+ APPLE = "apple",
4
+ ANDROID = "android",
5
+ DOCKER = "docker",
6
+ WINDOWS = "windows",
7
+ WASM = "wasm",
8
+ LINUX_GTK = "linux-gtk",
9
+ LINUX_QT = "linux-qt",
10
+ ELECTRON = "electron"
11
+ }
12
+
13
+ const platform = await (await fetch("/platform")).text();
14
+ export default platform;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fullstacked",
3
- "version": "0.12.0-1173",
3
+ "version": "0.12.0-1175",
4
4
  "scripts": {
5
5
  "build": "node build.js",
6
6
  "start": "npm run build && node index.js --lib ../../core/bin --root ~/FullStacked --config ~/.config/fullstacked --editor ../../out/editor",