@arkstack/common 0.19.0 → 0.19.1
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/dist-DwGScrDq.js +3819 -0
- package/dist/{helpers-CWLBYxS-.d.ts → helpers-O3ZUac1k.d.ts} +10 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/{utils-DbBtlcTv.js → utils-CvlK2sYM.js} +1 -1
- package/package.json +9 -4
|
@@ -263,7 +263,16 @@ type Primitive = string | number | boolean | null | undefined | Function;
|
|
|
263
263
|
type LoggerChalk = keyof ChalkInstance | ChalkInstance | (keyof ChalkInstance)[];
|
|
264
264
|
type LoggerParseSignature = [string, LoggerChalk][];
|
|
265
265
|
type DotPathValue<T, P extends string> = P extends `${infer Head}.${infer Tail}` ? Head extends keyof T ? DotPathValue<T[Head], Tail> : never : P extends keyof T ? T[P] : never;
|
|
266
|
-
|
|
266
|
+
/** Remaining depth for {@link DotPath}: index by the current depth to get the next. */
|
|
267
|
+
type DotPathDepth = [never, 0, 1, 2, 3, 4, 5, 6];
|
|
268
|
+
/** Values {@link DotPath} treats as leaves instead of walking into. */
|
|
269
|
+
type DotPathLeaf = Primitive | Date | RegExp | Promise<unknown> | Map<unknown, unknown> | Set<unknown> | Uint8Array;
|
|
270
|
+
/**
|
|
271
|
+
* Dot-separated key paths of `T`, e.g. `'mail.from.address'`. Bounded in depth
|
|
272
|
+
* so deep or self-referencing library types (mail transports, streams) stay
|
|
273
|
+
* finite instead of being reported as circular.
|
|
274
|
+
*/
|
|
275
|
+
type DotPath<T, Depth extends number = 7> = [Depth] extends [never] ? never : T extends DotPathLeaf ? never : T extends any[] ? never : { [K in keyof T & string]: T[K] extends DotPathLeaf ? `${K}` : T[K] extends any[] ? `${K}` : `${K}` | `${K}.${DotPath<T[K], DotPathDepth[Depth]>}`; }[keyof T & string];
|
|
267
276
|
/**
|
|
268
277
|
* Ouput formater object or format the output
|
|
269
278
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference path="./app.d.ts" />
|
|
2
|
-
import { $ as HookPos, A as SealedBox, B as ConfigShape, C as Encryption, D as KeyPair, E as KeyInput, F as ArkstackErrorShape, G as EnvRegistry, H as DotPathValue, I as Choice, J as GlobalConfig, K as EnvReturn, L as Choices, M as SerializedKeyPair, N as AppConfig, O as Keys, P as ArkstackErrorPayload, Q as HookName, R as Concrete, S as DerivedKey, T as FingerprintOptions, U as EnvKey, V as DotPath, W as EnvLookup, X as HookArgs, Y as GlobalEnv, Z as HookFor, _ as ChannelOptions, a as abort, at as LoggerParseSignature, b as Codec, c as getModel, ct as Primitive, d as isClass, dt as PublishFilter, et as HookPositions, f as normalizePositiveInteger, ft as PublishGroup, g as Hash, h as setModelResolver, i as ModelResolver, it as LoggerLog, j as SecureChannel, k as NodeCipher, l as getModelSync, lt as PublishConfirmation, m as resolvePagination, mt as Logger, n as ModelConstructor, nt as IHook, o as abortIf, ot as MergedConfig, p as perPage, pt as UnionToIntersection, q as FileImporter, r as ModelRegistry, rt as LoggerChalk, s as assertFound, st as PaginationOptions, t as AbstractModelConstructor, tt as HookRegistry, u as initializeGlobalContext, ut as PublishEntry, v as Cipher, w as EncryptionKey, x as DeriveOptions, y as CipherOptions, z as ConfigRegistry } from "./helpers-
|
|
2
|
+
import { $ as HookPos, A as SealedBox, B as ConfigShape, C as Encryption, D as KeyPair, E as KeyInput, F as ArkstackErrorShape, G as EnvRegistry, H as DotPathValue, I as Choice, J as GlobalConfig, K as EnvReturn, L as Choices, M as SerializedKeyPair, N as AppConfig, O as Keys, P as ArkstackErrorPayload, Q as HookName, R as Concrete, S as DerivedKey, T as FingerprintOptions, U as EnvKey, V as DotPath, W as EnvLookup, X as HookArgs, Y as GlobalEnv, Z as HookFor, _ as ChannelOptions, a as abort, at as LoggerParseSignature, b as Codec, c as getModel, ct as Primitive, d as isClass, dt as PublishFilter, et as HookPositions, f as normalizePositiveInteger, ft as PublishGroup, g as Hash, h as setModelResolver, i as ModelResolver, it as LoggerLog, j as SecureChannel, k as NodeCipher, l as getModelSync, lt as PublishConfirmation, m as resolvePagination, mt as Logger, n as ModelConstructor, nt as IHook, o as abortIf, ot as MergedConfig, p as perPage, pt as UnionToIntersection, q as FileImporter, r as ModelRegistry, rt as LoggerChalk, s as assertFound, st as PaginationOptions, t as AbstractModelConstructor, tt as HookRegistry, u as initializeGlobalContext, ut as PublishEntry, v as Cipher, w as EncryptionKey, x as DeriveOptions, y as CipherOptions, z as ConfigRegistry } from "./helpers-O3ZUac1k.js";
|
|
3
3
|
import { Arkstack } from "@arkstack/contract";
|
|
4
4
|
import { ForkOptions } from "node:child_process";
|
|
5
5
|
import pino from "pino";
|
|
@@ -22,7 +22,7 @@ declare const renderError: ({ message, stack, title, code }: {
|
|
|
22
22
|
stack?: string;
|
|
23
23
|
code?: number;
|
|
24
24
|
title?: string;
|
|
25
|
-
}) =>
|
|
25
|
+
}) => string;
|
|
26
26
|
//#endregion
|
|
27
27
|
//#region src/prototypes.d.ts
|
|
28
28
|
declare const loadPrototypes: () => void;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as EnvLoader, a as env, c as nodeEnv, d as resolveRuntimeDir, f as resolveRuntimeModule, g as configLoader, h as ConfigLoader, i as discoverCommands, l as outputDir, m as CONFIG_KEY, n as appUrl, o as importFile, p as toOutputPath, r as config, s as interopDefault, t as appKey, u as rebuildOutput, v as envLoader } from "./system-BH1phDBR.js";
|
|
2
|
-
import { A as SecureChannel, C as Codec, D as Keys, E as KeyPair, O as NodeCipher, S as Cipher, T as EncryptionKey, _ as setModelResolver, b as Exception, c as abortIf, d as getModelSync, f as initializeGlobalContext, g as resolvePagination, h as perPage, k as SealedBox, l as assertFound, m as normalizePositiveInteger, p as isClass, s as abort, u as getModel, v as RequestException, w as Encryption, x as Hash, y as AppException } from "./utils-
|
|
2
|
+
import { A as SecureChannel, C as Codec, D as Keys, E as KeyPair, O as NodeCipher, S as Cipher, T as EncryptionKey, _ as setModelResolver, b as Exception, c as abortIf, d as getModelSync, f as initializeGlobalContext, g as resolvePagination, h as perPage, k as SealedBox, l as assertFound, m as normalizePositiveInteger, p as isClass, s as abort, u as getModel, v as RequestException, w as Encryption, x as Hash, y as AppException } from "./utils-CvlK2sYM.js";
|
|
3
3
|
import { Hook as Hook$1 } from "@arkstack/foundry";
|
|
4
4
|
import { Arkstack } from "@arkstack/contract";
|
|
5
5
|
import { str } from "@h3ravel/support";
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as SealedBox, C as Encryption, D as KeyPair, E as KeyInput, M as SerializedKeyPair, O as Keys, S as DerivedKey, T as FingerprintOptions, _ as ChannelOptions, a as abort, b as Codec, c as getModel, d as isClass, f as normalizePositiveInteger, g as Hash, h as setModelResolver, i as ModelResolver, j as SecureChannel, k as NodeCipher, l as getModelSync, m as resolvePagination, n as ModelConstructor, o as abortIf, p as perPage, r as ModelRegistry, s as assertFound, t as AbstractModelConstructor, u as initializeGlobalContext, v as Cipher, w as EncryptionKey, x as DeriveOptions, y as CipherOptions } from "../helpers-
|
|
1
|
+
import { A as SealedBox, C as Encryption, D as KeyPair, E as KeyInput, M as SerializedKeyPair, O as Keys, S as DerivedKey, T as FingerprintOptions, _ as ChannelOptions, a as abort, b as Codec, c as getModel, d as isClass, f as normalizePositiveInteger, g as Hash, h as setModelResolver, i as ModelResolver, j as SecureChannel, k as NodeCipher, l as getModelSync, m as resolvePagination, n as ModelConstructor, o as abortIf, p as perPage, r as ModelRegistry, s as assertFound, t as AbstractModelConstructor, u as initializeGlobalContext, v as Cipher, w as EncryptionKey, x as DeriveOptions, y as CipherOptions } from "../helpers-O3ZUac1k.js";
|
|
2
2
|
import { Model } from "arkormx";
|
|
3
3
|
//#region src/utils/traits.d.ts
|
|
4
4
|
declare const crc32: (str: string) => number;
|
package/dist/utils/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as SecureChannel, C as Codec, D as Keys, E as KeyPair, O as NodeCipher, S as Cipher, T as EncryptionKey, _ as setModelResolver, a as use, c as abortIf, d as getModelSync, f as initializeGlobalContext, g as resolvePagination, h as perPage, i as trait, k as SealedBox, l as assertFound, m as normalizePositiveInteger, n as crc32, o as uses, p as isClass, r as getTraitMethods, s as abort, t as callTraitMethods, u as getModel, w as Encryption, x as Hash } from "../utils-
|
|
1
|
+
import { A as SecureChannel, C as Codec, D as Keys, E as KeyPair, O as NodeCipher, S as Cipher, T as EncryptionKey, _ as setModelResolver, a as use, c as abortIf, d as getModelSync, f as initializeGlobalContext, g as resolvePagination, h as perPage, i as trait, k as SealedBox, l as assertFound, m as normalizePositiveInteger, n as crc32, o as uses, p as isClass, r as getTraitMethods, s as abort, t as callTraitMethods, u as getModel, w as Encryption, x as Hash } from "../utils-CvlK2sYM.js";
|
|
2
2
|
export { Cipher, Codec, Encryption, EncryptionKey, Hash, KeyPair, Keys, NodeCipher, SealedBox, SecureChannel, abort, abortIf, assertFound, callTraitMethods, crc32, getModel, getModelSync, getTraitMethods, initializeGlobalContext, isClass, normalizePositiveInteger, perPage, resolvePagination, setModelResolver, trait, use, uses };
|
|
@@ -388,7 +388,7 @@ function getModelSync(modelName) {
|
|
|
388
388
|
}
|
|
389
389
|
const initializeGlobalContext = async ({ Request, Response, Session } = {}) => {
|
|
390
390
|
try {
|
|
391
|
-
const { Request: Req, Response: Res, Session: Ses } = await import("
|
|
391
|
+
const { Request: Req, Response: Res, Session: Ses } = await import("./dist-DwGScrDq.js");
|
|
392
392
|
Session ??= new Ses();
|
|
393
393
|
Request ??= new Req();
|
|
394
394
|
Response ??= new Res();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arkstack/common",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Core utilities, primitives, and shared infrastructure for the Arkstack ecosystem.",
|
|
6
6
|
"homepage": "https://arkstack.toneflix.net",
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
"otpauth": "^9.5.1",
|
|
44
44
|
"pino": "^10.3.1",
|
|
45
45
|
"selfsigned": "^2.4.1",
|
|
46
|
-
"@arkstack/encryption": "^0.19.
|
|
46
|
+
"@arkstack/encryption": "^0.19.1"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@h3ravel/support": "^2.2.7",
|
|
50
50
|
"arkormx": "^2.12.8",
|
|
51
|
-
"@arkstack/
|
|
52
|
-
"@arkstack/
|
|
51
|
+
"@arkstack/contract": "^0.19.1",
|
|
52
|
+
"@arkstack/foundry": "^0.19.1"
|
|
53
53
|
},
|
|
54
54
|
"optionalDependencies": {
|
|
55
55
|
"@faker-js/faker": "^10.4.0"
|
|
@@ -59,6 +59,11 @@
|
|
|
59
59
|
"optional": true
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
|
+
"inlinedDependencies": {
|
|
63
|
+
"clear-router": "2.9.3",
|
|
64
|
+
"dayjs": "1.11.20",
|
|
65
|
+
"kanun": "1.2.0"
|
|
66
|
+
},
|
|
62
67
|
"scripts": {
|
|
63
68
|
"build": "tsdown --config-loader unrun",
|
|
64
69
|
"test": "vitest",
|