tnp-core 16.0.15 → 16.0.17
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/README.md +20 -20
- package/assets/shared/shared_folder_info.txt +1 -1
- package/browser/README.md +24 -24
- package/browser/esm2022/lib/core-config.mjs +1 -1
- package/browser/esm2022/lib/core-imports.mjs +10 -5
- package/browser/esm2022/lib/core-models.mjs +87 -2
- package/browser/esm2022/lib/framework-name.mjs +1 -1
- package/browser/esm2022/lib/helpers-isomorphic.mjs +1 -1
- package/browser/esm2022/lib/helpers-messages.mjs +12 -1
- package/browser/esm2022/lib/helpers.mjs +100 -27
- package/browser/esm2022/lib/index.mjs +2 -1
- package/browser/esm2022/lib/node-chalk-mock.mjs +3 -3
- package/browser/esm2022/lib/node-path-mock.mjs +1 -1
- package/browser/esm2022/lib/progress-data.mjs +1 -1
- package/browser/esm2022/lib/utils.mjs +274 -0
- package/browser/fesm2022/tnp-core.mjs +476 -32
- package/browser/fesm2022/tnp-core.mjs.map +1 -1
- package/browser/lib/core-imports.d.ts +4 -1
- package/browser/lib/core-models.d.ts +170 -1
- package/browser/lib/helpers-messages.d.ts +1 -0
- package/browser/lib/helpers.d.ts +24 -4
- package/browser/lib/index.d.ts +1 -0
- package/browser/lib/utils.d.ts +70 -0
- package/cli.backend.js +3 -3
- package/cli.backend.js.map +1 -1
- package/client/README.md +24 -24
- package/client/esm2022/lib/core-config.mjs +1 -1
- package/client/esm2022/lib/core-imports.mjs +10 -5
- package/client/esm2022/lib/core-models.mjs +87 -2
- package/client/esm2022/lib/framework-name.mjs +1 -1
- package/client/esm2022/lib/helpers-isomorphic.mjs +1 -1
- package/client/esm2022/lib/helpers-messages.mjs +12 -1
- package/client/esm2022/lib/helpers.mjs +100 -27
- package/client/esm2022/lib/index.mjs +2 -1
- package/client/esm2022/lib/node-chalk-mock.mjs +3 -3
- package/client/esm2022/lib/node-path-mock.mjs +1 -1
- package/client/esm2022/lib/progress-data.mjs +1 -1
- package/client/esm2022/lib/utils.mjs +274 -0
- package/client/fesm2022/tnp-core.mjs +476 -32
- package/client/fesm2022/tnp-core.mjs.map +1 -1
- package/client/lib/core-imports.d.ts +4 -1
- package/client/lib/core-models.d.ts +170 -1
- package/client/lib/helpers-messages.d.ts +1 -0
- package/client/lib/helpers.d.ts +24 -4
- package/client/lib/index.d.ts +1 -0
- package/client/lib/utils.d.ts +70 -0
- package/client/package.json +15 -8
- package/index.js.map +1 -1
- package/lib/core-config.js.map +1 -1
- package/lib/core-imports.d.ts +6 -2
- package/lib/core-imports.js +12 -6
- package/lib/core-imports.js.map +1 -1
- package/lib/core-models.d.ts +169 -0
- package/lib/core-models.js +88 -0
- package/lib/core-models.js.map +1 -1
- package/lib/framework-name.js.map +1 -1
- package/lib/helpers-isomorphic.js.map +1 -1
- package/lib/helpers-messages.d.ts +1 -0
- package/lib/helpers-messages.js +11 -0
- package/lib/helpers-messages.js.map +1 -1
- package/lib/helpers.d.ts +56 -17
- package/lib/helpers.js +228 -38
- package/lib/helpers.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/node-chalk-mock.js +3 -3
- package/lib/node-chalk-mock.js.map +1 -1
- package/lib/node-path-mock.js +3 -3
- package/lib/node-path-mock.js.map +1 -1
- package/lib/progress-data.js.map +1 -1
- package/lib/public-api.js.map +1 -1
- package/lib/utils.d.ts +79 -0
- package/lib/utils.js +562 -0
- package/lib/utils.js.map +1 -0
- package/package.json +2 -2
- package/package.json_devDependencies.json +202 -202
- package/package.json_tnp.json5 +69 -69
- package/tmp-environment.json +19 -12
- package/websql/README.md +24 -24
- package/websql/esm2022/lib/core-config.mjs +1 -1
- package/websql/esm2022/lib/core-imports.mjs +10 -5
- package/websql/esm2022/lib/core-models.mjs +87 -2
- package/websql/esm2022/lib/framework-name.mjs +1 -1
- package/websql/esm2022/lib/helpers-isomorphic.mjs +1 -1
- package/websql/esm2022/lib/helpers-messages.mjs +12 -1
- package/websql/esm2022/lib/helpers.mjs +100 -27
- package/websql/esm2022/lib/index.mjs +2 -1
- package/websql/esm2022/lib/node-chalk-mock.mjs +3 -3
- package/websql/esm2022/lib/node-path-mock.mjs +1 -1
- package/websql/esm2022/lib/progress-data.mjs +1 -1
- package/websql/esm2022/lib/utils.mjs +274 -0
- package/websql/fesm2022/tnp-core.mjs +476 -32
- package/websql/fesm2022/tnp-core.mjs.map +1 -1
- package/websql/lib/core-imports.d.ts +4 -1
- package/websql/lib/core-models.d.ts +170 -1
- package/websql/lib/helpers-messages.d.ts +1 -0
- package/websql/lib/helpers.d.ts +24 -4
- package/websql/lib/index.d.ts +1 -0
- package/websql/lib/utils.d.ts +70 -0
@@ -40,4 +40,173 @@ export interface RunOptions extends ExecuteOptions {
|
|
40
40
|
stdio?: any;
|
41
41
|
cwd?: string;
|
42
42
|
}
|
43
|
-
export type PROGRESS_DATA_TYPE = 'info' | 'error' | 'warning' | 'event';
|
43
|
+
export type PROGRESS_DATA_TYPE = 'info' | 'error' | 'warning' | 'event';
|
44
|
+
export declare const mimeTypes: {
|
45
|
+
readonly ".aac": "audio/aac";
|
46
|
+
readonly ".abw": "application/x-abiword";
|
47
|
+
readonly ".arc": "application/x-freearc";
|
48
|
+
readonly ".avi": "video/x-msvideo";
|
49
|
+
readonly ".azw": "application/vnd.amazon.ebook";
|
50
|
+
readonly ".bin": "application/octet-stream";
|
51
|
+
readonly ".bmp": "image/bmp";
|
52
|
+
readonly ".bz": "application/x-bzip";
|
53
|
+
readonly ".bz2": "application/x-bzip2";
|
54
|
+
readonly ".csh": "application/x-csh";
|
55
|
+
readonly ".css": "text/css";
|
56
|
+
readonly ".csv": "text/csv";
|
57
|
+
readonly ".doc": "application/msword";
|
58
|
+
readonly ".docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
59
|
+
readonly ".eot": "application/vnd.ms-fontobject";
|
60
|
+
readonly ".epub": "application/epub+zip";
|
61
|
+
readonly ".gz": "application/gzip";
|
62
|
+
readonly ".gif": "image/gif";
|
63
|
+
readonly ".htm": "text/html";
|
64
|
+
readonly ".html": "text/html";
|
65
|
+
readonly ".ico": "image/vnd.microsoft.icon";
|
66
|
+
readonly ".ics": "text/calendar";
|
67
|
+
readonly ".jar": "application/java-archive";
|
68
|
+
readonly ".jpeg": "image/jpeg";
|
69
|
+
readonly ".jpg": "image/jpeg";
|
70
|
+
readonly ".js": "text/javascript";
|
71
|
+
readonly ".json": "application/json";
|
72
|
+
readonly ".jsonld": "application/ld+json";
|
73
|
+
readonly ".mid": "application/midi";
|
74
|
+
readonly ".midi": "application/midi";
|
75
|
+
readonly ".mjs": "text/javascript";
|
76
|
+
readonly ".mp3": "audio/mpeg";
|
77
|
+
readonly ".mp4": "video/mp4";
|
78
|
+
readonly ".mpeg": "video/mpeg";
|
79
|
+
readonly ".mpkg": "application/vnd.apple.installer+xml";
|
80
|
+
readonly ".odp": "application/vnd.oasis.opendocument.presentation";
|
81
|
+
readonly ".ods": "application/vnd.oasis.opendocument.spreadsheet";
|
82
|
+
readonly ".odt": "application/vnd.oasis.opendocument.text";
|
83
|
+
readonly ".oga": "audio/ogg";
|
84
|
+
readonly ".ogg": "audio/ogg";
|
85
|
+
readonly ".ogv": "video/ogg";
|
86
|
+
readonly ".ogx": "application/ogg";
|
87
|
+
readonly ".opus": "audio/opus";
|
88
|
+
readonly ".otf": "font/otf";
|
89
|
+
readonly ".png": "image/png";
|
90
|
+
readonly ".pdf": "application/pdf";
|
91
|
+
readonly ".php": "application/php";
|
92
|
+
readonly ".ppt": "application/vnd.ms-powerpoint";
|
93
|
+
readonly ".pptx": "application/vnd.openxmlformats-officedocument.presentationml.presentation";
|
94
|
+
readonly ".rar": "application/vnd.rar";
|
95
|
+
readonly ".rtf": "application/rtf";
|
96
|
+
readonly ".sh": "application/x-sh";
|
97
|
+
readonly ".svg": "image/svg+xml";
|
98
|
+
readonly ".swf": "application/x-shockwave-flash";
|
99
|
+
readonly ".tar": "application/x-tar";
|
100
|
+
readonly ".tif": "image/tiff";
|
101
|
+
readonly ".tiff": "image/tiff";
|
102
|
+
readonly ".ts": "video/mp2t";
|
103
|
+
readonly ".ttf": "font/ttf";
|
104
|
+
readonly ".txt": "text/plain";
|
105
|
+
readonly ".vsd": "application/vnd.visio";
|
106
|
+
readonly ".wav": "audio/wav";
|
107
|
+
readonly ".weba": "audio/webm";
|
108
|
+
readonly ".webm": "video/webm";
|
109
|
+
readonly ".webp": "image/webp";
|
110
|
+
readonly ".woff": "font/woff";
|
111
|
+
readonly ".woff2": "font/woff2";
|
112
|
+
readonly ".xhtml": "application/xhtml+xml";
|
113
|
+
readonly ".xls": "application/vnd.ms-excel";
|
114
|
+
readonly ".xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
115
|
+
readonly ".xml": "application/xml";
|
116
|
+
readonly ".xul": "application/vnd.mozilla.xul+xml";
|
117
|
+
readonly ".zip": "application/zip";
|
118
|
+
readonly ".3gp": "video/3gpp";
|
119
|
+
readonly ".3g2": "video/3gpp2";
|
120
|
+
readonly ".7z": "application/x-7z-compressed";
|
121
|
+
};
|
122
|
+
export type ContentTypeKeys = keyof typeof mimeTypes;
|
123
|
+
export type ContentType = typeof mimeTypes[ContentTypeKeys] | 'multipart/form-data';
|
124
|
+
/**
|
125
|
+
* https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types
|
126
|
+
*/
|
127
|
+
export type MediaType = 'text' | 'image' | 'audio' | 'font' | 'video' | 'application' | 'multipart' | 'message' | 'model';
|
128
|
+
export declare const MediaTypeAllArr: MediaType[];
|
129
|
+
type ContentType_ = ContentType;
|
130
|
+
export declare namespace Files {
|
131
|
+
type MimeType = keyof typeof mimeTypes;
|
132
|
+
const MimeTypesObj: {
|
133
|
+
readonly ".aac": "audio/aac";
|
134
|
+
readonly ".abw": "application/x-abiword";
|
135
|
+
readonly ".arc": "application/x-freearc";
|
136
|
+
readonly ".avi": "video/x-msvideo";
|
137
|
+
readonly ".azw": "application/vnd.amazon.ebook";
|
138
|
+
readonly ".bin": "application/octet-stream";
|
139
|
+
readonly ".bmp": "image/bmp";
|
140
|
+
readonly ".bz": "application/x-bzip";
|
141
|
+
readonly ".bz2": "application/x-bzip2";
|
142
|
+
readonly ".csh": "application/x-csh";
|
143
|
+
readonly ".css": "text/css";
|
144
|
+
readonly ".csv": "text/csv";
|
145
|
+
readonly ".doc": "application/msword";
|
146
|
+
readonly ".docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
147
|
+
readonly ".eot": "application/vnd.ms-fontobject";
|
148
|
+
readonly ".epub": "application/epub+zip";
|
149
|
+
readonly ".gz": "application/gzip";
|
150
|
+
readonly ".gif": "image/gif";
|
151
|
+
readonly ".htm": "text/html";
|
152
|
+
readonly ".html": "text/html";
|
153
|
+
readonly ".ico": "image/vnd.microsoft.icon";
|
154
|
+
readonly ".ics": "text/calendar";
|
155
|
+
readonly ".jar": "application/java-archive";
|
156
|
+
readonly ".jpeg": "image/jpeg";
|
157
|
+
readonly ".jpg": "image/jpeg";
|
158
|
+
readonly ".js": "text/javascript";
|
159
|
+
readonly ".json": "application/json";
|
160
|
+
readonly ".jsonld": "application/ld+json";
|
161
|
+
readonly ".mid": "application/midi";
|
162
|
+
readonly ".midi": "application/midi";
|
163
|
+
readonly ".mjs": "text/javascript";
|
164
|
+
readonly ".mp3": "audio/mpeg";
|
165
|
+
readonly ".mp4": "video/mp4";
|
166
|
+
readonly ".mpeg": "video/mpeg";
|
167
|
+
readonly ".mpkg": "application/vnd.apple.installer+xml";
|
168
|
+
readonly ".odp": "application/vnd.oasis.opendocument.presentation";
|
169
|
+
readonly ".ods": "application/vnd.oasis.opendocument.spreadsheet";
|
170
|
+
readonly ".odt": "application/vnd.oasis.opendocument.text";
|
171
|
+
readonly ".oga": "audio/ogg";
|
172
|
+
readonly ".ogg": "audio/ogg";
|
173
|
+
readonly ".ogv": "video/ogg";
|
174
|
+
readonly ".ogx": "application/ogg";
|
175
|
+
readonly ".opus": "audio/opus";
|
176
|
+
readonly ".otf": "font/otf";
|
177
|
+
readonly ".png": "image/png";
|
178
|
+
readonly ".pdf": "application/pdf";
|
179
|
+
readonly ".php": "application/php";
|
180
|
+
readonly ".ppt": "application/vnd.ms-powerpoint";
|
181
|
+
readonly ".pptx": "application/vnd.openxmlformats-officedocument.presentationml.presentation";
|
182
|
+
readonly ".rar": "application/vnd.rar";
|
183
|
+
readonly ".rtf": "application/rtf";
|
184
|
+
readonly ".sh": "application/x-sh";
|
185
|
+
readonly ".svg": "image/svg+xml";
|
186
|
+
readonly ".swf": "application/x-shockwave-flash";
|
187
|
+
readonly ".tar": "application/x-tar";
|
188
|
+
readonly ".tif": "image/tiff";
|
189
|
+
readonly ".tiff": "image/tiff";
|
190
|
+
readonly ".ts": "video/mp2t";
|
191
|
+
readonly ".ttf": "font/ttf";
|
192
|
+
readonly ".txt": "text/plain";
|
193
|
+
readonly ".vsd": "application/vnd.visio";
|
194
|
+
readonly ".wav": "audio/wav";
|
195
|
+
readonly ".weba": "audio/webm";
|
196
|
+
readonly ".webm": "video/webm";
|
197
|
+
readonly ".webp": "image/webp";
|
198
|
+
readonly ".woff": "font/woff";
|
199
|
+
readonly ".woff2": "font/woff2";
|
200
|
+
readonly ".xhtml": "application/xhtml+xml";
|
201
|
+
readonly ".xls": "application/vnd.ms-excel";
|
202
|
+
readonly ".xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
203
|
+
readonly ".xml": "application/xml";
|
204
|
+
readonly ".xul": "application/vnd.mozilla.xul+xml";
|
205
|
+
readonly ".zip": "application/zip";
|
206
|
+
readonly ".3gp": "video/3gpp";
|
207
|
+
readonly ".3g2": "video/3gpp2";
|
208
|
+
readonly ".7z": "application/x-7z-compressed";
|
209
|
+
};
|
210
|
+
type ContentType = ContentType_;
|
211
|
+
}
|
212
|
+
export {};
|
@@ -2,6 +2,7 @@
|
|
2
2
|
import { HelpersIsomorphic } from './helpers-isomorphic';
|
3
3
|
export declare class HelpersMessages extends HelpersIsomorphic {
|
4
4
|
msgCacheClear(): void;
|
5
|
+
renderError(err: Error): void;
|
5
6
|
error(details: any, noExit?: boolean, noTrace?: boolean): void;
|
6
7
|
info(details: string, repeatable?: boolean): void;
|
7
8
|
success(details: any | string): void;
|
package/client/lib/helpers.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
// @ts-nocheck
|
2
2
|
import { HelpersMessages } from './helpers-messages';
|
3
|
-
import { RunOptions } from './core-models';
|
3
|
+
import { MediaType, RunOptions } from './core-models';
|
4
4
|
export interface RunSyncOrAsyncOptions {
|
5
5
|
functionFn: Function;
|
6
6
|
context?: object;
|
@@ -18,11 +18,27 @@ export declare class HelpersCore extends HelpersMessages {
|
|
18
18
|
static get InstanceCore(): HelpersCore;
|
19
19
|
readonly bigMaxBuffer: number;
|
20
20
|
constructor();
|
21
|
-
|
21
|
+
mediaTypeFromSrc(src: string): MediaType;
|
22
|
+
/**
|
23
|
+
* check if data is nodejs/browser blob
|
24
|
+
*
|
25
|
+
* @param maybeBlob
|
26
|
+
* @returns
|
27
|
+
*/
|
28
|
+
isBlob(maybeBlob: any): maybeBlob is Blob;
|
29
|
+
/**
|
30
|
+
* Check if data is nodejs buffer
|
31
|
+
*
|
32
|
+
* @param maybeNodejsBuffer
|
33
|
+
* @returns
|
34
|
+
*/
|
22
35
|
removeSlashAtEnd(s: string): string;
|
23
36
|
removeSlashAtBegin(s: string): string;
|
37
|
+
/**
|
38
|
+
* stringify to pretty json string
|
39
|
+
*/
|
24
40
|
stringify(inputObject: any): string;
|
25
|
-
runSyncOrAsync(fnOrOptions: Function | [string, object] | RunSyncOrAsyncOptions, ...firstArg: any[]): Promise<
|
41
|
+
runSyncOrAsync<FUNCTION_RETURN_TYPE = any>(fnOrOptions: Function | [string, object] | RunSyncOrAsyncOptions, ...firstArg: any[]): Promise<FUNCTION_RETURN_TYPE>;
|
26
42
|
/**
|
27
43
|
* symlink may have existed or unexisted destiantion url
|
28
44
|
* @param destUrl M
|
@@ -38,15 +54,19 @@ export declare class HelpersCore extends HelpersMessages {
|
|
38
54
|
*/
|
39
55
|
isExistedSymlink(filePath: string): boolean;
|
40
56
|
exists(folderOrFilePath: string | string[]): any;
|
57
|
+
/**
|
58
|
+
* this is HACK for running procesess inside processes
|
59
|
+
*/
|
41
60
|
_fixCommand(command: string): string;
|
42
61
|
command(command: string): {};
|
43
|
-
wait(second: number): Promise<
|
62
|
+
wait(second: number): Promise<void>;
|
44
63
|
killProcess(byPid: number): void;
|
45
64
|
run(command: string, options?: RunOptions): {
|
46
65
|
async(detach?: boolean, mockFun?: (stdoutCallback: (dataForStdout: any) => any, stdErrcCallback: (dataForStder: any) => any, shouldProcesBeDead?: () => boolean) => Promise<number> | number): any;
|
47
66
|
};
|
48
67
|
/**
|
49
68
|
* Quick fix for object values
|
69
|
+
* @deprecated
|
50
70
|
*/
|
51
71
|
values(obj: any): any[];
|
52
72
|
}
|
package/client/lib/index.d.ts
CHANGED
@@ -5,5 +5,6 @@ export * from './core-models';
|
|
5
5
|
import { HelpersCore as Base } from './helpers';
|
6
6
|
export * from './core-config';
|
7
7
|
export * from './progress-data';
|
8
|
+
export * from './utils';
|
8
9
|
export { HelpersCore as CoreHelpers, CommandOutputOptions } from './helpers';
|
9
10
|
export declare let Helpers: Base;
|
@@ -0,0 +1,70 @@
|
|
1
|
+
// @ts-nocheck
|
2
|
+
import { ContentType } from "./core-models";
|
3
|
+
export declare namespace Utils {
|
4
|
+
enum DbBinaryFormatEnum {
|
5
|
+
Blob = "Blob",
|
6
|
+
File = "File",
|
7
|
+
string = "string"
|
8
|
+
}
|
9
|
+
type DbBinaryFormatForBrowser = Blob | File | string;
|
10
|
+
/**
|
11
|
+
* Binary format that can be stored in database
|
12
|
+
*
|
13
|
+
* for nodejs => Buffer
|
14
|
+
* for sql.js => string (shoulb be blob - but not supported)
|
15
|
+
*
|
16
|
+
*/
|
17
|
+
type DbBinaryFormat = DbBinaryFormatForBrowser;
|
18
|
+
namespace binary {
|
19
|
+
/**
|
20
|
+
* This is for BROWSER ONLY
|
21
|
+
*
|
22
|
+
* @param buffer
|
23
|
+
* @param contentType
|
24
|
+
* @returns
|
25
|
+
*/
|
26
|
+
function arrayBufferToBlob(buffer: ArrayBuffer, contentType: ContentType): Promise<Blob>;
|
27
|
+
/**
|
28
|
+
* This is for BROWSER ONLY
|
29
|
+
* @param blob
|
30
|
+
* @returns
|
31
|
+
*/
|
32
|
+
function blobToArrayBuffer(blob: Blob): Promise<ArrayBuffer>;
|
33
|
+
/**
|
34
|
+
* it is revers to base64toBlob
|
35
|
+
* @param blob
|
36
|
+
* @returns
|
37
|
+
*/
|
38
|
+
function blobToBase64(blob: Blob): Promise<string>;
|
39
|
+
/**
|
40
|
+
* it is revers to blobToBase64()
|
41
|
+
* @param base64Data
|
42
|
+
* @returns
|
43
|
+
*/
|
44
|
+
function base64toBlob(base64Data: string, contentTypeOverride?: ContentType): Promise<Blob>;
|
45
|
+
function base64toDbBinaryFormat(text: string): Promise<DbBinaryFormat>;
|
46
|
+
function dbBinaryFormatToBase64(binaryFormat: DbBinaryFormat): Promise<string>;
|
47
|
+
function textToDbBinaryFormat(text: string): Promise<DbBinaryFormat>;
|
48
|
+
function dbBinaryFormatToText(binaryFormat: DbBinaryFormat): Promise<string>;
|
49
|
+
function fileToBlob(file: File): Promise<Blob>;
|
50
|
+
function blobToFile(blob: Blob, nameForFile?: string): Promise<File>;
|
51
|
+
function textToBlob(text: string, type?: ContentType): Promise<Blob>;
|
52
|
+
function blobToText(blob: Blob): Promise<string>;
|
53
|
+
function textToFile(text: string, fileRelativePathOrName: string): Promise<File>;
|
54
|
+
function fileToText(file: File): Promise<string>;
|
55
|
+
function jsonToBlob(jsonObj: object): Promise<Blob>;
|
56
|
+
/**
|
57
|
+
* TODO NOT TESTED
|
58
|
+
*/
|
59
|
+
function blobToJson(blob: Blob): Promise<string>;
|
60
|
+
function getBlobFrom(url: string): Promise<Blob>;
|
61
|
+
}
|
62
|
+
namespace css {
|
63
|
+
/**
|
64
|
+
*
|
65
|
+
* @param pixelsCss pixels ex. 100px
|
66
|
+
* @returns
|
67
|
+
*/
|
68
|
+
function numValue(pixelsCss: string): number;
|
69
|
+
}
|
70
|
+
}
|
package/client/package.json
CHANGED
@@ -102,6 +102,9 @@
|
|
102
102
|
"@angular/router": "~16.0.0",
|
103
103
|
"@angular/service-worker": "~16.0.4",
|
104
104
|
"@babel/cli": "7.18.6",
|
105
|
+
"@commitlint/cli": "12.1.1",
|
106
|
+
"@commitlint/config-conventional": "12.1.1",
|
107
|
+
"@commitlint/prompt-cli": "12.1.1",
|
105
108
|
"@compodoc/compodoc": "1.1.20",
|
106
109
|
"@cypress/schematic": "2.5.0",
|
107
110
|
"@iconify/icons-fa-solid": "1.2.2",
|
@@ -154,6 +157,7 @@
|
|
154
157
|
"@types/vinyl": "2.0.2",
|
155
158
|
"@types/watch": "1.0.0",
|
156
159
|
"accepts": "1.3.4",
|
160
|
+
"ajv": "8.12.0",
|
157
161
|
"angular-material-css-vars": "5.0.2",
|
158
162
|
"angular-resize-event": "3.2.0",
|
159
163
|
"animate.css": "4.1.1 ",
|
@@ -263,6 +267,8 @@
|
|
263
267
|
"ngx-editor": "15.3.0",
|
264
268
|
"ngx-highlightjs": "9.0.0",
|
265
269
|
"ngx-moment": "6.0.2",
|
270
|
+
"ngx-monaco-editor": "12.0.0",
|
271
|
+
"ngx-photo-editor": "0.4.4",
|
266
272
|
"ngx-pipes": "3.2.2",
|
267
273
|
"ngx-progressbar": "11.0.0",
|
268
274
|
"ngx-scrollbar": "12.0.0",
|
@@ -283,7 +289,8 @@
|
|
283
289
|
"passport-http-bearer": "1.0.1",
|
284
290
|
"password-hash": "1.2.2",
|
285
291
|
"pica": "9.0.1",
|
286
|
-
"prettier": "
|
292
|
+
"prettier": "3.0.0",
|
293
|
+
"pretty-error": "4.0.0",
|
287
294
|
"progress": "2.0.3",
|
288
295
|
"prompts": "0.1.8",
|
289
296
|
"rallax.js": "2.0.4",
|
@@ -306,11 +313,11 @@
|
|
306
313
|
"systeminformation": "3.45.7",
|
307
314
|
"task.js": "0.1.5",
|
308
315
|
"threads": "1.7.0",
|
309
|
-
"tnp-cli": "~16.0.
|
310
|
-
"tnp-config": "~16.0.
|
311
|
-
"tnp-core": "~16.0.
|
316
|
+
"tnp-cli": "~16.0.7",
|
317
|
+
"tnp-config": "~16.0.18",
|
318
|
+
"tnp-core": "~16.0.15",
|
312
319
|
"tnp-db": "~16.0.27",
|
313
|
-
"tnp-helpers": "~16.0.
|
320
|
+
"tnp-helpers": "~16.0.10",
|
314
321
|
"tnp-models": "~16.0.36",
|
315
322
|
"ts-debug": "1.3.0",
|
316
323
|
"ts-loader": "2.3.1",
|
@@ -326,7 +333,7 @@
|
|
326
333
|
"uuid": "8.3.2",
|
327
334
|
"validator": "9.2.0",
|
328
335
|
"video.js": "8.3.0",
|
329
|
-
"vpn-split": "~16.0.
|
336
|
+
"vpn-split": "~16.0.3",
|
330
337
|
"watch": "1.0.2",
|
331
338
|
"yup": "1.1.1",
|
332
339
|
"zone.js": "~0.13.0"
|
@@ -334,6 +341,6 @@
|
|
334
341
|
"license": "MIT",
|
335
342
|
"private": false,
|
336
343
|
"name": "tnp-core",
|
337
|
-
"version": "16.0.
|
338
|
-
"lastBuildTagHash": "
|
344
|
+
"version": "16.0.17",
|
345
|
+
"lastBuildTagHash": "5861a978dbc459c434b63cf665af82ce8046d8d5"
|
339
346
|
}
|
package/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;AAAA,gDAAsB"}
|
package/lib/core-config.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"core-config.js","sourceRoot":"","sources":["
|
1
|
+
{"version":3,"file":"core-config.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG;IACxB,OAAO,EAAE;QACP,oBAAoB,EAAE,sBAAsB;KAC7C;CACF,CAAA"}
|
package/lib/core-imports.d.ts
CHANGED
@@ -4,6 +4,7 @@ import * as q from 'q';
|
|
4
4
|
import * as moment from 'moment';
|
5
5
|
import * as dateformat from 'dateformat';
|
6
6
|
import { Chalk } from 'chalk';
|
7
|
+
import createCallsiteRecord from 'callsite-record';
|
7
8
|
import * as pathBase from 'path';
|
8
9
|
import * as os from 'os';
|
9
10
|
import * as child_process from 'child_process';
|
@@ -26,6 +27,9 @@ declare function isElevated(): Promise<any>;
|
|
26
27
|
declare let path: pathBase.PlatformPath;
|
27
28
|
declare let chalk: Chalk;
|
28
29
|
declare function win32Path(p: string): string;
|
29
|
-
|
30
|
+
/**
|
31
|
+
* This funciton will replace // to /
|
32
|
+
*/
|
33
|
+
declare const crossPlatformPath: (pathStringOrPathParts: string | string[]) => string;
|
30
34
|
export { _, q, moment, dateformat, crossPlatformPath, win32Path, path, chalk, };
|
31
|
-
export { spawn, glob, isElevated, chokidar, mkdirp, ncp, json5, fse, os, child_process, http, https, rimraf, net, ps, fkill, portfinder, psList, };
|
35
|
+
export { createCallsiteRecord, spawn, glob, isElevated, chokidar, mkdirp, ncp, json5, fse, os, child_process, http, https, rimraf, net, ps, fkill, portfinder, psList, };
|
package/lib/core-imports.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.psList = exports.portfinder = exports.fkill = exports.ps = exports.net = exports.rimraf = exports.https = exports.http = exports.child_process = exports.os = exports.fse = exports.json5 = exports.ncp = exports.mkdirp = exports.chokidar = exports.isElevated = exports.glob = exports.spawn = exports.chalk = exports.path = exports.win32Path = exports.crossPlatformPath = exports.dateformat = exports.moment = exports.q = exports._ = void 0;
|
3
|
+
exports.psList = exports.portfinder = exports.fkill = exports.ps = exports.net = exports.rimraf = exports.https = exports.http = exports.child_process = exports.os = exports.fse = exports.json5 = exports.ncp = exports.mkdirp = exports.chokidar = exports.isElevated = exports.glob = exports.spawn = exports.createCallsiteRecord = exports.chalk = exports.path = exports.win32Path = exports.crossPlatformPath = exports.dateformat = exports.moment = exports.q = exports._ = void 0;
|
4
4
|
var tslib_1 = require("tslib");
|
5
5
|
var _ = require("lodash");
|
6
6
|
exports._ = _;
|
@@ -11,6 +11,9 @@ exports.moment = moment;
|
|
11
11
|
var dateformat = require("dateformat");
|
12
12
|
exports.dateformat = dateformat;
|
13
13
|
//#region @backend
|
14
|
+
// @ts-ignore
|
15
|
+
var callsite_record_1 = require("callsite-record");
|
16
|
+
exports.createCallsiteRecord = callsite_record_1.default;
|
14
17
|
var pathBase = require("path");
|
15
18
|
var os = require("os");
|
16
19
|
exports.os = os;
|
@@ -95,13 +98,16 @@ function win32Path(p) {
|
|
95
98
|
return path.win32.normalize(p);
|
96
99
|
}
|
97
100
|
exports.win32Path = win32Path;
|
98
|
-
|
101
|
+
/**
|
102
|
+
* This funciton will replace // to /
|
103
|
+
*/
|
104
|
+
var crossPlatformPath = function (pathStringOrPathParts) {
|
99
105
|
if (Array.isArray(pathStringOrPathParts)) {
|
100
106
|
pathStringOrPathParts = pathStringOrPathParts.join('/');
|
101
107
|
}
|
102
108
|
//#region @backend
|
103
109
|
if (process.platform !== 'win32') {
|
104
|
-
return pathStringOrPathParts;
|
110
|
+
return pathStringOrPathParts === null || pathStringOrPathParts === void 0 ? void 0 : pathStringOrPathParts.replace(/\/\//g, '/');
|
105
111
|
}
|
106
112
|
//#endregion
|
107
113
|
if (typeof pathStringOrPathParts !== 'string') {
|
@@ -110,10 +116,10 @@ function crossPlatformPath(pathStringOrPathParts) {
|
|
110
116
|
var isExtendedLengthPath = /^\\\\\?\\/.test(pathStringOrPathParts);
|
111
117
|
var hasNonAscii = /[^\u0000-\u0080]+/.test(pathStringOrPathParts); // eslint-disable-line no-control-regex
|
112
118
|
if (isExtendedLengthPath || hasNonAscii) {
|
113
|
-
return pathStringOrPathParts;
|
119
|
+
return pathStringOrPathParts === null || pathStringOrPathParts === void 0 ? void 0 : pathStringOrPathParts.replace(/\/\//g, '/');
|
114
120
|
}
|
115
|
-
return pathStringOrPathParts.replace(/\\/g, '/');
|
116
|
-
}
|
121
|
+
return pathStringOrPathParts.replace(/\\/g, '/').replace(/\/\//g, '/');
|
122
|
+
};
|
117
123
|
exports.crossPlatformPath = crossPlatformPath;
|
118
124
|
//#endregion
|
119
125
|
//# sourceMappingURL=core-imports.js.map
|
package/lib/core-imports.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"core-imports.js","sourceRoot":"","sources":["
|
1
|
+
{"version":3,"file":"core-imports.js","sourceRoot":"","sources":[""],"names":[],"mappings":"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"}
|