@fnndsc/fond 0.2.0 → 0.3.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/README.md +4 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/vfs/contract.d.ts +26 -0
- package/dist/vfs/contract.js +195 -0
- package/dist/vfs/contract.js.map +1 -0
- package/dist/vfs/dispatcher.d.ts +92 -34
- package/dist/vfs/dispatcher.js +174 -87
- package/dist/vfs/dispatcher.js.map +1 -1
- package/dist/vfs/fsViews.d.ts +39 -0
- package/dist/vfs/fsViews.js +91 -0
- package/dist/vfs/fsViews.js.map +1 -0
- package/dist/vfs/memory.d.ts +66 -0
- package/dist/vfs/memory.js +282 -0
- package/dist/vfs/memory.js.map +1 -0
- package/dist/vfs/outcome.d.ts +98 -0
- package/dist/vfs/outcome.js +151 -0
- package/dist/vfs/outcome.js.map +1 -0
- package/dist/vfs/provider.d.ts +54 -23
- package/dist/vfs/render.d.ts +73 -0
- package/dist/vfs/render.js +203 -0
- package/dist/vfs/render.js.map +1 -0
- package/package.json +4 -1
package/dist/vfs/provider.d.ts
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* @module
|
|
10
10
|
*/
|
|
11
11
|
import { Result } from "../result.js";
|
|
12
|
+
import type { VfsOutcome } from "./outcome.js";
|
|
12
13
|
/**
|
|
13
14
|
* Standard interface representing a virtual file system item.
|
|
14
15
|
*/
|
|
@@ -37,6 +38,8 @@ export interface VFSItem {
|
|
|
37
38
|
id?: number;
|
|
38
39
|
/** Execution status (for job type items). */
|
|
39
40
|
status?: string;
|
|
41
|
+
/** Tags a backend hangs on the item, shown in a long listing as `#tag`. */
|
|
42
|
+
tags?: string[];
|
|
40
43
|
}
|
|
41
44
|
/**
|
|
42
45
|
* Options for VFS copy operations.
|
|
@@ -68,52 +71,80 @@ export interface VFSProvider {
|
|
|
68
71
|
* @param src - The absolute source path.
|
|
69
72
|
* @param dest - The absolute destination path.
|
|
70
73
|
* @param options - Copy flags like recursive.
|
|
71
|
-
* @returns
|
|
74
|
+
* @returns Done, or why not.
|
|
72
75
|
*/
|
|
73
|
-
cp(src: string, dest: string, options: CpOptions): Promise<
|
|
76
|
+
cp(src: string, dest: string, options: CpOptions): Promise<VfsOutcome>;
|
|
74
77
|
/**
|
|
75
|
-
* Reads
|
|
78
|
+
* Reads a file whole, as text.
|
|
76
79
|
*
|
|
77
|
-
* @param path - The absolute
|
|
78
|
-
* @returns
|
|
80
|
+
* @param path - The absolute path of the file.
|
|
81
|
+
* @returns Its content, or why not (`ENOENT`, `EISDIR`, ...).
|
|
79
82
|
*/
|
|
80
|
-
read?(path: string): Promise<
|
|
83
|
+
read?(path: string): Promise<VfsOutcome<string>>;
|
|
81
84
|
/**
|
|
82
|
-
* Reads
|
|
85
|
+
* Reads a file whole, as bytes.
|
|
83
86
|
*
|
|
84
|
-
* @param path - The absolute
|
|
85
|
-
* @returns
|
|
87
|
+
* @param path - The absolute path of the file.
|
|
88
|
+
* @returns Its bytes, or why not.
|
|
86
89
|
*/
|
|
87
|
-
readBinary?(path: string): Promise<
|
|
90
|
+
readBinary?(path: string): Promise<VfsOutcome<Buffer>>;
|
|
88
91
|
/**
|
|
89
|
-
* Writes a file whole
|
|
90
|
-
*
|
|
92
|
+
* Writes a file whole: its content after the write is exactly what was
|
|
93
|
+
* given, whether or not it existed before. Absent, the mount holds no
|
|
94
|
+
* writable files.
|
|
91
95
|
*
|
|
92
96
|
* @param path - The absolute path of the file.
|
|
93
97
|
* @param content - The new content, whole.
|
|
94
|
-
* @returns
|
|
98
|
+
* @returns Done, or why not (`ENOENT` for a missing folder, `EISDIR`, ...).
|
|
95
99
|
*/
|
|
96
|
-
write?(path: string, content: string): Promise<
|
|
100
|
+
write?(path: string, content: string | Buffer): Promise<VfsOutcome>;
|
|
97
101
|
/**
|
|
98
|
-
* Makes
|
|
99
|
-
*
|
|
102
|
+
* Makes one folder; its parent must exist. Absent, the mount makes none.
|
|
103
|
+
*
|
|
100
104
|
* @param path - The absolute path of the new folder.
|
|
101
|
-
* @returns
|
|
105
|
+
* @returns Done, or why not (`EEXIST`, `ENOENT` for a missing parent, ...).
|
|
106
|
+
*/
|
|
107
|
+
mkdir?(path: string): Promise<VfsOutcome>;
|
|
108
|
+
/**
|
|
109
|
+
* Makes a folder and any missing parents in one step, for a mount whose
|
|
110
|
+
* store can (`mkdir -p`). Absent, `mkdir -p` makes each missing parent in
|
|
111
|
+
* turn.
|
|
112
|
+
*
|
|
113
|
+
* @param path - The absolute path of the folder.
|
|
114
|
+
* @returns Done, or why not (`EEXIST` when something is already there).
|
|
102
115
|
*/
|
|
103
|
-
|
|
116
|
+
mkdirTree?(path: string): Promise<VfsOutcome>;
|
|
104
117
|
/**
|
|
105
118
|
* Removes an empty folder (`rmdir`).
|
|
119
|
+
*
|
|
106
120
|
* @param path - The absolute path of the folder.
|
|
107
|
-
* @returns
|
|
121
|
+
* @returns Done, or why not (`ENOENT`, `ENOTDIR`, `ENOTEMPTY`, ...).
|
|
108
122
|
*/
|
|
109
|
-
rmdir?(path: string): Promise<
|
|
123
|
+
rmdir?(path: string): Promise<VfsOutcome>;
|
|
110
124
|
/**
|
|
111
|
-
* Renames an entry within this
|
|
125
|
+
* Renames an entry within this mount (`mv`).
|
|
126
|
+
*
|
|
112
127
|
* @param src - The absolute path now.
|
|
113
128
|
* @param dest - The absolute path it takes.
|
|
114
|
-
* @returns
|
|
129
|
+
* @returns Done, or why not (`ENOENT`, `EEXIST` where the mount cannot replace, ...).
|
|
130
|
+
*/
|
|
131
|
+
rename?(src: string, dest: string): Promise<VfsOutcome>;
|
|
132
|
+
/**
|
|
133
|
+
* Removes a file or a link (`rm`); a folder is refused with `EISDIR`.
|
|
134
|
+
*
|
|
135
|
+
* @param path - The absolute path of the entry.
|
|
136
|
+
* @returns Done, or why not.
|
|
137
|
+
*/
|
|
138
|
+
rm?(path: string): Promise<VfsOutcome>;
|
|
139
|
+
/**
|
|
140
|
+
* Removes a folder and everything under it in one step, for a mount
|
|
141
|
+
* whose store can (`rm -r`). Absent, `rm -r` removes what it holds one
|
|
142
|
+
* entry at a time.
|
|
143
|
+
*
|
|
144
|
+
* @param path - The absolute path of the folder.
|
|
145
|
+
* @returns Done, or why not.
|
|
115
146
|
*/
|
|
116
|
-
|
|
147
|
+
rmTree?(path: string): Promise<VfsOutcome>;
|
|
117
148
|
/**
|
|
118
149
|
* Resolves the target of a provider-defined lazy link when an operation
|
|
119
150
|
* actually follows it.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { VFSItem } from './provider.js';
|
|
2
|
+
/** How one kind of item shows in a listing. */
|
|
3
|
+
export interface ItemKindLook {
|
|
4
|
+
/** The item type it describes. */
|
|
5
|
+
readonly type: string;
|
|
6
|
+
/** The long view's first column: `d` for a folder, `-` for a file. */
|
|
7
|
+
readonly mark: string;
|
|
8
|
+
/** Whether it holds other items: its name ends in `/`. */
|
|
9
|
+
readonly container?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* What the long view shows in the size column, when it is not the size
|
|
12
|
+
* (a job shows its status); null keeps the size.
|
|
13
|
+
*/
|
|
14
|
+
readonly sizeColumn?: (item: VFSItem) => string | null;
|
|
15
|
+
}
|
|
16
|
+
/** How a listing shows: its kinds, and how a name is coloured. */
|
|
17
|
+
export interface ListingLook {
|
|
18
|
+
/** The kinds it knows; a kind not here shows as a file. */
|
|
19
|
+
readonly kinds: ReadonlyArray<ItemKindLook>;
|
|
20
|
+
/** Colours one name by its type. */
|
|
21
|
+
readonly name_colorize: (name: string, type: string) => string;
|
|
22
|
+
}
|
|
23
|
+
/** The kinds every listing knows. */
|
|
24
|
+
export declare const LISTING_CORE_KINDS: ReadonlyArray<ItemKindLook>;
|
|
25
|
+
/** The look of a listing with only the core's kinds and plain names. */
|
|
26
|
+
export declare const LISTING_LOOK_PLAIN: ListingLook;
|
|
27
|
+
/** The options a listing renders with. */
|
|
28
|
+
export interface ListingViewOptions {
|
|
29
|
+
/** Sizes in B, KB, MB... rather than bytes. */
|
|
30
|
+
human?: boolean;
|
|
31
|
+
/** One name per line, as `ls -1`. */
|
|
32
|
+
oneColumn?: boolean;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Formats a byte count for people.
|
|
36
|
+
*
|
|
37
|
+
* @param bytes - The count.
|
|
38
|
+
* @returns `0 B`, `1.5 KB`, `12 MB`...
|
|
39
|
+
*/
|
|
40
|
+
export declare function size_format(bytes: number): string;
|
|
41
|
+
/**
|
|
42
|
+
* Sorts a listing's items by one field, without changing the array given.
|
|
43
|
+
*
|
|
44
|
+
* Numbers compare numerically, strings by locale; an item missing the field
|
|
45
|
+
* sorts after one that has it. `reverse` reverses each comparison, so items
|
|
46
|
+
* that compare equal keep their order (unlike {@link vfsItems_sort}, which
|
|
47
|
+
* reverses the sorted array).
|
|
48
|
+
*
|
|
49
|
+
* @param items - The items.
|
|
50
|
+
* @param sortField - The field; none leaves the order as given.
|
|
51
|
+
* @param reverse - Whether to sort descending.
|
|
52
|
+
* @returns The items, sorted.
|
|
53
|
+
*/
|
|
54
|
+
export declare function listingItems_sort<T extends VFSItem>(items: T[], sortField?: string, reverse?: boolean): T[];
|
|
55
|
+
/**
|
|
56
|
+
* Renders items as `ls` does: names in as many columns as the terminal holds.
|
|
57
|
+
*
|
|
58
|
+
* @param items - The items, already sorted.
|
|
59
|
+
* @param options - The view options.
|
|
60
|
+
* @param look - The listing's look.
|
|
61
|
+
* @returns The grid.
|
|
62
|
+
*/
|
|
63
|
+
export declare function grid_render(items: VFSItem[], options?: ListingViewOptions, look?: ListingLook): string;
|
|
64
|
+
/**
|
|
65
|
+
* Renders items as `ls -l` does: one line each, with mark, owner, size,
|
|
66
|
+
* date, name, and the title, tags and link target an item carries.
|
|
67
|
+
*
|
|
68
|
+
* @param items - The items, already sorted.
|
|
69
|
+
* @param options - The view options.
|
|
70
|
+
* @param look - The listing's look.
|
|
71
|
+
* @returns The lines.
|
|
72
|
+
*/
|
|
73
|
+
export declare function long_render(items: VFSItem[], options?: ListingViewOptions, look?: ListingLook): string;
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.LISTING_LOOK_PLAIN = exports.LISTING_CORE_KINDS = void 0;
|
|
7
|
+
exports.size_format = size_format;
|
|
8
|
+
exports.listingItems_sort = listingItems_sort;
|
|
9
|
+
exports.grid_render = grid_render;
|
|
10
|
+
exports.long_render = long_render;
|
|
11
|
+
/**
|
|
12
|
+
* @file A listing as a terminal shows it: `ls`'s grid and long views, and the
|
|
13
|
+
* sort they are given.
|
|
14
|
+
*
|
|
15
|
+
* The core knows four kinds of item: files, folders, links and mounts. A
|
|
16
|
+
* backend adds the kinds it lists (each with its long-view mark, and whether
|
|
17
|
+
* it is a container) and says how a name is coloured; that is the listing's
|
|
18
|
+
* look. A look with no colouring writes names plainly.
|
|
19
|
+
*
|
|
20
|
+
* @module
|
|
21
|
+
*/
|
|
22
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
23
|
+
/** The kinds every listing knows. */
|
|
24
|
+
exports.LISTING_CORE_KINDS = [
|
|
25
|
+
{ type: 'file', mark: '-' },
|
|
26
|
+
{ type: 'dir', mark: 'd', container: true },
|
|
27
|
+
{ type: 'link', mark: 'l' },
|
|
28
|
+
{ type: 'vfs', mark: 'v' },
|
|
29
|
+
];
|
|
30
|
+
/** The look of a listing with only the core's kinds and plain names. */
|
|
31
|
+
exports.LISTING_LOOK_PLAIN = {
|
|
32
|
+
kinds: exports.LISTING_CORE_KINDS,
|
|
33
|
+
name_colorize: (name) => name,
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Formats a byte count for people.
|
|
37
|
+
*
|
|
38
|
+
* @param bytes - The count.
|
|
39
|
+
* @returns `0 B`, `1.5 KB`, `12 MB`...
|
|
40
|
+
*/
|
|
41
|
+
function size_format(bytes) {
|
|
42
|
+
if (bytes === 0)
|
|
43
|
+
return '0 B';
|
|
44
|
+
const k = 1024;
|
|
45
|
+
const sizes = ['B', 'KB', 'MB', 'GB', 'TB'];
|
|
46
|
+
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
47
|
+
return parseFloat((bytes / Math.pow(k, i)).toFixed(1)) + ' ' + sizes[i];
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Sorts a listing's items by one field, without changing the array given.
|
|
51
|
+
*
|
|
52
|
+
* Numbers compare numerically, strings by locale; an item missing the field
|
|
53
|
+
* sorts after one that has it. `reverse` reverses each comparison, so items
|
|
54
|
+
* that compare equal keep their order (unlike {@link vfsItems_sort}, which
|
|
55
|
+
* reverses the sorted array).
|
|
56
|
+
*
|
|
57
|
+
* @param items - The items.
|
|
58
|
+
* @param sortField - The field; none leaves the order as given.
|
|
59
|
+
* @param reverse - Whether to sort descending.
|
|
60
|
+
* @returns The items, sorted.
|
|
61
|
+
*/
|
|
62
|
+
function listingItems_sort(items, sortField, reverse = false) {
|
|
63
|
+
if (!sortField || items.length === 0) {
|
|
64
|
+
return items;
|
|
65
|
+
}
|
|
66
|
+
return [...items].sort((a, b) => {
|
|
67
|
+
const aVal = Reflect.get(a, sortField);
|
|
68
|
+
const bVal = Reflect.get(b, sortField);
|
|
69
|
+
if (aVal === undefined || aVal === null)
|
|
70
|
+
return 1;
|
|
71
|
+
if (bVal === undefined || bVal === null)
|
|
72
|
+
return -1;
|
|
73
|
+
let comparison;
|
|
74
|
+
if (typeof aVal === 'number' && typeof bVal === 'number') {
|
|
75
|
+
comparison = aVal - bVal;
|
|
76
|
+
}
|
|
77
|
+
else if (typeof aVal === 'string' && typeof bVal === 'string') {
|
|
78
|
+
comparison = aVal.localeCompare(bVal);
|
|
79
|
+
}
|
|
80
|
+
else if (aVal instanceof Date && bVal instanceof Date) {
|
|
81
|
+
comparison = aVal.getTime() - bVal.getTime();
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
comparison = String(aVal).localeCompare(String(bVal));
|
|
85
|
+
}
|
|
86
|
+
return reverse ? -comparison : comparison;
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* The look of one kind.
|
|
91
|
+
*
|
|
92
|
+
* @param look - The listing's look.
|
|
93
|
+
* @param type - The item's type.
|
|
94
|
+
* @returns Its kind, or undefined for a kind the look does not know.
|
|
95
|
+
*/
|
|
96
|
+
function kind_find(look, type) {
|
|
97
|
+
return look.kinds.find((kind) => kind.type === type);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* One item's name as a listing shows it: coloured, and ending in `/` when
|
|
101
|
+
* it is a container.
|
|
102
|
+
*
|
|
103
|
+
* @param item - The item.
|
|
104
|
+
* @param look - The listing's look.
|
|
105
|
+
* @returns The name.
|
|
106
|
+
*/
|
|
107
|
+
function name_format(item, look) {
|
|
108
|
+
const base = look.name_colorize(item.name, item.type);
|
|
109
|
+
return kind_find(look, item.type)?.container === true ? base + chalk_1.default.cyan.bold('/') : base;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* A string's length on screen, its ANSI codes left out.
|
|
113
|
+
*
|
|
114
|
+
* @param str - The string.
|
|
115
|
+
* @returns How many columns it takes.
|
|
116
|
+
*/
|
|
117
|
+
function string_lengthVisible(str) {
|
|
118
|
+
return str.replace(/\u001b\[[0-9;]*m/g, '').length;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Renders items as `ls` does: names in as many columns as the terminal holds.
|
|
122
|
+
*
|
|
123
|
+
* @param items - The items, already sorted.
|
|
124
|
+
* @param options - The view options.
|
|
125
|
+
* @param look - The listing's look.
|
|
126
|
+
* @returns The grid.
|
|
127
|
+
*/
|
|
128
|
+
function grid_render(items, options = {}, look = exports.LISTING_LOOK_PLAIN) {
|
|
129
|
+
if (items.length === 0)
|
|
130
|
+
return '';
|
|
131
|
+
const formattedItems = items.map((item) => {
|
|
132
|
+
let str = name_format(item, look);
|
|
133
|
+
if (item.version)
|
|
134
|
+
str += chalk_1.default.dim(` (${item.version})`);
|
|
135
|
+
return str;
|
|
136
|
+
});
|
|
137
|
+
if (options.oneColumn) {
|
|
138
|
+
return formattedItems.join('\n');
|
|
139
|
+
}
|
|
140
|
+
const termWidth = process.stdout.columns || 80;
|
|
141
|
+
const padding = 2;
|
|
142
|
+
const maxLen = Math.max(...formattedItems.map(string_lengthVisible));
|
|
143
|
+
// Cap colWidth at termWidth so padding never causes a terminal line wrap.
|
|
144
|
+
const colWidth = Math.min(maxLen + padding, termWidth);
|
|
145
|
+
const cols = Math.max(1, Math.floor(termWidth / colWidth));
|
|
146
|
+
let output = '';
|
|
147
|
+
for (let i = 0; i < formattedItems.length; i++) {
|
|
148
|
+
const item = formattedItems[i];
|
|
149
|
+
const visibleLen = string_lengthVisible(item);
|
|
150
|
+
const padLen = Math.max(0, colWidth - visibleLen);
|
|
151
|
+
output += item + ' '.repeat(padLen);
|
|
152
|
+
if ((i + 1) % cols === 0) {
|
|
153
|
+
output += '\n';
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
return output.trimEnd();
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Renders items as `ls -l` does: one line each, with mark, owner, size,
|
|
160
|
+
* date, name, and the title, tags and link target an item carries.
|
|
161
|
+
*
|
|
162
|
+
* @param items - The items, already sorted.
|
|
163
|
+
* @param options - The view options.
|
|
164
|
+
* @param look - The listing's look.
|
|
165
|
+
* @returns The lines.
|
|
166
|
+
*/
|
|
167
|
+
function long_render(items, options = {}, look = exports.LISTING_LOOK_PLAIN) {
|
|
168
|
+
if (items.length === 0)
|
|
169
|
+
return '';
|
|
170
|
+
// Calculate max name width for alignment
|
|
171
|
+
const maxNameWidth = Math.max(...items.map((item) => {
|
|
172
|
+
const visibleLen = string_lengthVisible(name_format(item, look));
|
|
173
|
+
return item.version ? visibleLen + item.version.length + 3 : visibleLen;
|
|
174
|
+
}));
|
|
175
|
+
return items.map((item) => {
|
|
176
|
+
const kind = kind_find(look, item.type);
|
|
177
|
+
const typeChar = kind?.mark ?? '-';
|
|
178
|
+
const owner = item.owner.padEnd(10);
|
|
179
|
+
const column = kind?.sizeColumn?.(item) ?? null;
|
|
180
|
+
const sizeStr = column ?? (options.human ? size_format(item.size) : item.size.toString()).padEnd(8);
|
|
181
|
+
// The date as `YYYY-MM-DD HH:mm:ss`, from an ISO string.
|
|
182
|
+
const dateStr = item.date.replace('T', ' ').slice(0, 19);
|
|
183
|
+
let nameStr = name_format(item, look);
|
|
184
|
+
if (item.version)
|
|
185
|
+
nameStr += ` (${item.version})`;
|
|
186
|
+
// Pad name to max width for alignment
|
|
187
|
+
const nameVisibleLen = string_lengthVisible(nameStr);
|
|
188
|
+
const namePadding = ' '.repeat(Math.max(0, maxNameWidth - nameVisibleLen));
|
|
189
|
+
let line = `${typeChar} ${owner} ${sizeStr} ${dateStr} ${nameStr}${namePadding}`;
|
|
190
|
+
if (item.title) {
|
|
191
|
+
line += ` ${chalk_1.default.greenBright(item.title)}`;
|
|
192
|
+
}
|
|
193
|
+
// Tags, as #tags after the title.
|
|
194
|
+
if (item.tags !== undefined && item.tags.length > 0) {
|
|
195
|
+
line += ` ${chalk_1.default.cyan(item.tags.map((tag) => `#${tag}`).join(' '))}`;
|
|
196
|
+
}
|
|
197
|
+
if (item.type === 'link' && item.target) {
|
|
198
|
+
line += ` -> ${item.target}`;
|
|
199
|
+
}
|
|
200
|
+
return line;
|
|
201
|
+
}).join('\n');
|
|
202
|
+
}
|
|
203
|
+
//# sourceMappingURL=render.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../src/vfs/render.ts"],"names":[],"mappings":";;;;;;AAiEA,kCAMC;AAeD,8CAqBC;AA4CD,kCAmCC;AAWD,k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OAAO,CAAC,CAAC;QAC7D,MAAM,WAAW,GAAW,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,GAAG,cAAc,CAAC,CAAC,CAAC;QAEnF,IAAI,IAAI,GAAW,GAAG,QAAQ,IAAI,KAAK,IAAI,OAAO,IAAI,OAAO,IAAI,OAAO,GAAG,WAAW,EAAE,CAAC;QAEzF,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,IAAI,IAAI,OAAO,eAAK,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACjD,CAAC;QAED,kCAAkC;QAClC,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACpD,IAAI,IAAI,OAAO,eAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAW,EAAU,EAAE,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;QAC3F,CAAC;QAED,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YACxC,IAAI,IAAI,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC;QAC/B,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fnndsc/fond",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "The pieces every layer of mise needs, whatever the backend. Depends on nothing in @fnndsc.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -36,6 +36,9 @@
|
|
|
36
36
|
],
|
|
37
37
|
"author": "Rudolph Pienaar",
|
|
38
38
|
"license": "MIT",
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"chalk": "^4.1.2"
|
|
41
|
+
},
|
|
39
42
|
"devDependencies": {
|
|
40
43
|
"@jest/globals": "^30.2.0",
|
|
41
44
|
"@types/jest": "^30.0.0",
|