@shrkcrft/core 0.1.0-alpha.2 → 0.1.0-alpha.21
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/dist/delegate/delegate-recipe.d.ts +54 -0
- package/dist/delegate/delegate-recipe.d.ts.map +1 -0
- package/dist/delegate/delegate-recipe.js +10 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/load/safe-import.d.ts +8 -0
- package/dist/load/safe-import.d.ts.map +1 -1
- package/dist/load/safe-import.js +48 -1
- package/dist/object/object-utils.d.ts.map +1 -1
- package/dist/object/object-utils.js +22 -6
- package/dist/result/errors.d.ts +1 -0
- package/dist/result/errors.d.ts.map +1 -1
- package/dist/result/errors.js +1 -0
- package/package.json +5 -2
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `IDelegateRecipe` contract — a fenced, mechanical task a local-LLM worker
|
|
3
|
+
* may produce edits for (see `shrk delegate`).
|
|
4
|
+
*
|
|
5
|
+
* Lives in `core` (not `config`) so BOTH the config loader AND the pack contract
|
|
6
|
+
* (`@shrkcrft/plugin-api`, which depends only on core) can reference it — a pack
|
|
7
|
+
* ships recipes via `delegateRecipeFiles`, the config declares them inline, and
|
|
8
|
+
* both resolve to this one type.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Routing hints for a delegate recipe (forward-compat; recipes are resolved by
|
|
12
|
+
* explicit `--recipe <id>` today). Kept primitive — no dependency on the
|
|
13
|
+
* higher-layer task router.
|
|
14
|
+
*/
|
|
15
|
+
export interface IDelegateRecipeMatch {
|
|
16
|
+
keywords?: readonly string[];
|
|
17
|
+
fileGlobs?: readonly string[];
|
|
18
|
+
}
|
|
19
|
+
/** A fenced, mechanical task a local-LLM worker may produce edits for. */
|
|
20
|
+
export interface IDelegateRecipe {
|
|
21
|
+
/** Stable id used by `shrk delegate run --recipe <id>`. */
|
|
22
|
+
id: string;
|
|
23
|
+
/** Human-readable label. */
|
|
24
|
+
title?: string;
|
|
25
|
+
/** Optional routing hints (unused by the explicit-`--recipe` path). */
|
|
26
|
+
match?: IDelegateRecipeMatch;
|
|
27
|
+
/**
|
|
28
|
+
* Allow-list of globs the worker may touch. A target path matching NONE of
|
|
29
|
+
* these is refused before any write — the worker's blast radius is fenced.
|
|
30
|
+
*/
|
|
31
|
+
guardrailGlobs: readonly string[];
|
|
32
|
+
/**
|
|
33
|
+
* `IPlannedOperation` kinds the worker may emit (e.g. `'export'`,
|
|
34
|
+
* `'ensure-import'`). An op of any other kind is dropped, never applied.
|
|
35
|
+
*/
|
|
36
|
+
allowedOps: readonly string[];
|
|
37
|
+
/** Local provider preference; defaults to the delegation block / `'auto'`. */
|
|
38
|
+
provider?: 'auto' | 'ollama' | 'llamacpp';
|
|
39
|
+
/** Model id passed to the provider. */
|
|
40
|
+
model?: string;
|
|
41
|
+
/** Max generate→verify attempts before escalating to a human. Default 2. */
|
|
42
|
+
maxAttempts?: number;
|
|
43
|
+
/** Per-attempt wall-clock budget (ms) for the model call. */
|
|
44
|
+
maxBudgetMs?: number;
|
|
45
|
+
/** Refuse delegation when the task risk exceeds this ceiling. */
|
|
46
|
+
riskCeiling?: 'low' | 'medium';
|
|
47
|
+
/**
|
|
48
|
+
* Deterministic verification ids run after the edit lands. Each MUST resolve
|
|
49
|
+
* to a `verificationCommands[].id` — this is the only way a recipe runs a
|
|
50
|
+
* verify command (a pack can never inject executable shell).
|
|
51
|
+
*/
|
|
52
|
+
verificationIds: readonly string[];
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=delegate-recipe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delegate-recipe.d.ts","sourceRoot":"","sources":["../../src/delegate/delegate-recipe.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC/B;AAED,0EAA0E;AAC1E,MAAM,WAAW,eAAe;IAC9B,2DAA2D;IAC3D,EAAE,EAAE,MAAM,CAAC;IACX,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,KAAK,CAAC,EAAE,oBAAoB,CAAC;IAC7B;;;OAGG;IACH,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC;;;OAGG;IACH,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC;IAC1C,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iEAAiE;IACjE,WAAW,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC/B;;;;OAIG;IACH,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `IDelegateRecipe` contract — a fenced, mechanical task a local-LLM worker
|
|
3
|
+
* may produce edits for (see `shrk delegate`).
|
|
4
|
+
*
|
|
5
|
+
* Lives in `core` (not `config`) so BOTH the config loader AND the pack contract
|
|
6
|
+
* (`@shrkcrft/plugin-api`, which depends only on core) can reference it — a pack
|
|
7
|
+
* ships recipes via `delegateRecipeFiles`, the config declares them inline, and
|
|
8
|
+
* both resolve to this one type.
|
|
9
|
+
*/
|
|
10
|
+
export {};
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -17,5 +17,13 @@ export interface ISafeImportOptions {
|
|
|
17
17
|
skipExistsCheck?: boolean;
|
|
18
18
|
}
|
|
19
19
|
export declare const DEFAULT_SAFE_IMPORT_TIMEOUT_MS = 8000;
|
|
20
|
+
/**
|
|
21
|
+
* Bun-or-jiti-aware dynamic import. Use this anywhere the engine needs to
|
|
22
|
+
* load a user-authored TypeScript file (config, knowledge, boundaries,
|
|
23
|
+
* pipelines, etc.) from an absolute path. Falls back to native `import()`
|
|
24
|
+
* for `.js` / `.mjs` so library consumers without TypeScript files pay
|
|
25
|
+
* nothing.
|
|
26
|
+
*/
|
|
27
|
+
export declare function importModuleViaLoader<T = Record<string, unknown>>(filePath: string): Promise<T>;
|
|
20
28
|
export declare function safeImport<T = Record<string, unknown>>(filePath: string, options?: ISafeImportOptions): Promise<SafeImportResult<T>>;
|
|
21
29
|
//# sourceMappingURL=safe-import.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"safe-import.d.ts","sourceRoot":"","sources":["../../src/load/safe-import.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,kBAAkB,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC7D,EAAE,EAAE,IAAI,CAAC;IACT,MAAM,EAAE,CAAC,CAAC;IACV,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,KAAK,CAAC;IACV,KAAK,EAAE,KAAK,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,MAAM,gBAAgB,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IACpD,kBAAkB,CAAC,CAAC,CAAC,GACrB,kBAAkB,CAAC;AAEvB,MAAM,WAAW,kBAAkB;IACjC,+DAA+D;IAC/D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,eAAO,MAAM,8BAA8B,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"safe-import.d.ts","sourceRoot":"","sources":["../../src/load/safe-import.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,kBAAkB,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC7D,EAAE,EAAE,IAAI,CAAC;IACT,MAAM,EAAE,CAAC,CAAC;IACV,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,KAAK,CAAC;IACV,KAAK,EAAE,KAAK,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,MAAM,gBAAgB,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IACpD,kBAAkB,CAAC,CAAC,CAAC,GACrB,kBAAkB,CAAC;AAEvB,MAAM,WAAW,kBAAkB;IACjC,+DAA+D;IAC/D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,eAAO,MAAM,8BAA8B,OAAO,CAAC;AAsCnD;;;;;;GAMG;AACH,wBAAsB,qBAAqB,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACrE,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,CAAC,CAAC,CAQZ;AAED,wBAAsB,UAAU,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC1D,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CA+C9B"}
|
package/dist/load/safe-import.js
CHANGED
|
@@ -9,6 +9,53 @@ var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExte
|
|
|
9
9
|
import { existsSync } from 'node:fs';
|
|
10
10
|
import { pathToFileURL } from 'node:url';
|
|
11
11
|
export const DEFAULT_SAFE_IMPORT_TIMEOUT_MS = 8000;
|
|
12
|
+
// Bun reads TypeScript natively. Node does not (Node 22+ has experimental
|
|
13
|
+
// strip-types, but it is gated on a flag). When running on Node, route
|
|
14
|
+
// every `.ts` / `.tsx` / `.mts` / `.cts` import through jiti so dist-mode
|
|
15
|
+
// CLI invocations (`npx shrk …`) can load user-authored TypeScript config
|
|
16
|
+
// files (`sharkcraft.config.ts`, `sharkcraft/boundaries.ts`, etc.).
|
|
17
|
+
const isBun = typeof globalThis.Bun !== 'undefined' &&
|
|
18
|
+
globalThis.Bun?.version !== undefined;
|
|
19
|
+
const TS_FILE_RE = /\.(ts|tsx|mts|cts)$/i;
|
|
20
|
+
let jitiInstance = null;
|
|
21
|
+
let jitiLoadAttempted = false;
|
|
22
|
+
async function getJiti() {
|
|
23
|
+
if (jitiInstance)
|
|
24
|
+
return jitiInstance;
|
|
25
|
+
if (jitiLoadAttempted)
|
|
26
|
+
return null;
|
|
27
|
+
jitiLoadAttempted = true;
|
|
28
|
+
try {
|
|
29
|
+
const mod = (await import('jiti'));
|
|
30
|
+
const factory = mod.createJiti ?? mod.default;
|
|
31
|
+
if (typeof factory !== 'function')
|
|
32
|
+
return null;
|
|
33
|
+
jitiInstance = factory(pathToFileURL(import.meta.url).href, {
|
|
34
|
+
interopDefault: false,
|
|
35
|
+
});
|
|
36
|
+
return jitiInstance;
|
|
37
|
+
}
|
|
38
|
+
catch {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Bun-or-jiti-aware dynamic import. Use this anywhere the engine needs to
|
|
44
|
+
* load a user-authored TypeScript file (config, knowledge, boundaries,
|
|
45
|
+
* pipelines, etc.) from an absolute path. Falls back to native `import()`
|
|
46
|
+
* for `.js` / `.mjs` so library consumers without TypeScript files pay
|
|
47
|
+
* nothing.
|
|
48
|
+
*/
|
|
49
|
+
export async function importModuleViaLoader(filePath) {
|
|
50
|
+
if (!isBun && TS_FILE_RE.test(filePath)) {
|
|
51
|
+
const jiti = await getJiti();
|
|
52
|
+
if (jiti)
|
|
53
|
+
return (await jiti.import(filePath));
|
|
54
|
+
// Fall through to native import — Node 22+ with --experimental-strip-types
|
|
55
|
+
// can still resolve, otherwise the error surfaces to the caller.
|
|
56
|
+
}
|
|
57
|
+
return (await import(__rewriteRelativeImportExtension(pathToFileURL(filePath).href)));
|
|
58
|
+
}
|
|
12
59
|
export async function safeImport(filePath, options = {}) {
|
|
13
60
|
const timeoutMs = options.timeoutMs ?? DEFAULT_SAFE_IMPORT_TIMEOUT_MS;
|
|
14
61
|
const start = Date.now();
|
|
@@ -36,7 +83,7 @@ export async function safeImport(filePath, options = {}) {
|
|
|
36
83
|
});
|
|
37
84
|
const importPromise = (async () => {
|
|
38
85
|
try {
|
|
39
|
-
const mod =
|
|
86
|
+
const mod = await importModuleViaLoader(filePath);
|
|
40
87
|
return { ok: true, module: mod, elapsedMs: Date.now() - start };
|
|
41
88
|
}
|
|
42
89
|
catch (e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-utils.d.ts","sourceRoot":"","sources":["../../src/object/object-utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CASnD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAI9E;
|
|
1
|
+
{"version":3,"file":"object-utils.d.ts","sourceRoot":"","sources":["../../src/object/object-utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CASnD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAI9E;AAiBD,wBAAgB,KAAK,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACxF,CAAC,EAAE,CAAC,EACJ,CAAC,EAAE,CAAC,GACH,CAAC,GAAG,CAAC,CAYP;AAED,wBAAgB,IAAI,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAUhG;AAED,wBAAgB,IAAI,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAShG;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAW9E;AAED,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,EAClD,KAAK,EAAE,SAAS,CAAC,EAAE,EACnB,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GACpB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAOhB"}
|
|
@@ -15,16 +15,29 @@ export function isPlainObject(value) {
|
|
|
15
15
|
const proto = Object.getPrototypeOf(value);
|
|
16
16
|
return proto === null || proto === Object.prototype;
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Assign an own enumerable data property. Plain `target[key] = value` invokes
|
|
20
|
+
* the `Object.prototype.__proto__` setter for a key literally equal to
|
|
21
|
+
* `"__proto__"` (a real own key after `JSON.parse`), which silently drops the
|
|
22
|
+
* value (or pollutes the prototype) — so build these objects via defineProperty.
|
|
23
|
+
*/
|
|
24
|
+
function setOwn(target, key, value) {
|
|
25
|
+
Object.defineProperty(target, key, { value, writable: true, enumerable: true, configurable: true });
|
|
26
|
+
}
|
|
27
|
+
/** Read an OWN property value (returns undefined when the key isn't an own prop). */
|
|
28
|
+
function getOwn(obj, key) {
|
|
29
|
+
return Object.prototype.hasOwnProperty.call(obj, key) ? obj[key] : undefined;
|
|
30
|
+
}
|
|
18
31
|
export function merge(a, b) {
|
|
19
32
|
const result = { ...a };
|
|
20
33
|
for (const key of Object.keys(b)) {
|
|
21
|
-
const av = result
|
|
34
|
+
const av = getOwn(result, key);
|
|
22
35
|
const bv = b[key];
|
|
23
36
|
if (isPlainObject(av) && isPlainObject(bv)) {
|
|
24
|
-
result
|
|
37
|
+
setOwn(result, key, merge(av, bv));
|
|
25
38
|
}
|
|
26
39
|
else if (bv !== undefined) {
|
|
27
|
-
result
|
|
40
|
+
setOwn(result, key, bv);
|
|
28
41
|
}
|
|
29
42
|
}
|
|
30
43
|
return result;
|
|
@@ -32,8 +45,11 @@ export function merge(a, b) {
|
|
|
32
45
|
export function pick(obj, keys) {
|
|
33
46
|
const result = {};
|
|
34
47
|
for (const key of keys) {
|
|
35
|
-
|
|
36
|
-
|
|
48
|
+
// Own-property check (not `key in obj`, which walks the prototype chain, so
|
|
49
|
+
// pick(obj, ['toString']) would otherwise copy the inherited function).
|
|
50
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
51
|
+
setOwn(result, key, obj[key]);
|
|
52
|
+
}
|
|
37
53
|
}
|
|
38
54
|
return result;
|
|
39
55
|
}
|
|
@@ -42,7 +58,7 @@ export function omit(obj, keys) {
|
|
|
42
58
|
const result = {};
|
|
43
59
|
for (const key of Object.keys(obj)) {
|
|
44
60
|
if (!keySet.has(key)) {
|
|
45
|
-
result
|
|
61
|
+
setOwn(result, key, obj[key]);
|
|
46
62
|
}
|
|
47
63
|
}
|
|
48
64
|
return result;
|
package/dist/result/errors.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export declare const ERROR_CODES: {
|
|
|
20
20
|
readonly FILE_WRITE_ERROR: "SHRK_FILE_WRITE_ERROR";
|
|
21
21
|
readonly LOADER_ERROR: "SHRK_LOADER_ERROR";
|
|
22
22
|
readonly IO_ERROR: "SHRK_IO_ERROR";
|
|
23
|
+
readonly TIMEOUT: "SHRK_TIMEOUT";
|
|
23
24
|
};
|
|
24
25
|
export type ErrorCode = (typeof ERROR_CODES)[keyof typeof ERROR_CODES];
|
|
25
26
|
export interface AppError extends Error {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/result/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/result/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;CAuBd,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAEvE,MAAM,WAAW,QAAS,SAAQ,KAAK;IACrC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;IACvD,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1C;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,qBAAa,YAAa,SAAQ,KAAM,YAAW,QAAQ;IACzD,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;IACvD,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;gBAE7B,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,eAAoB;IAQ3E,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CASlC;AAED,wBAAgB,SAAS,CACvB,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,eAAoB,GAC5B,QAAQ,CAEV"}
|
package/dist/result/errors.js
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shrkcrft/core",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.21",
|
|
4
4
|
"description": "SharkCraft core primitives: Result, AppError, logger, file-system abstraction, path/string/object utils, IDs.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "SharkCraft contributors",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "./dist/index.js",
|
|
9
|
-
"types": "./dist/index.d.
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
12
|
"types": "./dist/index.d.ts",
|
|
@@ -43,6 +43,9 @@
|
|
|
43
43
|
"scripts": {
|
|
44
44
|
"typecheck": "tsc --noEmit -p tsconfig.json"
|
|
45
45
|
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"jiti": "^2.7.0"
|
|
48
|
+
},
|
|
46
49
|
"publishConfig": {
|
|
47
50
|
"access": "public"
|
|
48
51
|
}
|