@t4h.framework/dev 0.0.0-experimental-20261008135920 → 0.0.0-experimental-29d0277
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/CHANGELOG.md +0 -68
- package/LICENSE +21 -0
- package/dist/models/claims/DevWorkflowClaim.d.ts +1 -1
- package/dist/models/claims/DevWorkflowClaim.js +2 -3
- package/dist/models/claims/DevWorkflowClaim.js.map +1 -1
- package/dist/tools/runtime-registry.d.ts +2 -0
- package/dist/tools/runtime-registry.js.map +1 -1
- package/dist/tools/start-runtime-monitor.d.ts +2 -1
- package/dist/tools/start-runtime-monitor.js +2 -1
- package/dist/tools/start-runtime-monitor.js.map +1 -1
- package/dist/use-cases/BuildWorkflowRunActivityHistory.usecase.js +7 -1
- package/dist/use-cases/BuildWorkflowRunActivityHistory.usecase.js.map +1 -1
- package/package.json +24 -24
package/CHANGELOG.md
CHANGED
|
@@ -1,73 +1,5 @@
|
|
|
1
1
|
# @t4h.framework/dev
|
|
2
2
|
|
|
3
|
-
## 0.0.0-experimental-20261008135920
|
|
4
|
-
|
|
5
|
-
### Minor Changes
|
|
6
|
-
|
|
7
|
-
- [#208](https://github.com/tech4humans-brasil/framework/pull/208) [`c312bfb`](https://github.com/tech4humans-brasil/framework/commit/c312bfb0f1b1ddbc40d8ac0ede113c5614aa9df8) Thanks [@tony-tsx](https://github.com/tony-tsx)! - `framework workflows` lists, describes and runs the workflows of the app from
|
|
8
|
-
the terminal, without the dev server: `framework workflows <workflow> run
|
|
9
|
-
--input '<json>'` builds the project, runs the workflow, waits for it
|
|
10
|
-
(`--timeout`) and prints the run as JSON — with the activities, logs and child
|
|
11
|
-
runs under `--trace`. It exits with `0` when the run fulfills, `1` when it is
|
|
12
|
-
rejected or the command fails, and `2` on timeout, so scripts and AI agents can
|
|
13
|
-
test workflows headlessly.
|
|
14
|
-
|
|
15
|
-
`@t4h.framework/dev` exports `HeadlessApp`, the API behind it, and the app
|
|
16
|
-
process resolves its bundle root from `file:` URLs.
|
|
17
|
-
|
|
18
|
-
- [#210](https://github.com/tech4humans-brasil/framework/pull/210) [`a93218a`](https://github.com/tech4humans-brasil/framework/commit/a93218ae284d91de7d94a65e8f306ace0db2d733) Thanks [@tony-tsx](https://github.com/tony-tsx)! - The dev ORM claim can store its rows in Postgres instead of `db.sqlite`:
|
|
19
|
-
set `orm: { connectionString: 'postgres://…' }` in `framework.config.ts`.
|
|
20
|
-
Workers write in parallel instead of waiting on the SQLite file lock, each one
|
|
21
|
-
with its own connection pool, and updates lock their row so concurrent updates
|
|
22
|
-
merge. Each entity gets an `(id text, data jsonb)` table, created on first use;
|
|
23
|
-
`where`, `orderBy` and pagination behave as on SQLite. Without the setting
|
|
24
|
-
nothing changes, and the `connectionString` passed to `new ORM()` is still
|
|
25
|
-
ignored in dev.
|
|
26
|
-
|
|
27
|
-
- [#207](https://github.com/tech4humans-brasil/framework/pull/207) [`92db468`](https://github.com/tech4humans-brasil/framework/commit/92db468f819d3c7d01884526598acd5fbef9b4ef) Thanks [@tony-tsx](https://github.com/tony-tsx)! - Workflows run asynchronously on a pool of worker threads. Starting a run,
|
|
28
|
-
delivering a callback, advancing an activity, a timeout and the settlement of a
|
|
29
|
-
parent run only queue work; a scheduler runs it with at most one step per run
|
|
30
|
-
at a time, keeps each run on the worker that started it and serves callbacks
|
|
31
|
-
ahead of background work. `advance` and callbacks still return the status of
|
|
32
|
-
the activity, but no longer wait for the rest of the workflow.
|
|
33
|
-
|
|
34
|
-
The pool defaults to the available CPUs minus one, 4 jobs per worker, and is set
|
|
35
|
-
with `runtime: { workers, concurrency }` in `framework.config.ts` (`workers: 0`
|
|
36
|
-
keeps everything on the app thread). The runtime database moves to a temporary
|
|
37
|
-
SQLite file in WAL mode shared by the workers, and the dev `CacheClaim` is
|
|
38
|
-
stored there so every worker sees the same cache. A worker that dies rejects
|
|
39
|
-
the runs it held and is replaced.
|
|
40
|
-
|
|
41
|
-
- [#210](https://github.com/tech4humans-brasil/framework/pull/210) [`990c074`](https://github.com/tech4humans-brasil/framework/commit/990c074af498cb7610d310e295ad613dce7a9b52) Thanks [@tony-tsx](https://github.com/tony-tsx)! - The dev runtime publishes what it runs: jobs queued, started and finished
|
|
42
|
-
(with the queue counts), runs created and settled, activities started, waiting
|
|
43
|
-
and settled (with the error of a rejected one), timeouts and lost workers.
|
|
44
|
-
- `--debug` on `framework dev` and `framework workflows <workflow> run` prints
|
|
45
|
-
those events on stderr; `--debug-log <file>` appends them to a file as NDJSON.
|
|
46
|
-
- Every app process registers itself and listens on a local socket (named pipe
|
|
47
|
-
on Windows). `framework runtime ls` lists them, `framework runtime status`
|
|
48
|
-
prints the queue, the jobs running and waiting and the runs in progress, and
|
|
49
|
-
`framework runtime watch` follows the events live (`--json` for NDJSON),
|
|
50
|
-
reconnecting across `dev` rebuilds.
|
|
51
|
-
|
|
52
|
-
`@t4h.framework/dev` exports `listRuntimes`, `requestRuntimeStatus`,
|
|
53
|
-
`watchRuntime` and `formatRuntimeEvent`, and takes `debugLog` on `Server` and
|
|
54
|
-
`HeadlessApp.up`.
|
|
55
|
-
|
|
56
|
-
## 0.22.6
|
|
57
|
-
|
|
58
|
-
### Patch Changes
|
|
59
|
-
|
|
60
|
-
- [#214](https://github.com/tech4humans-brasil/framework/pull/214) [`fc4db5f`](https://github.com/tech4humans-brasil/framework/commit/fc4db5fa01454a45a3727b76dbacc215aa6b3ab7) Thanks [@gusteycamargo](https://github.com/gusteycamargo)! - `WorkflowClaim.startMany` accepts its inputs as an `Iterable` or an
|
|
61
|
-
`AsyncIterable`, not only an array. The runtime reads them once, as a stream,
|
|
62
|
-
so a batch no longer has to fit in memory before its first child starts.
|
|
63
|
-
|
|
64
|
-
## 0.22.5
|
|
65
|
-
|
|
66
|
-
### Patch Changes
|
|
67
|
-
|
|
68
|
-
- Updated dependencies [[`8f50cc5`](https://github.com/tech4humans-brasil/framework/commit/8f50cc5c494fd76b08536a08da397d2255d47d31)]:
|
|
69
|
-
- @t4h.framework/vite-panel-plugin@0.4.0
|
|
70
|
-
|
|
71
3
|
## 0.22.4
|
|
72
4
|
|
|
73
5
|
## 0.22.3
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Tech for humans
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -4,5 +4,5 @@ export declare class DevWorkflowClaim extends WorkflowClaim {
|
|
|
4
4
|
private readonly context;
|
|
5
5
|
constructor(context: RuntimeContextService);
|
|
6
6
|
start<TWorkflow extends Workflow<any, any>>(workflow: TWorkflow | string, input?: WorkflowInput<TWorkflow>): Promise<Serializable>;
|
|
7
|
-
startMany<TWorkflow extends Workflow<any, any>>(workflow: TWorkflow | string, inputs:
|
|
7
|
+
startMany<TWorkflow extends Workflow<any, any>>(workflow: TWorkflow | string, inputs: WorkflowInput<TWorkflow>[] | Binary[]): Promise<WorkflowBatchCollectionRef>;
|
|
8
8
|
}
|
|
@@ -37,12 +37,11 @@ let DevWorkflowClaim = class DevWorkflowClaim extends WorkflowClaim {
|
|
|
37
37
|
if (!parentContext?.activityId)
|
|
38
38
|
throw new Error('Could not start a batch outside of an activity context');
|
|
39
39
|
const workflowRun = container.resolve(WorkflowRunFacade);
|
|
40
|
-
|
|
41
|
-
await workflowRun.createMany(workflowId, items, {
|
|
40
|
+
await workflowRun.createMany(workflowId, inputs, {
|
|
42
41
|
parentWorkflowRunId: parentContext.runId,
|
|
43
42
|
parentWorkflowRunActivityId: parentContext.activityId,
|
|
44
43
|
});
|
|
45
|
-
return new WorkflowBatchCollectionRef(parentContext.activityId,
|
|
44
|
+
return new WorkflowBatchCollectionRef(parentContext.activityId, inputs.length);
|
|
46
45
|
}
|
|
47
46
|
};
|
|
48
47
|
DevWorkflowClaim = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DevWorkflowClaim.js","sourceRoot":"","sources":["../../../src/models/claims/DevWorkflowClaim.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,0BAA0B,EAC1B,aAAa,GAKd,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAA;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAA;AAGxE,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,aAAa;IAG9B;IAFnB,YAEmB,OAA8B;QAE/C,KAAK,EAAE,CAAA;QAFU,YAAO,GAAP,OAAO,CAAuB;IAGjD,CAAC;IAEM,KAAK,CAAC,KAAK,CAChB,QAA4B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Y,gBAAgB;IAD5B,UAAU,EAAE;IAGR,WAAA,MAAM,CAAC,GAAG,EAAE,CAAC,qBAAqB,CAAC,CAAA;GAF3B,gBAAgB,CAuD5B"}
|
|
@@ -10,6 +10,8 @@ export interface RuntimeInfo {
|
|
|
10
10
|
entrypoint: string;
|
|
11
11
|
socket: string;
|
|
12
12
|
startedAt: string;
|
|
13
|
+
/** HTTP URL of the dev server; null headless, absent before 0.23. */
|
|
14
|
+
serverUrl?: string | null;
|
|
13
15
|
}
|
|
14
16
|
export interface RuntimeStatus {
|
|
15
17
|
runtime: RuntimeInfo;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-registry.js","sourceRoot":"","sources":["../../src/tools/runtime-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"runtime-registry.js","sourceRoot":"","sources":["../../src/tools/runtime-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;AA0B5B,+DAA+D;AAC/D,MAAM,UAAU,kBAAkB;IAChC,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,eAAe,EAAE,UAAU,CAAC,CAAA;AAC5D,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,GAAW;IAC7C,OAAO,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,GAAG,GAAG,OAAO,CAAC,CAAA;AACvD,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,GAAW;IAC3C,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO;QAC9B,OAAO,sCAAsC,GAAG,EAAE,CAAA;IAEpD,OAAO,IAAI,CAAC,IAAI,CAAC,kBA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EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;QAE3C,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO;YAC9B,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;IACtD,CAAC;IAED,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAA;AACxE,CAAC"}
|
|
@@ -3,10 +3,11 @@ export interface RuntimeMonitorOptions {
|
|
|
3
3
|
kind: RuntimeKind;
|
|
4
4
|
projectDir: string | null;
|
|
5
5
|
entrypoint: string;
|
|
6
|
+
serverUrl?: string | null;
|
|
6
7
|
/** `-` (stderr), a file path (NDJSON) or `null` for no debug log. */
|
|
7
8
|
debugLog: string | null;
|
|
8
9
|
}
|
|
9
10
|
/** Turns run events into runtime events and opens the debug log. */
|
|
10
11
|
export declare function startRuntimeEvents(debugLog: string | null): void;
|
|
11
12
|
/** Registers this app process so `framework runtime` can find and watch it. */
|
|
12
|
-
export declare function startRuntimeControl({ kind, projectDir, entrypoint, }: Omit<RuntimeMonitorOptions, 'debugLog'>): Promise<void>;
|
|
13
|
+
export declare function startRuntimeControl({ kind, projectDir, entrypoint, serverUrl, }: Omit<RuntimeMonitorOptions, 'debugLog'>): Promise<void>;
|
|
@@ -36,7 +36,7 @@ export function startRuntimeEvents(debugLog) {
|
|
|
36
36
|
process.once('exit', () => log.close());
|
|
37
37
|
}
|
|
38
38
|
/** Registers this app process so `framework runtime` can find and watch it. */
|
|
39
|
-
export async function startRuntimeControl({ kind, projectDir, entrypoint, }) {
|
|
39
|
+
export async function startRuntimeControl({ kind, projectDir, entrypoint, serverUrl = null, }) {
|
|
40
40
|
const scheduler = container.resolve(WorkflowRunSchedulerService);
|
|
41
41
|
const info = {
|
|
42
42
|
pid: process.pid,
|
|
@@ -46,6 +46,7 @@ export async function startRuntimeControl({ kind, projectDir, entrypoint, }) {
|
|
|
46
46
|
entrypoint,
|
|
47
47
|
socket: runtimeSocketPath(process.pid),
|
|
48
48
|
startedAt: new Date().toISOString(),
|
|
49
|
+
serverUrl,
|
|
49
50
|
};
|
|
50
51
|
const control = new RuntimeControlServer(info, async () => ({
|
|
51
52
|
runtime: info,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start-runtime-monitor.js","sourceRoot":"","sources":["../../src/tools/start-runtime-monitor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEnC,OAAO,EACL,iBAAiB,GAGlB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAA;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAA;AAC3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAA;AACnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAA;AAC5E,OAAO,EAAE,2BAA2B,EAAE,MAAM,6CAA6C,CAAA;
|
|
1
|
+
{"version":3,"file":"start-runtime-monitor.js","sourceRoot":"","sources":["../../src/tools/start-runtime-monitor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEnC,OAAO,EACL,iBAAiB,GAGlB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAA;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,EAAE,oBAAoB,EAAE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CAAC;QACf,OAAO,CAAC,IAAI,CACV,SAAS,CAAC,QAAQ,EAAE,uCAAuC,EAAE;YAC3D,MAAM,EAAE,OAAO,CAAC,MAAM;SACvB,CAAC,EACF,KAAK,CACN,CAAA;IACH,CAAC;AACH,CAAC"}
|
|
@@ -21,7 +21,12 @@ let BuildWorkflowRunActivityHistory = class BuildWorkflowRunActivityHistory {
|
|
|
21
21
|
const activities = await this.workflowRunActivityRepository.findByRunId(runId);
|
|
22
22
|
return Promise.all(activities.map(async (activity) => {
|
|
23
23
|
if (activity.kind === 'sync')
|
|
24
|
-
return {
|
|
24
|
+
return {
|
|
25
|
+
id: activity.id,
|
|
26
|
+
type: 'sync',
|
|
27
|
+
output: activity.output,
|
|
28
|
+
activity: activity.type,
|
|
29
|
+
};
|
|
25
30
|
const lastPending = await this.workflowRunAsyncActivityPendingRepository.findLastByActivityId(activity.id);
|
|
26
31
|
if (!lastPending)
|
|
27
32
|
throw new Error(`Last pending not found for async activity: ${activity.id}`);
|
|
@@ -31,6 +36,7 @@ let BuildWorkflowRunActivityHistory = class BuildWorkflowRunActivityHistory {
|
|
|
31
36
|
status: lastPending.status,
|
|
32
37
|
output: activity.output,
|
|
33
38
|
timeoutAt: lastPending.timeoutAt ?? null,
|
|
39
|
+
activity: activity.type,
|
|
34
40
|
};
|
|
35
41
|
}));
|
|
36
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BuildWorkflowRunActivityHistory.usecase.js","sourceRoot":"","sources":["../../src/use-cases/BuildWorkflowRunActivityHistory.usecase.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAE5C,OAAO,EAAE,6BAA6B,EAAE,MAAM,mDAAmD,CAAA;AACjG,OAAO,EAAE,yCAAyC,EAAE,MAAM,+DAA+D,CAAA;AAGlH,IAAM,+BAA+B,GAArC,MAAM,+BAA+B;IAGvB;IAGA;IALnB,YAEmB,6B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QAAQ,CAAC,MAAM;oBACvB,QAAQ,EAAE,QAAQ,CAAC,IAAI;iBACxB,CAAA;YAEH,MAAM,WAAW,GACf,MAAM,IAAI,CAAC,yCAAyC,CAAC,oBAAoB,CACvE,QAAQ,CAAC,EAAE,CACZ,CAAA;YAEH,IAAI,CAAC,WAAW;gBACd,MAAM,IAAI,KAAK,CACb,8CAA8C,QAAQ,CAAC,EAAE,EAAE,CAC5D,CAAA;YAEH,OAAO;gBACL,EAAE,EAAE,QAAQ,CAAC,EAAE;gBACf,IAAI,EAAE,OAAO;gBACb,MAAM,EAAE,WAAW,CAAC,MAAM;gBAC1B,MAAM,EAAE,QAAQ,CAAC,MAAM;gBACvB,SAAS,EAAE,WAAW,CAAC,SAAS,IAAI,IAAI;gBACxC,QAAQ,EAAE,QAAQ,CAAC,IAAI;aACxB,CAAA;QACH,CAAC,CAAC,CACH,CAAA;IACH,CAAC;CACF,CAAA;AA5CY,+BAA+B;IAD3C,UAAU,EAAE;IAGR,WAAA,MAAM,CAAC,GAAG,EAAE,CAAC,6BAA6B,CAAC,CAAA;IAG3C,WAAA,MAAM,CAAC,GAAG,EAAE,CAAC,yCAAyC,CAAC,CAAA;GAL/C,+BAA+B,CA4C3C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@t4h.framework/dev",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-29d0277",
|
|
4
4
|
"description": "Dev server for the T4H Framework",
|
|
5
5
|
"homepage": "https://github.com/tech4humans-brasil/framework/tree/main/packages/dev",
|
|
6
6
|
"bugs": "https://github.com/tech4humans-brasil/framework/issues",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@hono/node-server": "^2.1.1",
|
|
46
|
-
"@t4h.framework/vite-panel-plugin": "^0.
|
|
46
|
+
"@t4h.framework/vite-panel-plugin": "^0.3.1",
|
|
47
47
|
"ajv": "^8.18.0",
|
|
48
48
|
"dot-object": "^2.1.5",
|
|
49
49
|
"hono": "^4.13.5",
|
|
@@ -60,18 +60,18 @@
|
|
|
60
60
|
"vite": "^8.0.3"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@t4h.framework/cache": "^0.
|
|
64
|
-
"@t4h.framework/core": "^0.
|
|
65
|
-
"@t4h.framework/fs": "^0.
|
|
66
|
-
"@t4h.framework/hmac": "^0.
|
|
67
|
-
"@t4h.framework/http": "^0.
|
|
68
|
-
"@t4h.framework/jwks": "^0.
|
|
69
|
-
"@t4h.framework/oidc": "^0.
|
|
70
|
-
"@t4h.framework/orm": "^0.
|
|
63
|
+
"@t4h.framework/cache": "^0.0.0-experimental-29d0277",
|
|
64
|
+
"@t4h.framework/core": "^0.0.0-experimental-29d0277",
|
|
65
|
+
"@t4h.framework/fs": "^0.0.0-experimental-29d0277",
|
|
66
|
+
"@t4h.framework/hmac": "^0.0.0-experimental-29d0277",
|
|
67
|
+
"@t4h.framework/http": "^0.0.0-experimental-29d0277",
|
|
68
|
+
"@t4h.framework/jwks": "^0.0.0-experimental-29d0277",
|
|
69
|
+
"@t4h.framework/oidc": "^0.0.0-experimental-29d0277",
|
|
70
|
+
"@t4h.framework/orm": "^0.0.0-experimental-29d0277",
|
|
71
71
|
"@t4h.framework/runtime-claims": "^0.1.0",
|
|
72
|
-
"@t4h.framework/sftp": "^0.
|
|
73
|
-
"@t4h.framework/smtp": "^0.
|
|
74
|
-
"@t4h.framework/webhook": "^0.
|
|
72
|
+
"@t4h.framework/sftp": "^0.0.0-experimental-29d0277",
|
|
73
|
+
"@t4h.framework/smtp": "^0.0.0-experimental-29d0277",
|
|
74
|
+
"@t4h.framework/webhook": "^0.0.0-experimental-29d0277",
|
|
75
75
|
"@types/dot-object": "^2.1.6",
|
|
76
76
|
"@types/json-schema": "^7.0.15",
|
|
77
77
|
"@types/mime-types": "^3",
|
|
@@ -83,18 +83,18 @@
|
|
|
83
83
|
"vitest": "^4.0.18"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
|
-
"@t4h.framework/cache": "
|
|
87
|
-
"@t4h.framework/core": "
|
|
88
|
-
"@t4h.framework/fs": "
|
|
89
|
-
"@t4h.framework/hmac": "
|
|
90
|
-
"@t4h.framework/http": "
|
|
91
|
-
"@t4h.framework/jwks": "
|
|
92
|
-
"@t4h.framework/oidc": "
|
|
93
|
-
"@t4h.framework/orm": "
|
|
86
|
+
"@t4h.framework/cache": "0.0.0-experimental-29d0277",
|
|
87
|
+
"@t4h.framework/core": "0.0.0-experimental-29d0277",
|
|
88
|
+
"@t4h.framework/fs": "0.0.0-experimental-29d0277",
|
|
89
|
+
"@t4h.framework/hmac": "0.0.0-experimental-29d0277",
|
|
90
|
+
"@t4h.framework/http": "0.0.0-experimental-29d0277",
|
|
91
|
+
"@t4h.framework/jwks": "0.0.0-experimental-29d0277",
|
|
92
|
+
"@t4h.framework/oidc": "0.0.0-experimental-29d0277",
|
|
93
|
+
"@t4h.framework/orm": "0.0.0-experimental-29d0277",
|
|
94
94
|
"@t4h.framework/runtime-claims": "^0.1.0",
|
|
95
|
-
"@t4h.framework/sftp": "
|
|
96
|
-
"@t4h.framework/smtp": "
|
|
97
|
-
"@t4h.framework/webhook": "
|
|
95
|
+
"@t4h.framework/sftp": "0.0.0-experimental-29d0277",
|
|
96
|
+
"@t4h.framework/smtp": "0.0.0-experimental-29d0277",
|
|
97
|
+
"@t4h.framework/webhook": "0.0.0-experimental-29d0277",
|
|
98
98
|
"typescript": "^5.9.3"
|
|
99
99
|
},
|
|
100
100
|
"peerDependenciesMeta": {
|