acrylblends 0.8.0 → 0.9.0-next.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/index.d.ts +2 -0
- package/dist/index.js +78 -5
- package/dist/index.js.map +1 -1
- package/lib/audit-BXnYsLge.d.ts +58 -0
- package/lib/cell-ChU41DZD.d.ts +32 -0
- package/lib/client-modules-CLvWOjbd.js +267 -0
- package/lib/connection-ZLEso7XL.d.ts +25 -0
- package/lib/conninfo.d.ts +1 -23
- package/lib/cordis/db-sqlite.d.ts +56 -0
- package/lib/cordis/db-sqlite.js +58 -0
- package/lib/cordis/db.d.ts +8 -0
- package/lib/cordis/db.js +1 -0
- package/lib/cordis/door.d.ts +159 -0
- package/lib/cordis/door.js +757 -0
- package/lib/cordis/inspect.d.ts +77 -0
- package/lib/cordis/inspect.js +149 -0
- package/lib/cordis/kv-db.d.ts +16 -0
- package/lib/cordis/kv-db.js +18 -0
- package/lib/cordis/kv-json.d.ts +16 -0
- package/lib/cordis/kv-json.js +44 -0
- package/lib/cordis/kv.d.ts +8 -0
- package/lib/cordis/kv.js +1 -0
- package/lib/cordis/node-server.d.ts +45 -0
- package/lib/cordis/node-server.js +93 -0
- package/lib/cordis/router-http.d.ts +56 -0
- package/lib/cordis/router-http.js +117 -0
- package/lib/cordis/router.d.ts +8 -0
- package/lib/cordis/router.js +7 -0
- package/lib/cordis/state/react.d.ts +6 -0
- package/lib/cordis/state/react.js +11 -0
- package/lib/cordis/state.d.ts +33 -0
- package/lib/cordis/state.js +163 -0
- package/lib/core-CaY8XDZ6.js +19 -0
- package/lib/database-DBHdwefi.d.ts +44 -0
- package/lib/db/conformance.d.ts +11 -0
- package/lib/db/conformance.js +267 -0
- package/lib/db/sqlite.d.ts +1 -1
- package/lib/db/sqlite.js +1 -196
- package/lib/db.d.ts +2 -1
- package/lib/{src-0hI7M7cN.js → deprecated-BP4fPt38.js} +0 -17
- package/lib/door/host.d.ts +24 -0
- package/lib/door/host.js +2 -0
- package/lib/door/page.d.ts +105 -0
- package/lib/door/page.js +1030 -0
- package/lib/door/protocol.d.ts +2 -0
- package/lib/door/protocol.js +197 -0
- package/lib/error-t4N2js2I.d.ts +8 -0
- package/lib/etag-DaKMOjty.js +135 -0
- package/lib/etag.js +1 -134
- package/lib/helpers-CvTauQT5.js +5 -0
- package/lib/http-exception-kpGJkmpi.d.ts +57 -0
- package/lib/http-exception.d.ts +1 -56
- package/lib/{index-BLTYsyc1.d.ts → index-BnGgRKTv.d.ts} +3 -39
- package/lib/index-BqVQkTnu.d.ts +98 -0
- package/lib/index-Dmst2QCQ.d.ts +44 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -1
- package/lib/jwk-LkzeoaU8.js +117 -0
- package/lib/jwk.js +1 -116
- package/lib/jwt-CskdhEW9.js +115 -0
- package/lib/jwt.js +2 -114
- package/lib/kv/conformance.d.ts +13 -0
- package/lib/kv/conformance.js +301 -0
- package/lib/kv/db.d.ts +2 -2
- package/lib/kv/json.d.ts +1 -1
- package/lib/kv-9f-AlRKN.d.ts +39 -0
- package/lib/kv.d.ts +2 -1
- package/lib/language-D9a4zqvn.js +198 -0
- package/lib/language.js +1 -197
- package/lib/middleware-CPQ8himN.js +12 -0
- package/lib/node-server/serve-static.d.ts +0 -1
- package/lib/node-server/serve-static.js +1 -1
- package/lib/node-server.d.ts +1 -7
- package/lib/node-server.js +3 -1586
- package/lib/open-CMhnJODn.js +197 -0
- package/lib/protocol-BizVt4J6.d.ts +144 -0
- package/lib/request-id-CKVvHOO1.js +34 -0
- package/lib/request-id.js +1 -33
- package/lib/secure-headers-mP3j6Hm6.js +163 -0
- package/lib/secure-headers.js +1 -162
- package/lib/{serve-static-B849HlX2.js → serve-static-3uo_9rjF.js} +1 -4
- package/lib/server-DvgMGtzo.js +1323 -0
- package/lib/snapshot-text-D3NspDyT.js +338 -0
- package/lib/src-CwABFr6r.js +328 -0
- package/lib/timeout.d.ts +1 -1
- package/lib/timing-Cky7C1Jf.js +183 -0
- package/lib/timing.js +1 -182
- package/package.json +89 -1
- package/plugins/acryl-db/plugin.json +6 -1
- package/plugins/acryl-db-sqlite/plugin.json +4 -0
- package/plugins/acryl-db-sqlite/src/facade/node.ts +1 -1
- package/plugins/acryl-db-sqlite/src/index.ts +2 -2
- package/plugins/acryl-db-sqlite/src/open.ts +2 -2
- package/plugins/acryl-door/plugin.json +4 -1
- package/plugins/acryl-door/src/host/http.ts +2 -2
- package/plugins/acryl-door/src/host/mcp-routes.ts +1 -1
- package/plugins/acryl-door/src/host/operator-routes.ts +1 -1
- package/plugins/acryl-door/src/host/page-routes.ts +3 -3
- package/plugins/acryl-door/src/index.ts +2 -2
- package/plugins/acryl-inspect/plugin.json +4 -1
- package/plugins/acryl-inspect/src/service.ts +2 -2
- package/plugins/acryl-kv/plugin.json +6 -1
- package/plugins/acryl-kv-db/plugin.json +4 -0
- package/plugins/acryl-kv-db/src/index.ts +1 -1
- package/plugins/acryl-kv-db/src/open.ts +3 -3
- package/plugins/acryl-kv-json/plugin.json +4 -0
- package/plugins/acryl-kv-json/src/index.ts +1 -1
- package/plugins/acryl-kv-json/src/open.ts +2 -2
- package/plugins/acryl-node-server/plugin.json +5 -1
- package/plugins/acryl-node-server/src/adapter/conninfo.ts +1 -1
- package/plugins/acryl-node-server/src/adapter/early-hints.ts +1 -1
- package/plugins/acryl-node-server/src/adapter/serve-static.ts +2 -2
- package/plugins/acryl-node-server/src/adapter/websocket.ts +2 -2
- package/plugins/acryl-node-server/src/client-modules.ts +2 -2
- package/plugins/acryl-node-server/src/index.ts +1 -1
- package/plugins/acryl-router/plugin.json +11 -1
- package/plugins/acryl-router/src/connection.d.ts +25 -0
- package/plugins/acryl-router/src/core/app-base.d.ts +215 -0
- package/plugins/acryl-router/src/core/app.d.ts +19 -0
- package/plugins/acryl-router/src/core/client/client.d.ts +4 -0
- package/plugins/acryl-router/src/core/client/fetch-result-please.d.ts +35 -0
- package/plugins/acryl-router/src/core/client/index.d.ts +7 -0
- package/plugins/acryl-router/src/core/client/types.d.ts +229 -0
- package/plugins/acryl-router/src/core/client/utils.d.ts +18 -0
- package/plugins/acryl-router/src/core/compose.d.ts +14 -0
- package/plugins/acryl-router/src/core/context.d.ts +443 -0
- package/plugins/acryl-router/src/core/helper/accepts/accepts.d.ts +30 -0
- package/plugins/acryl-router/src/core/helper/accepts/index.d.ts +5 -0
- package/plugins/acryl-router/src/core/helper/conninfo/index.d.ts +5 -0
- package/plugins/acryl-router/src/core/helper/conninfo/types.d.ts +36 -0
- package/plugins/acryl-router/src/core/helper/cookie/index.d.ts +25 -0
- package/plugins/acryl-router/src/core/helper/css/common.d.ts +59 -0
- package/plugins/acryl-router/src/core/helper/css/index.d.ts +80 -0
- package/plugins/acryl-router/src/core/helper/dev/index.d.ts +20 -0
- package/plugins/acryl-router/src/core/helper/factory/index.d.ts +82 -0
- package/plugins/acryl-router/src/core/helper/html/index.d.ts +8 -0
- package/plugins/acryl-router/src/core/helper/proxy/index.d.ts +73 -0
- package/plugins/acryl-router/src/core/helper/route/index.d.ts +75 -0
- package/plugins/acryl-router/src/core/helper/ssg/index.d.ts +7 -0
- package/plugins/acryl-router/src/core/helper/ssg/middleware.d.ts +44 -0
- package/plugins/acryl-router/src/core/helper/ssg/plugins.d.ts +27 -0
- package/plugins/acryl-router/src/core/helper/ssg/ssg.d.ts +91 -0
- package/plugins/acryl-router/src/core/helper/ssg/utils.d.ts +16 -0
- package/plugins/acryl-router/src/core/helper/streaming/index.d.ts +8 -0
- package/plugins/acryl-router/src/core/helper/streaming/sse.d.ts +13 -0
- package/plugins/acryl-router/src/core/helper/streaming/stream.d.ts +3 -0
- package/plugins/acryl-router/src/core/helper/streaming/text.d.ts +3 -0
- package/plugins/acryl-router/src/core/helper/streaming/utils.d.ts +1 -0
- package/plugins/acryl-router/src/core/helper/testing/index.d.ts +13 -0
- package/plugins/acryl-router/src/core/helper/websocket/index.d.ts +70 -0
- package/plugins/acryl-router/src/core/http-exception.d.ts +58 -0
- package/plugins/acryl-router/src/core/index.d.ts +37 -0
- package/plugins/acryl-router/src/core/jsx/base.d.ts +61 -0
- package/plugins/acryl-router/src/core/jsx/children.d.ts +9 -0
- package/plugins/acryl-router/src/core/jsx/components.d.ts +15 -0
- package/plugins/acryl-router/src/core/jsx/constants.d.ts +6 -0
- package/plugins/acryl-router/src/core/jsx/context.d.ts +51 -0
- package/plugins/acryl-router/src/core/jsx/dom/components.d.ts +10 -0
- package/plugins/acryl-router/src/core/jsx/dom/context.d.ts +3 -0
- package/plugins/acryl-router/src/core/jsx/dom/css.d.ts +83 -0
- package/plugins/acryl-router/src/core/jsx/dom/hooks/index.d.ts +39 -0
- package/plugins/acryl-router/src/core/jsx/dom/intrinsic-element/components.d.ts +16 -0
- package/plugins/acryl-router/src/core/jsx/dom/jsx-dev-runtime.d.ts +8 -0
- package/plugins/acryl-router/src/core/jsx/dom/jsx-runtime.d.ts +7 -0
- package/plugins/acryl-router/src/core/jsx/dom/render.d.ts +73 -0
- package/plugins/acryl-router/src/core/jsx/dom/utils.d.ts +1 -0
- package/plugins/acryl-router/src/core/jsx/hooks/index.d.ts +47 -0
- package/plugins/acryl-router/src/core/jsx/index.d.ts +76 -0
- package/plugins/acryl-router/src/core/jsx/intrinsic-element/common.d.ts +6 -0
- package/plugins/acryl-router/src/core/jsx/intrinsic-element/components.d.ts +13 -0
- package/plugins/acryl-router/src/core/jsx/intrinsic-elements.d.ts +735 -0
- package/plugins/acryl-router/src/core/jsx/streaming.d.ts +36 -0
- package/plugins/acryl-router/src/core/jsx/types.d.ts +36 -0
- package/plugins/acryl-router/src/core/jsx/utils.d.ts +4 -0
- package/plugins/acryl-router/src/core/request/constants.d.ts +1 -0
- package/plugins/acryl-router/src/core/request.d.ts +306 -0
- package/plugins/acryl-router/src/core/router/reg-exp-router/index.d.ts +6 -0
- package/plugins/acryl-router/src/core/router/reg-exp-router/matcher.d.ts +7 -0
- package/plugins/acryl-router/src/core/router/reg-exp-router/node.d.ts +13 -0
- package/plugins/acryl-router/src/core/router/reg-exp-router/prepared-router.d.ts +17 -0
- package/plugins/acryl-router/src/core/router/reg-exp-router/router.d.ts +11 -0
- package/plugins/acryl-router/src/core/router/reg-exp-router/trie.d.ts +8 -0
- package/plugins/acryl-router/src/core/router/smart-router/index.d.ts +5 -0
- package/plugins/acryl-router/src/core/router/smart-router/router.d.ts +11 -0
- package/plugins/acryl-router/src/core/router/trie-router/index.d.ts +5 -0
- package/plugins/acryl-router/src/core/router/trie-router/node.d.ts +6 -0
- package/plugins/acryl-router/src/core/router/trie-router/router.d.ts +7 -0
- package/plugins/acryl-router/src/core/router/utils.d.ts +1 -0
- package/plugins/acryl-router/src/core/router.d.ts +97 -0
- package/plugins/acryl-router/src/core/types.d.ts +573 -0
- package/plugins/acryl-router/src/core/utils/accept.d.ts +6 -0
- package/plugins/acryl-router/src/core/utils/body.d.ts +79 -0
- package/plugins/acryl-router/src/core/utils/buffer.d.ts +17 -0
- package/plugins/acryl-router/src/core/utils/color.d.ts +21 -0
- package/plugins/acryl-router/src/core/utils/concurrent.d.ts +11 -0
- package/plugins/acryl-router/src/core/utils/constants.d.ts +4 -0
- package/plugins/acryl-router/src/core/utils/cookie.d.ts +41 -0
- package/plugins/acryl-router/src/core/utils/crypto.d.ts +15 -0
- package/plugins/acryl-router/src/core/utils/handler.d.ts +6 -0
- package/plugins/acryl-router/src/core/utils/headers.d.ts +8 -0
- package/plugins/acryl-router/src/core/utils/html.d.ts +44 -0
- package/plugins/acryl-router/src/core/utils/http-status.d.ts +32 -0
- package/plugins/acryl-router/src/core/utils/mime.d.ts +70 -0
- package/plugins/acryl-router/src/core/utils/stream.d.ts +31 -0
- package/plugins/acryl-router/src/core/utils/types.d.ts +128 -0
- package/plugins/acryl-router/src/core/utils/url.d.ts +44 -0
- package/plugins/acryl-router/src/core/validator/index.d.ts +7 -0
- package/plugins/acryl-router/src/core/validator/utils.d.ts +29 -0
- package/plugins/acryl-router/src/core/validator/validator.d.ts +16 -0
- package/plugins/acryl-router/src/helpers/index.d.ts +17 -0
- package/plugins/acryl-router/src/helpers/schema-validator.d.ts +54 -0
- package/plugins/acryl-router-http/plugin.json +4 -1
- package/plugins/acryl-router-http/src/index.ts +1 -1
- package/plugins/acryl-state/plugin.json +5 -1
- package/plugins/acryl-state/src/service.ts +3 -3
- package/plugins/tsconfig.json +32 -20
- package/shared/DEFAULTS.md +1 -1
- package/templates/chat/blend.yaml +3 -0
- package/templates/chat/src/app.ts +17 -16
- package/templates/chat/template.json +1 -0
- package/templates/nodejs/blend.yaml +3 -0
- package/templates/nodejs/src/app.ts +18 -15
- package/templates/nodejs/template.json +9 -1
- package/templates/notes/blend.yaml +3 -0
- package/templates/notes/src/app.ts +17 -16
- package/templates/notes/template.json +1 -0
- package/docs/framework/UPSTREAM.md +0 -3
- package/docs/framework/upstream.json +0 -9
- package/lib/index-D4FAsBZu.d.ts +0 -85
- package/plugins/acryl-db/upstream.json +0 -18
- package/plugins/acryl-db-sqlite/upstream.json +0 -21
- package/plugins/acryl-door/upstream.json +0 -28
- package/plugins/acryl-inspect/upstream.json +0 -18
- package/plugins/acryl-kv/upstream.json +0 -18
- package/plugins/acryl-kv-db/upstream.json +0 -21
- package/plugins/acryl-kv-json/upstream.json +0 -22
- package/plugins/acryl-node-server/upstream.json +0 -21
- package/plugins/acryl-router/upstream.json +0 -20
- package/plugins/acryl-router-http/upstream.json +0 -22
- package/plugins/acryl-state/NOTICE +0 -30
- package/plugins/acryl-state/upstream.json +0 -22
- package/plugins/desktop/upstream.json +0 -12
- package/plugins/desktop-web/upstream.json +0 -12
- package/templates/todo/upstream.json +0 -12
- /package/lib/{index-CTy4N7ng.d.ts → deprecated-CTy4N7ng.d.ts} +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { getConnInfo, connectionOf } from '../connection.ts';
|
|
2
|
+
export type { AddressType, ConnInfo, GetConnInfo, NetAddrInfo } from '../core/helper/conninfo/index.ts';
|
|
3
|
+
export { accepts } from '../core/helper/accepts/index.ts';
|
|
4
|
+
export { createFactory, createMiddleware, Factory } from '../core/helper/factory/index.ts';
|
|
5
|
+
export { deleteCookie, generateCookie, generateSignedCookie, getCookie, getSignedCookie, setCookie, setSignedCookie } from '../core/helper/cookie/index.ts';
|
|
6
|
+
export { getExtension, getMimeType, mimes, type BaseMime } from '../core/utils/mime.ts';
|
|
7
|
+
export { createCssContext, css, cx, keyframes, rawCssString, Style, viewTransition } from '../core/helper/css/index.ts';
|
|
8
|
+
export { html, raw } from '../core/helper/html/index.ts';
|
|
9
|
+
export { proxy } from '../core/helper/proxy/index.ts';
|
|
10
|
+
export { getRouterName, inspectRoutes, showRoutes } from '../core/helper/dev/index.ts';
|
|
11
|
+
export { matchedRoutes, routePath, baseRoutePath, basePath } from '../core/helper/route/index.ts';
|
|
12
|
+
export { testClient } from '../core/helper/testing/index.ts';
|
|
13
|
+
export { defaultPlugin, disableSSG, isSSGContext, onlySSG, redirectPlugin, ssgParams, toSSG, X_ACRYL_DISABLE_SSG_HEADER_KEY, type SSGPlugin, type ToSSGOptions } from '../core/helper/ssg/index.ts';
|
|
14
|
+
export { stream, streamSSE, streamText, SSEStreamingApi, type SSEMessage } from '../core/helper/streaming/index.ts';
|
|
15
|
+
export { validator, type ValidationFunction } from '../core/validator/index.ts';
|
|
16
|
+
export { schemaValidator, type StandardIssue, type StandardResult, type StandardSchema, type StandardSchemaOptions, type StandardSchemaProps } from './schema-validator.ts';
|
|
17
|
+
export { createWSMessageEvent, defineWebSocketHelper, WSContext, type SendOptions, type UpgradeWebSocket, type WSContextInit, type WSEvents, type WSMessageReceive, type WSReadyState } from '../core/helper/websocket/index.ts';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { Env, MiddlewareHandler, ValidationTargets } from '../core/types.ts';
|
|
2
|
+
/**
|
|
3
|
+
* The Standard Schema v1 interface (https://standardschema.dev), declared here so the framework needs no dependency for it. Schemastery
|
|
4
|
+
* (what Cordis uses), Zod and Valibot implement it, and a hand-written schema object of the same shape is accepted as well. Only
|
|
5
|
+
* `validate` is called, so `version` and `vendor` may be left out of a hand-written schema.
|
|
6
|
+
*/
|
|
7
|
+
export interface StandardSchema<Input = unknown, Output = Input> {
|
|
8
|
+
readonly '~standard': StandardSchemaProps<Input, Output>;
|
|
9
|
+
}
|
|
10
|
+
/** The `~standard` properties of a {@link StandardSchema}. */
|
|
11
|
+
export interface StandardSchemaProps<Input = unknown, Output = Input> {
|
|
12
|
+
/** The version of the standard; every library sets it. */
|
|
13
|
+
readonly version?: 1 | undefined;
|
|
14
|
+
/** The name of the schema library; every library sets it. */
|
|
15
|
+
readonly vendor?: string | undefined;
|
|
16
|
+
/** Validates an unknown value. */
|
|
17
|
+
readonly validate: (value: unknown, options?: StandardSchemaOptions | undefined) => StandardResult<Output> | Promise<StandardResult<Output>>;
|
|
18
|
+
/** The input and output types, for inference only. */
|
|
19
|
+
readonly types?: {
|
|
20
|
+
readonly input: Input;
|
|
21
|
+
readonly output: Output;
|
|
22
|
+
} | undefined;
|
|
23
|
+
}
|
|
24
|
+
/** Options a caller may pass to `validate`. */
|
|
25
|
+
export interface StandardSchemaOptions {
|
|
26
|
+
/** Library-specific parameters. */
|
|
27
|
+
readonly libraryOptions?: Record<string, unknown> | undefined;
|
|
28
|
+
}
|
|
29
|
+
/** One validation issue: a message and where in the value it applies. */
|
|
30
|
+
export interface StandardIssue {
|
|
31
|
+
readonly message: string;
|
|
32
|
+
readonly path?: readonly (PropertyKey | {
|
|
33
|
+
readonly key: PropertyKey;
|
|
34
|
+
})[] | undefined;
|
|
35
|
+
}
|
|
36
|
+
/** What `validate` answers: the parsed value, or the issues. */
|
|
37
|
+
export type StandardResult<Output> = {
|
|
38
|
+
readonly value: Output;
|
|
39
|
+
readonly issues?: undefined;
|
|
40
|
+
} | {
|
|
41
|
+
readonly issues: readonly StandardIssue[];
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* The core `validator` driven by a Standard Schema. A failure answers 400 with `{ error, issues }`; success makes the parsed value the
|
|
45
|
+
* handler's `c.req.valid(target)`, typed by the schema's output.
|
|
46
|
+
*/
|
|
47
|
+
export declare function schemaValidator<Target extends keyof ValidationTargets, Out, E extends Env = Env, P extends string = string>(target: Target, schema: StandardSchema<unknown, Out>): MiddlewareHandler<E, P, {
|
|
48
|
+
in: {
|
|
49
|
+
[K in Target]: Out;
|
|
50
|
+
};
|
|
51
|
+
out: {
|
|
52
|
+
[K in Target]: Out;
|
|
53
|
+
};
|
|
54
|
+
}>;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import type { IncomingMessage, ServerResponse } from 'node:http'
|
|
8
|
-
import type { RouterHttpService } from '
|
|
8
|
+
import type { RouterHttpService } from 'acryl-router'
|
|
9
9
|
import { Context, Service } from '@deepseek-ai/cordis'
|
|
10
10
|
import { serve } from './serve.ts'
|
|
11
11
|
|
|
@@ -8,5 +8,9 @@
|
|
|
8
8
|
"@deepseek-ai/cordis": "4.0.4"
|
|
9
9
|
},
|
|
10
10
|
"mount": "root.plugin(state); ctx.state.cell('todos.count', 0), then count.update((n) => n + 1)",
|
|
11
|
-
"omit": ["src/react.ts", "**/*.test.*", "**/*.case.ts"]
|
|
11
|
+
"omit": ["src/react.ts", "**/*.test.*", "**/*.case.ts"],
|
|
12
|
+
"entries": {
|
|
13
|
+
"": "src/index.ts",
|
|
14
|
+
"/react": "src/react.ts"
|
|
15
|
+
}
|
|
12
16
|
}
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { Context, Service } from '@deepseek-ai/cordis'
|
|
9
|
-
import { Acryl, type Context as RequestContext } from '
|
|
10
|
-
import { streamSSE } from '
|
|
11
|
-
import { loopbackOnly, methodNotAllowed } from '
|
|
9
|
+
import { Acryl, type Context as RequestContext } from 'acryl-router'
|
|
10
|
+
import { streamSSE } from 'acryl-router/helpers'
|
|
11
|
+
import { loopbackOnly, methodNotAllowed } from 'acryl-router/middleware'
|
|
12
12
|
import { createCell, createDerived, type Cell, type ReadonlyCell } from './cell.ts'
|
|
13
13
|
|
|
14
14
|
declare module '@deepseek-ai/cordis' {
|
package/plugins/tsconfig.json
CHANGED
|
@@ -11,31 +11,43 @@
|
|
|
11
11
|
"allowImportingTsExtensions": true,
|
|
12
12
|
"noEmit": true,
|
|
13
13
|
"skipLibCheck": true,
|
|
14
|
-
"types": ["node"]
|
|
14
|
+
"types": ["node"],
|
|
15
|
+
"paths": {
|
|
16
|
+
"acryl-db": ["./acryl-db/src/index.ts"],
|
|
17
|
+
"acryl-db/cordis": ["./acryl-db/src/cordis.ts"],
|
|
18
|
+
"acryl-db/conformance": ["./acryl-db/src/conformance.ts"],
|
|
19
|
+
"acryl-db-sqlite": ["./acryl-db-sqlite/src/index.ts"],
|
|
20
|
+
"acryl-db-sqlite/open": ["./acryl-db-sqlite/src/open.ts"],
|
|
21
|
+
"acryl-door": ["./acryl-door/src/index.ts"],
|
|
22
|
+
"acryl-inspect": ["./acryl-inspect/src/index.ts"],
|
|
23
|
+
"acryl-kv": ["./acryl-kv/src/index.ts"],
|
|
24
|
+
"acryl-kv/cordis": ["./acryl-kv/src/cordis.ts"],
|
|
25
|
+
"acryl-kv/conformance": ["./acryl-kv/src/conformance.ts"],
|
|
26
|
+
"acryl-kv-db": ["./acryl-kv-db/src/index.ts"],
|
|
27
|
+
"acryl-kv-db/open": ["./acryl-kv-db/src/open.ts"],
|
|
28
|
+
"acryl-kv-json": ["./acryl-kv-json/src/index.ts"],
|
|
29
|
+
"acryl-kv-json/open": ["./acryl-kv-json/src/open.ts"],
|
|
30
|
+
"acryl-node-server": ["./acryl-node-server/src/index.ts"],
|
|
31
|
+
"acryl-node-server/client-modules": ["./acryl-node-server/src/client-modules.ts"],
|
|
32
|
+
"acryl-router": ["./acryl-router/src/index.ts"],
|
|
33
|
+
"acryl-router/middleware": ["./acryl-router/src/middleware/index.ts"],
|
|
34
|
+
"acryl-router/helpers": ["./acryl-router/src/helpers/index.ts"],
|
|
35
|
+
"acryl-router/client": ["./acryl-router/src/client.ts"],
|
|
36
|
+
"acryl-router/jsx": ["./acryl-router/src/core/jsx/index.ts"],
|
|
37
|
+
"acryl-router/jsx/jsx-runtime": ["./acryl-router/src/core/jsx/jsx-runtime.ts"],
|
|
38
|
+
"acryl-router/jsx/jsx-dev-runtime": ["./acryl-router/src/core/jsx/jsx-dev-runtime.ts"],
|
|
39
|
+
"acryl-router/jsx/streaming": ["./acryl-router/src/core/jsx/streaming.ts"],
|
|
40
|
+
"acryl-router-http": ["./acryl-router-http/src/index.ts"],
|
|
41
|
+
"acryl-state": ["./acryl-state/src/index.ts"],
|
|
42
|
+
"acryl-state/react": ["./acryl-state/src/react.ts"]
|
|
43
|
+
}
|
|
15
44
|
},
|
|
16
45
|
"include": ["*/**/*.ts"],
|
|
17
46
|
"exclude": [
|
|
47
|
+
"acryl-*/**",
|
|
18
48
|
"desktop/main.ts",
|
|
19
49
|
"desktop/window.ts",
|
|
20
50
|
"desktop-web/main.ts",
|
|
21
|
-
"desktop-web/window.ts"
|
|
22
|
-
"acryl-*/src/**/*.test.ts",
|
|
23
|
-
"acryl-*/src/**/*.case.ts",
|
|
24
|
-
"acryl-node-server/tests/adapter",
|
|
25
|
-
"acryl-router/tests/loader.spec.ts",
|
|
26
|
-
"acryl-db-sqlite/tests/loader.spec.ts",
|
|
27
|
-
"acryl-kv-json/tests/loader.spec.ts",
|
|
28
|
-
"acryl-kv-db/tests/loader.spec.ts",
|
|
29
|
-
"acryl-door/tests/harness.ts",
|
|
30
|
-
"acryl-door/tests/host/loader.spec.ts",
|
|
31
|
-
"acryl-door/tests/host/door.spec.ts",
|
|
32
|
-
"acryl-door/tests/host/shim.spec.ts",
|
|
33
|
-
"acryl-door/tests/host/verbs.spec.ts",
|
|
34
|
-
"acryl-door/tests/page",
|
|
35
|
-
"acryl-state/src/react.ts",
|
|
36
|
-
"acryl-state/tests/react.spec.ts",
|
|
37
|
-
"acryl-router-http/tests/adapter.spec.ts",
|
|
38
|
-
"acryl-router-http/tests/stream.spec.ts",
|
|
39
|
-
"acryl-router-http/tests/surfaces.spec.ts"
|
|
51
|
+
"desktop-web/window.ts"
|
|
40
52
|
]
|
|
41
53
|
}
|
package/shared/DEFAULTS.md
CHANGED
|
@@ -42,4 +42,4 @@ The door is a command in this folder, `.acryl/bin/acryl`, that lets you look at
|
|
|
42
42
|
- `look` and `act` need the app's page open in a browser (`brief` says `Page: not open` when it is not). Look again before each `act`: refs belong to the latest `look`.
|
|
43
43
|
- A password field is not shown and cannot be typed into through the door; sign in by hand, or test the sign-in with a test.
|
|
44
44
|
- Every verb takes `--json`. The exit code is 0 for done, 1 when the verb failed, 2 for a usage error and 3 when no app is running in this folder.
|
|
45
|
-
- `plugin add plugins/<name>` checks the plugin, installs it and makes it live without a restart (
|
|
45
|
+
- `plugin add plugins/<name>` checks the plugin, installs it and makes it live without a restart (the `extensions` plugin does this; every template that has the door has it, in development only: it is left out with `NODE_ENV=production`). `tool call` reaches only the tools on the door's allowlist (empty by default). On Windows the command is `.acryl\bin\acryl.cmd`.
|
|
@@ -20,6 +20,9 @@ spec:
|
|
|
20
20
|
name: acryl-db-sqlite
|
|
21
21
|
- id: routes
|
|
22
22
|
name: routes
|
|
23
|
+
# Plugins installed while the app runs (the door's `plugin add`): development only, src/app.ts leaves it out when NODE_ENV=production.
|
|
24
|
+
- id: extensions
|
|
25
|
+
name: extensions
|
|
23
26
|
- id: server
|
|
24
27
|
name: acryl-node-server
|
|
25
28
|
config:
|
|
@@ -5,6 +5,7 @@ import * as db from '../plugins/acryl-db-sqlite/src/index.ts'
|
|
|
5
5
|
import * as door from '../plugins/acryl-door/src/index.ts'
|
|
6
6
|
import * as nodeServer from '../plugins/acryl-node-server/src/index.ts'
|
|
7
7
|
import * as router from '../plugins/acryl-router/src/index.ts'
|
|
8
|
+
import { extensions } from '../plugins/extensions/index.ts'
|
|
8
9
|
import { type AppInstance, instance } from '../plugins/instance/index.ts'
|
|
9
10
|
import {
|
|
10
11
|
blueprintsIn,
|
|
@@ -21,6 +22,7 @@ export const registry = {
|
|
|
21
22
|
'acryl-db-sqlite': db,
|
|
22
23
|
'acryl-node-server': nodeServer,
|
|
23
24
|
'acryl-door': door,
|
|
25
|
+
extensions,
|
|
24
26
|
routes,
|
|
25
27
|
}
|
|
26
28
|
|
|
@@ -71,30 +73,29 @@ export interface AppOptions {
|
|
|
71
73
|
* `migrations/`; the one place that names the SQLite provider is this file (`acrylblends check-deps`), so a different provider is a change here.
|
|
72
74
|
*/
|
|
73
75
|
export async function createApp(chosen: AppInstance, options: AppOptions = {}): Promise<App> {
|
|
74
|
-
const
|
|
76
|
+
const read = readManifest(options.values)
|
|
75
77
|
const listen = options.listen
|
|
78
|
+
// Rows left out: the server (and the door, which needs it) when the app is reached in process; the door when it is switched off; live plugin installs in production.
|
|
79
|
+
const leaveOut = new Set<string>()
|
|
80
|
+
if (listen === false) leaveOut.add('acryl-node-server').add('acryl-door')
|
|
81
|
+
if (!doorEnabled()) leaveOut.add('acryl-door')
|
|
82
|
+
if (process.env.NODE_ENV === 'production') leaveOut.add('extensions')
|
|
83
|
+
const manifest = without(read, ...leaveOut)
|
|
76
84
|
const file = options.database ?? 'data/chat.sqlite'
|
|
77
85
|
const root = new Context()
|
|
78
86
|
const first = root.plugin(instance, chosen)
|
|
79
87
|
await first.await()
|
|
80
88
|
const fibers: Fiber[] = [
|
|
81
89
|
first,
|
|
82
|
-
...(await compose(
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
: doorEnabled()
|
|
87
|
-
? manifest
|
|
88
|
-
: without(manifest, 'acryl-door'),
|
|
89
|
-
registry,
|
|
90
|
-
{
|
|
91
|
-
db: {
|
|
92
|
-
path: isAbsolute(file) ? file : resolve(projectRoot, file),
|
|
93
|
-
migrations: join(projectRoot, 'migrations'),
|
|
94
|
-
},
|
|
95
|
-
server: { port: chosen.port.start, scan: chosen.port.scan ? 20 : 0 },
|
|
90
|
+
...(await compose(root, manifest, registry, {
|
|
91
|
+
db: {
|
|
92
|
+
path: isAbsolute(file) ? file : resolve(projectRoot, file),
|
|
93
|
+
migrations: join(projectRoot, 'migrations'),
|
|
96
94
|
},
|
|
97
|
-
|
|
95
|
+
// What is installed while the app runs lives in plugins/, next to the plugins copied from the library (plugins/library.json lists those, so they are not installed twice).
|
|
96
|
+
extensions: { sources: [{ dir: join(projectRoot, 'plugins'), trust: 'install' }] },
|
|
97
|
+
server: { port: chosen.port.start, scan: chosen.port.scan ? 20 : 0 },
|
|
98
|
+
})),
|
|
98
99
|
]
|
|
99
100
|
return {
|
|
100
101
|
root,
|
|
@@ -17,6 +17,9 @@ spec:
|
|
|
17
17
|
name: acryl-router
|
|
18
18
|
- id: routes
|
|
19
19
|
name: routes
|
|
20
|
+
# Plugins installed while the app runs (the door's `plugin add`): development only, src/app.ts leaves it out when NODE_ENV=production.
|
|
21
|
+
- id: extensions
|
|
22
|
+
name: extensions
|
|
20
23
|
- id: server
|
|
21
24
|
name: acryl-node-server
|
|
22
25
|
config:
|
|
@@ -4,6 +4,7 @@ import { Context, type Fiber } from '@deepseek-ai/cordis'
|
|
|
4
4
|
import * as door from '../plugins/acryl-door/src/index.ts'
|
|
5
5
|
import * as nodeServer from '../plugins/acryl-node-server/src/index.ts'
|
|
6
6
|
import * as router from '../plugins/acryl-router/src/index.ts'
|
|
7
|
+
import { extensions } from '../plugins/extensions/index.ts'
|
|
7
8
|
import { type AppInstance, instance } from '../plugins/instance/index.ts'
|
|
8
9
|
import {
|
|
9
10
|
blueprintsIn,
|
|
@@ -19,11 +20,14 @@ export const registry = {
|
|
|
19
20
|
'acryl-router': router,
|
|
20
21
|
'acryl-node-server': nodeServer,
|
|
21
22
|
'acryl-door': door,
|
|
23
|
+
extensions,
|
|
22
24
|
routes,
|
|
23
25
|
}
|
|
24
26
|
|
|
27
|
+
const projectRoot = fileURLToPath(new URL('..', import.meta.url))
|
|
28
|
+
|
|
25
29
|
/** The manifest next to this app's source. */
|
|
26
|
-
export const MANIFEST = join(
|
|
30
|
+
export const MANIFEST = join(projectRoot, 'blend.yaml')
|
|
27
31
|
|
|
28
32
|
/**
|
|
29
33
|
* The app's manifest, resolved. A Blend finds its Blueprint in `blueprints/<id>.yaml`; an app that is itself a Blueprint never looks.
|
|
@@ -32,7 +36,7 @@ export const MANIFEST = join(fileURLToPath(new URL('..', import.meta.url)), 'ble
|
|
|
32
36
|
export function readManifest(values?: Readonly<Record<string, ParameterValue>>) {
|
|
33
37
|
return loadManifest(MANIFEST, {
|
|
34
38
|
known: Object.keys(registry),
|
|
35
|
-
getBlueprint: blueprintsIn(join(
|
|
39
|
+
getBlueprint: blueprintsIn(join(projectRoot, 'blueprints')),
|
|
36
40
|
...(values ? { values } : {}),
|
|
37
41
|
})
|
|
38
42
|
}
|
|
@@ -62,25 +66,24 @@ export async function createApp(
|
|
|
62
66
|
chosen: AppInstance,
|
|
63
67
|
options: { values?: Readonly<Record<string, ParameterValue>>; listen?: boolean } = {},
|
|
64
68
|
): Promise<App> {
|
|
65
|
-
const
|
|
69
|
+
const read = readManifest(options.values)
|
|
66
70
|
const listen = options.listen
|
|
71
|
+
// Rows left out: the server (and the door, which needs it) when the app is reached in process; the door when it is switched off; live plugin installs in production.
|
|
72
|
+
const leaveOut = new Set<string>()
|
|
73
|
+
if (listen === false) leaveOut.add('acryl-node-server').add('acryl-door')
|
|
74
|
+
if (!doorEnabled()) leaveOut.add('acryl-door')
|
|
75
|
+
if (process.env.NODE_ENV === 'production') leaveOut.add('extensions')
|
|
76
|
+
const manifest = without(read, ...leaveOut)
|
|
67
77
|
const root = new Context()
|
|
68
78
|
const first = root.plugin(instance, chosen)
|
|
69
79
|
await first.await()
|
|
70
80
|
const fibers: Fiber[] = [
|
|
71
81
|
first,
|
|
72
|
-
...(await compose(
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
? manifest
|
|
78
|
-
: without(manifest, 'acryl-door'),
|
|
79
|
-
registry,
|
|
80
|
-
{
|
|
81
|
-
server: { port: chosen.port.start, scan: chosen.port.scan ? 20 : 0 },
|
|
82
|
-
},
|
|
83
|
-
)),
|
|
82
|
+
...(await compose(root, manifest, registry, {
|
|
83
|
+
// What is installed while the app runs lives in plugins/, next to the plugins copied from the library (plugins/library.json lists those, so they are not installed twice).
|
|
84
|
+
extensions: { sources: [{ dir: join(projectRoot, 'plugins'), trust: 'install' }] },
|
|
85
|
+
server: { port: chosen.port.start, scan: chosen.port.scan ? 20 : 0 },
|
|
86
|
+
})),
|
|
84
87
|
]
|
|
85
88
|
return {
|
|
86
89
|
root,
|
|
@@ -20,6 +20,9 @@ spec:
|
|
|
20
20
|
name: acryl-db-sqlite
|
|
21
21
|
- id: routes
|
|
22
22
|
name: routes
|
|
23
|
+
# Plugins installed while the app runs (the door's `plugin add`): development only, src/app.ts leaves it out when NODE_ENV=production.
|
|
24
|
+
- id: extensions
|
|
25
|
+
name: extensions
|
|
23
26
|
- id: server
|
|
24
27
|
name: acryl-node-server
|
|
25
28
|
config:
|
|
@@ -5,6 +5,7 @@ import * as db from '../plugins/acryl-db-sqlite/src/index.ts'
|
|
|
5
5
|
import * as door from '../plugins/acryl-door/src/index.ts'
|
|
6
6
|
import * as nodeServer from '../plugins/acryl-node-server/src/index.ts'
|
|
7
7
|
import * as router from '../plugins/acryl-router/src/index.ts'
|
|
8
|
+
import { extensions } from '../plugins/extensions/index.ts'
|
|
8
9
|
import { type AppInstance, instance } from '../plugins/instance/index.ts'
|
|
9
10
|
import {
|
|
10
11
|
blueprintsIn,
|
|
@@ -21,6 +22,7 @@ export const registry = {
|
|
|
21
22
|
'acryl-db-sqlite': db,
|
|
22
23
|
'acryl-node-server': nodeServer,
|
|
23
24
|
'acryl-door': door,
|
|
25
|
+
extensions,
|
|
24
26
|
routes,
|
|
25
27
|
}
|
|
26
28
|
|
|
@@ -71,30 +73,29 @@ export interface AppOptions {
|
|
|
71
73
|
* `migrations/`; the one place that names the SQLite provider is this file (`acrylblends check-deps`), so a different provider is a change here.
|
|
72
74
|
*/
|
|
73
75
|
export async function createApp(chosen: AppInstance, options: AppOptions = {}): Promise<App> {
|
|
74
|
-
const
|
|
76
|
+
const read = readManifest(options.values)
|
|
75
77
|
const listen = options.listen
|
|
78
|
+
// Rows left out: the server (and the door, which needs it) when the app is reached in process; the door when it is switched off; live plugin installs in production.
|
|
79
|
+
const leaveOut = new Set<string>()
|
|
80
|
+
if (listen === false) leaveOut.add('acryl-node-server').add('acryl-door')
|
|
81
|
+
if (!doorEnabled()) leaveOut.add('acryl-door')
|
|
82
|
+
if (process.env.NODE_ENV === 'production') leaveOut.add('extensions')
|
|
83
|
+
const manifest = without(read, ...leaveOut)
|
|
76
84
|
const file = options.database ?? 'data/notes.sqlite'
|
|
77
85
|
const root = new Context()
|
|
78
86
|
const first = root.plugin(instance, chosen)
|
|
79
87
|
await first.await()
|
|
80
88
|
const fibers: Fiber[] = [
|
|
81
89
|
first,
|
|
82
|
-
...(await compose(
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
: doorEnabled()
|
|
87
|
-
? manifest
|
|
88
|
-
: without(manifest, 'acryl-door'),
|
|
89
|
-
registry,
|
|
90
|
-
{
|
|
91
|
-
db: {
|
|
92
|
-
path: isAbsolute(file) ? file : resolve(projectRoot, file),
|
|
93
|
-
migrations: join(projectRoot, 'migrations'),
|
|
94
|
-
},
|
|
95
|
-
server: { port: chosen.port.start, scan: chosen.port.scan ? 20 : 0 },
|
|
90
|
+
...(await compose(root, manifest, registry, {
|
|
91
|
+
db: {
|
|
92
|
+
path: isAbsolute(file) ? file : resolve(projectRoot, file),
|
|
93
|
+
migrations: join(projectRoot, 'migrations'),
|
|
96
94
|
},
|
|
97
|
-
|
|
95
|
+
// What is installed while the app runs lives in plugins/, next to the plugins copied from the library (plugins/library.json lists those, so they are not installed twice).
|
|
96
|
+
extensions: { sources: [{ dir: join(projectRoot, 'plugins'), trust: 'install' }] },
|
|
97
|
+
server: { port: chosen.port.start, scan: chosen.port.scan ? 20 : 0 },
|
|
98
|
+
})),
|
|
98
99
|
]
|
|
99
100
|
return {
|
|
100
101
|
root,
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
# Generated copy
|
|
2
|
-
|
|
3
|
-
This folder is a copy of `docs/framework` of acryldev/acryl at commit `20bdc263d6f0f8febbd967007bda4cf4a802efd2`, made by `scripts/sync-framework.mjs`. Do not edit it here: change the text in ACRYL and sync again. `pnpm run verify:framework` fails when a page differs from the recorded digest.
|
package/lib/index-D4FAsBZu.d.ts
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
//#region ../../plugins/acryl-db/src/facade/database.d.ts
|
|
2
|
-
/** Values supported by the portable SQL drivers. */
|
|
3
|
-
type SqlValue = null | number | bigint | string | Uint8Array;
|
|
4
|
-
/**
|
|
5
|
-
* Asynchronous SQL operations shared by a database and its transaction handles.
|
|
6
|
-
*
|
|
7
|
-
* `exec` runs SQL text without bindings and may contain several statements. `run`, `get`, and `all`
|
|
8
|
-
* execute one statement with positional bindings. Adapters may cache prepared statements by SQL text,
|
|
9
|
-
* so callers pass values as bindings instead of interpolating them. `run` resolves the number of rows
|
|
10
|
-
* the statement changed.
|
|
11
|
-
*/
|
|
12
|
-
interface DbExecutor {
|
|
13
|
-
exec(sql: string): Promise<void>;
|
|
14
|
-
run(sql: string, ...params: SqlValue[]): Promise<{
|
|
15
|
-
readonly changes: number;
|
|
16
|
-
}>;
|
|
17
|
-
get<T extends object>(sql: string, ...params: SqlValue[]): Promise<T | undefined>;
|
|
18
|
-
all<T extends object>(sql: string, ...params: SqlValue[]): Promise<T[]>;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Minimal portable SQL database facade.
|
|
22
|
-
*
|
|
23
|
-
* All operations are asynchronous so adapters may execute outside the caller's runtime.
|
|
24
|
-
*
|
|
25
|
-
* `transaction` passes the callback a transaction handle. All work in the transaction
|
|
26
|
-
* must use that handle; the handle is invalid after the callback settles. Adapters must
|
|
27
|
-
* queue unrelated operations and other transactions until the transaction finishes. The
|
|
28
|
-
* returned promise settles after commit or rollback. Calling the database itself (including
|
|
29
|
-
* `transaction`) from inside a callback therefore waits for that transaction and
|
|
30
|
-
* never settles.
|
|
31
|
-
*
|
|
32
|
-
* When the callback rejects, the adapter must roll the transaction back before rejecting
|
|
33
|
-
* with that same error. If rollback fails, it must reject with a different error (for
|
|
34
|
-
* example an `AggregateError`) so callers cannot mistake the callback error for a
|
|
35
|
-
* guaranteed rollback.
|
|
36
|
-
*
|
|
37
|
-
* Closing is the adapter's: the plugin that opened a database closes it, so the facade an
|
|
38
|
-
* app receives has no `close`.
|
|
39
|
-
*/
|
|
40
|
-
interface Db extends DbExecutor {
|
|
41
|
-
transaction<T>(callback: (transaction: DbExecutor) => Promise<T>): Promise<T>;
|
|
42
|
-
}
|
|
43
|
-
//#endregion
|
|
44
|
-
//#region ../../plugins/acryl-db/src/facade/migrations.d.ts
|
|
45
|
-
type Migration = {
|
|
46
|
-
readonly version: number;
|
|
47
|
-
readonly statements: readonly string[];
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* Apply all pending migrations atomically, tracking their version in the named metadata table.
|
|
51
|
-
*
|
|
52
|
-
* The bookkeeping SQL runs unchanged on SQLite and Postgres: no `STRICT` table, `ON CONFLICT DO NOTHING`
|
|
53
|
-
* instead of `INSERT OR IGNORE`, and the version written as a checked integer rather than a binding,
|
|
54
|
-
* since the two dialects spell placeholders differently.
|
|
55
|
-
*/
|
|
56
|
-
declare function applyMigrations(database: Db, migrations: readonly Migration[], options: {
|
|
57
|
-
readonly table: string;
|
|
58
|
-
}): Promise<void>;
|
|
59
|
-
//#endregion
|
|
60
|
-
//#region ../../plugins/acryl-db/src/facade/schema.d.ts
|
|
61
|
-
/** Validate a prefix before using it as part of a SQL identifier. */
|
|
62
|
-
declare function validateSchemaPrefix(prefix: string): void;
|
|
63
|
-
//#endregion
|
|
64
|
-
//#region ../../plugins/acryl-db/src/migration-files.d.ts
|
|
65
|
-
/**
|
|
66
|
-
* Read every `NNN-name.sql` file of a folder, in number order.
|
|
67
|
-
* @throws when a `.sql` file is not named `NNN-name.sql`, or the numbers do not run 1, 2, 3, ... without gaps or repeats.
|
|
68
|
-
*/
|
|
69
|
-
declare function readMigrationFiles(folder: string | URL): Promise<Migration[]>;
|
|
70
|
-
//#endregion
|
|
71
|
-
//#region ../../plugins/acryl-db/src/index.d.ts
|
|
72
|
-
/**
|
|
73
|
-
* The `db` port: what an app's code sees of its relational database, whichever provider (`acryl-db-sqlite`, `acryl-db-postgres`) serves
|
|
74
|
-
* it. Plain code (an acrylblends app) opens a database with a provider's `openDb`; a Cordis plugin declares `inject: ['db']`, imports
|
|
75
|
-
* `acryl-db/cordis` for the `ctx.db` type, and never imports a driver.
|
|
76
|
-
*
|
|
77
|
-
* Bindings are positional `?` placeholders on every provider; a provider whose database spells them differently translates them.
|
|
78
|
-
* This entry imports nothing from Cordis, at runtime or in its types.
|
|
79
|
-
*/
|
|
80
|
-
/** The service name every `db` provider registers. */
|
|
81
|
-
declare const DB_SERVICE = "db";
|
|
82
|
-
/** The table that records an app's migration version. */
|
|
83
|
-
declare const MIGRATIONS_TABLE = "_migrations";
|
|
84
|
-
//#endregion
|
|
85
|
-
export { Migration as a, DbExecutor as c, validateSchemaPrefix as i, SqlValue as l, MIGRATIONS_TABLE as n, applyMigrations as o, readMigrationFiles as r, Db as s, DB_SERVICE as t };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"source": {
|
|
3
|
-
"repo": "acryldev/acryl",
|
|
4
|
-
"path": "plugins/acryl-db",
|
|
5
|
-
"commit": "20bdc263d6f0f8febbd967007bda4cf4a802efd2"
|
|
6
|
-
},
|
|
7
|
-
"vendored": [
|
|
8
|
-
"src",
|
|
9
|
-
"tests",
|
|
10
|
-
"LICENSE"
|
|
11
|
-
],
|
|
12
|
-
"rewrittenSpecifiers": 0,
|
|
13
|
-
"digest": "sha256:656f5bb8468ea1d1f5cef2fc14c4c3d3c8cfa1d85a75cebbf6bc98f1b2d245a7",
|
|
14
|
-
"testsNotRun": {},
|
|
15
|
-
"notice": [
|
|
16
|
-
"LICENSE"
|
|
17
|
-
]
|
|
18
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"source": {
|
|
3
|
-
"repo": "acryldev/acryl",
|
|
4
|
-
"path": "plugins/acryl-db-sqlite",
|
|
5
|
-
"commit": "20bdc263d6f0f8febbd967007bda4cf4a802efd2"
|
|
6
|
-
},
|
|
7
|
-
"vendored": [
|
|
8
|
-
"src",
|
|
9
|
-
"tests",
|
|
10
|
-
"LICENSE"
|
|
11
|
-
],
|
|
12
|
-
"rewrittenSpecifiers": 9,
|
|
13
|
-
"digest": "sha256:853af986073e5721c9b8fb5626b46bcd1ca8a6c5f936c4ac11fc3c21f3c5c0ef",
|
|
14
|
-
"testsNotRun": {
|
|
15
|
-
"tests/loader.spec.ts": "loads the plugin through the real Loader (@deepseek-ai/cordis-plugin-loader), which generated apps do not install; the plain opener it wraps is tested here by open.spec.ts and conformance.spec.ts",
|
|
16
|
-
"tests/plain-entry-imports.spec.ts": "a copy vendored into an app (with relative imports, no build of its own) has neither `lib/`; the app's own typecheck is what proves the copy names no Cordis type it does not provide."
|
|
17
|
-
},
|
|
18
|
-
"notice": [
|
|
19
|
-
"LICENSE"
|
|
20
|
-
]
|
|
21
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"source": {
|
|
3
|
-
"repo": "acryldev/acryl",
|
|
4
|
-
"path": "plugins/acryl-door",
|
|
5
|
-
"commit": "20bdc263d6f0f8febbd967007bda4cf4a802efd2"
|
|
6
|
-
},
|
|
7
|
-
"vendored": [
|
|
8
|
-
"src",
|
|
9
|
-
"tests",
|
|
10
|
-
"LICENSE"
|
|
11
|
-
],
|
|
12
|
-
"rewrittenSpecifiers": 13,
|
|
13
|
-
"digest": "sha256:90f0731ebb2e6d8a7c29e6f1e6f250cb2eb719b6622e5d9e5655281947584d6c",
|
|
14
|
-
"testsNotRun": {
|
|
15
|
-
"tests/page/accessible-name-hidden.spec.ts": "needs jsdom, a development dependency of ACRYL that generated apps do not install; it runs in ACRYL, and verify:scaffolder walks the door in a real browser",
|
|
16
|
-
"tests/page/channel.spec.ts": "needs jsdom, a development dependency of ACRYL that generated apps do not install; it runs in ACRYL, and verify:scaffolder walks the door in a real browser",
|
|
17
|
-
"tests/page/driver.spec.ts": "needs jsdom, a development dependency of ACRYL that generated apps do not install; it runs in ACRYL, and verify:scaffolder walks the door in a real browser",
|
|
18
|
-
"tests/page/indicator.spec.ts": "needs jsdom, a development dependency of ACRYL that generated apps do not install; it runs in ACRYL, and verify:scaffolder walks the door in a real browser",
|
|
19
|
-
"tests/page/visible-text.spec.ts": "needs jsdom, a development dependency of ACRYL that generated apps do not install; it runs in ACRYL, and verify:scaffolder walks the door in a real browser",
|
|
20
|
-
"tests/host/door.spec.ts": "needs jsdom, a development dependency of ACRYL that generated apps do not install; it runs in ACRYL, and verify:scaffolder walks the door in a real browser",
|
|
21
|
-
"tests/host/verbs.spec.ts": "needs jsdom, a development dependency of ACRYL that generated apps do not install; it runs in ACRYL, and verify:scaffolder walks the door in a real browser",
|
|
22
|
-
"tests/host/shim.spec.ts": "needs jsdom, a development dependency of ACRYL that generated apps do not install; it runs in ACRYL, and verify:scaffolder walks the door in a real browser",
|
|
23
|
-
"tests/host/loader.spec.ts": "loads the plugin through the real Loader (@deepseek-ai/cordis-plugin-loader), which generated apps do not install"
|
|
24
|
-
},
|
|
25
|
-
"notice": [
|
|
26
|
-
"LICENSE"
|
|
27
|
-
]
|
|
28
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"source": {
|
|
3
|
-
"repo": "acryldev/acryl",
|
|
4
|
-
"path": "plugins/acryl-inspect",
|
|
5
|
-
"commit": "20bdc263d6f0f8febbd967007bda4cf4a802efd2"
|
|
6
|
-
},
|
|
7
|
-
"vendored": [
|
|
8
|
-
"src",
|
|
9
|
-
"tests",
|
|
10
|
-
"LICENSE"
|
|
11
|
-
],
|
|
12
|
-
"rewrittenSpecifiers": 3,
|
|
13
|
-
"digest": "sha256:0a9aa6845197e3e0b3b9b3511fcad4980de29511c7dfdf7c38bf388d16c89d78",
|
|
14
|
-
"testsNotRun": {},
|
|
15
|
-
"notice": [
|
|
16
|
-
"LICENSE"
|
|
17
|
-
]
|
|
18
|
-
}
|