@cosmicdrift/kumiko-dev-server 0.370.0 → 0.371.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/compose-stacks.d.ts
CHANGED
|
@@ -22,6 +22,8 @@ export type MailStackOptions = {
|
|
|
22
22
|
};
|
|
23
23
|
export type PagesStackOptions = {
|
|
24
24
|
readonly wrapLayout?: LegalPagesOptions["wrapLayout"];
|
|
25
|
+
/** Also serves the terms routes, see LegalPagesOptions.terms. */
|
|
26
|
+
readonly terms?: LegalPagesOptions["terms"];
|
|
25
27
|
};
|
|
26
28
|
export type GdprStackOptions = {
|
|
27
29
|
readonly order?: GdprStackOrder;
|
|
@@ -37,6 +39,8 @@ export type GdprStackOptions = {
|
|
|
37
39
|
* satisfies auth-foundation's boot check (#1570). Pass providers when the
|
|
38
40
|
* app also wants Bearer/PAT auth. */
|
|
39
41
|
readonly providers?: readonly FeatureDefinition[];
|
|
42
|
+
/** Roles allowed to use the compliance-profiles handlers; default access.admin. */
|
|
43
|
+
readonly access?: readonly string[];
|
|
40
44
|
};
|
|
41
45
|
export type UserDataRightsStackOptions = {
|
|
42
46
|
readonly userDataRights?: UserDataRightsOptions;
|
|
@@ -44,6 +48,8 @@ export type UserDataRightsStackOptions = {
|
|
|
44
48
|
};
|
|
45
49
|
export type OpsStackOptions = {
|
|
46
50
|
readonly delivery?: boolean;
|
|
51
|
+
/** Roles allowed to use the delivery handlers; default access.admin. */
|
|
52
|
+
readonly access?: readonly string[];
|
|
47
53
|
readonly audit?: boolean;
|
|
48
54
|
readonly jobs?: boolean;
|
|
49
55
|
readonly rateLimiting?: boolean;
|
package/dist/compose-stacks.js
CHANGED
|
@@ -53,7 +53,10 @@ export function composePagesStack(options = {}) {
|
|
|
53
53
|
// r.requires fails the boot. Mounting it here instead would collide with
|
|
54
54
|
// composeRendererStack (createRegistry rejects duplicate features).
|
|
55
55
|
return [
|
|
56
|
-
createLegalPagesFeature(
|
|
56
|
+
createLegalPagesFeature({
|
|
57
|
+
...(options.wrapLayout !== undefined && { wrapLayout: options.wrapLayout }),
|
|
58
|
+
...(options.terms !== undefined && { terms: options.terms }),
|
|
59
|
+
}),
|
|
57
60
|
];
|
|
58
61
|
}
|
|
59
62
|
export function composeRendererStack(options = {}) {
|
|
@@ -106,7 +109,7 @@ export function composeFileStack(options = {}) {
|
|
|
106
109
|
export function composeGdprStack(options = {}) {
|
|
107
110
|
const order = options.order ?? "retention-first";
|
|
108
111
|
const retention = withBootRequires(createDataRetentionFeature(), "composeGdprStack", ["kmsMode"]);
|
|
109
|
-
const compliance = createComplianceProfilesFeature();
|
|
112
|
+
const compliance = createComplianceProfilesFeature(options.access !== undefined ? { access: options.access } : {});
|
|
110
113
|
const out = order === "compliance-first" ? [compliance, retention] : [retention, compliance];
|
|
111
114
|
if (options.tenantLifecycle)
|
|
112
115
|
out.push(createTenantLifecycleFeature());
|
|
@@ -139,7 +142,7 @@ export function composeOpsStack(options = {}) {
|
|
|
139
142
|
const rateLimiting = options.rateLimiting ?? false;
|
|
140
143
|
const out = [];
|
|
141
144
|
if (delivery)
|
|
142
|
-
out.push(createDeliveryFeature());
|
|
145
|
+
out.push(createDeliveryFeature(options.access !== undefined ? { access: options.access } : {}));
|
|
143
146
|
if (audit)
|
|
144
147
|
out.push(createAuditFeature());
|
|
145
148
|
if (jobs)
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { type ComposeFeaturesOptions, composeFeatures, } from "@cosmicdrift/kumiko-server-runtime/compose-features";
|
|
2
2
|
export { type AuthStackOptions, composeAuthStack, composeFileStack, composeGdprStack, composeIdentityStack, composeMailStack, composeOpsStack, composePagesStack, composeRendererStack, composeSaasStack, composeSecurityStack, composeUserDataRightsStack, type FileProviderKind, type FileStackOptions, type GdprStackOptions, type GdprStackOrder, type IdentityStackOptions, type MailStackOptions, type MailTransportKind, type OpsStackOptions, type PagesStackOptions, type SaasStackBilling, type SaasStackOptions, type SecurityStackOptions, stackFeatureNames, type UserDataRightsStackOptions, } from "./compose-stacks.ts";
|
|
3
|
-
export { type CreateKumikoServerOptions, createKumikoServer, type KumikoServerHandle, PROD_BUNDLES_ENV, resolveStylesheet, STYLESHEET_WATCH_ENV, } from "./create-kumiko-server.ts";
|
|
3
|
+
export { type CreateKumikoServerOptions, createKumikoServer, type DevHostDispatch, type DevHostDispatchResult, type KumikoServerHandle, PROD_BUNDLES_ENV, resolveStylesheet, STYLESHEET_WATCH_ENV, } from "./create-kumiko-server.ts";
|
|
4
4
|
export { type FrameworkCoreEnv, frameworkCoreEnvSchema } from "./env-schema.ts";
|
|
5
5
|
export type { AuthoringStyle, BuildFewShotCorpusOptions, CorpusWarning, FewShotCorpus, FewShotEntry, } from "./few-shot-corpus.ts";
|
|
6
6
|
export { buildFewShotCorpus, pathToId } from "./few-shot-corpus.ts";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-dev-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.371.1",
|
|
4
4
|
"description": "Dev-tooling for Kumiko apps: local dev-server bootstrap (runDevApp), scaffolding. Its compose-stacks/env-schema subpaths are consumed at prod boot too — see @cosmicdrift/kumiko-server-runtime for the prod runner itself.",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
|
|
@@ -72,14 +72,14 @@
|
|
|
72
72
|
"kumiko-upgrade": "./bin/kumiko-upgrade.ts"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@cosmicdrift/kumiko-bundled-features": "0.
|
|
76
|
-
"@cosmicdrift/kumiko-framework": "0.
|
|
77
|
-
"@cosmicdrift/kumiko-headless": "0.
|
|
78
|
-
"@cosmicdrift/kumiko-renderer-mail-html": "0.
|
|
79
|
-
"@cosmicdrift/kumiko-renderer-web": "0.
|
|
80
|
-
"@cosmicdrift/kumiko-server-runtime": "0.
|
|
81
|
-
"@cosmicdrift/kumiko-testing": "0.
|
|
82
|
-
"@cosmicdrift/kumiko-types": "0.
|
|
75
|
+
"@cosmicdrift/kumiko-bundled-features": "0.371.1",
|
|
76
|
+
"@cosmicdrift/kumiko-framework": "0.371.1",
|
|
77
|
+
"@cosmicdrift/kumiko-headless": "0.371.1",
|
|
78
|
+
"@cosmicdrift/kumiko-renderer-mail-html": "0.371.1",
|
|
79
|
+
"@cosmicdrift/kumiko-renderer-web": "0.371.1",
|
|
80
|
+
"@cosmicdrift/kumiko-server-runtime": "0.371.1",
|
|
81
|
+
"@cosmicdrift/kumiko-testing": "0.371.1",
|
|
82
|
+
"@cosmicdrift/kumiko-types": "0.371.1",
|
|
83
83
|
"bun-types": "^1.3.13",
|
|
84
84
|
"ts-morph": "^28.0.0",
|
|
85
85
|
"zod": "^4.4.3"
|
package/src/changes.json
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.371.0",
|
|
4
|
+
"type": "improvement",
|
|
5
|
+
"title": "composeGdprStack access, composePagesStack terms, migrate-step project name",
|
|
6
|
+
"detail": "composeGdprStack({ access }) is passed to compliance-profiles and composeOpsStack({ access }) to delivery as their handler roles. composePagesStack({ terms }) is passed to legal-pages. DevHostDispatch and DevHostDispatchResult are exported. The migrate-step.sh template and the managed pre-push template follow the show-pony version, with the compose project name taken from docker compose config."
|
|
7
|
+
},
|
|
2
8
|
{
|
|
3
9
|
"version": "0.370.0",
|
|
4
10
|
"type": "improvement",
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
# changes BEFORE the app container starts — runProdApp's boot gate would
|
|
11
11
|
# otherwise abort with SchemaDriftError.
|
|
12
12
|
#
|
|
13
|
-
# Network: the exact `<
|
|
14
|
-
# script runs in
|
|
13
|
+
# Network: the exact `<project>_stack` name of the compose project this
|
|
14
|
+
# script runs in (project name as reported by `docker compose config`) —
|
|
15
|
+
# never another project's network on a shared host.
|
|
15
16
|
|
|
16
17
|
set -euo pipefail
|
|
17
18
|
|
|
@@ -22,12 +23,16 @@ set -a
|
|
|
22
23
|
. ./.env
|
|
23
24
|
set +a
|
|
24
25
|
|
|
25
|
-
# After the .env import, so
|
|
26
|
-
#
|
|
27
|
-
|
|
26
|
+
# After the .env import, so COMPOSE_PROJECT_NAME from there is honored. Ask
|
|
27
|
+
# compose first: it also takes the name from a top-level `name:` key. The
|
|
28
|
+
# fallback mirrors compose's normalization (lowercase, drop [^a-z0-9_-]).
|
|
29
|
+
COMPOSE_PROJECT="$(docker compose config 2>/dev/null | sed -n 's/^name: //p' | head -n1 || true)"
|
|
30
|
+
if [ -z "$COMPOSE_PROJECT" ]; then
|
|
31
|
+
COMPOSE_PROJECT="$(printf '%s' "${COMPOSE_PROJECT_NAME:-$(basename "$PWD")}" | tr '[:upper:]' '[:lower:]' | tr -cd 'a-z0-9_-')"
|
|
32
|
+
fi
|
|
28
33
|
STACK_NETWORK="${COMPOSE_PROJECT}_stack"
|
|
29
34
|
if ! docker network inspect "$STACK_NETWORK" >/dev/null 2>&1; then
|
|
30
|
-
echo "Stack network '$STACK_NETWORK' not found (
|
|
35
|
+
echo "Stack network '$STACK_NETWORK' not found (project name from 'docker compose config', fallback COMPOSE_PROJECT_NAME or directory name '$(basename "$PWD")'; 'docker compose -p <name>' is not detected, set COMPOSE_PROJECT_NAME in .env then) — compose project not running?" >&2
|
|
31
36
|
exit 1
|
|
32
37
|
fi
|
|
33
38
|
|
|
@@ -11,8 +11,9 @@ if [ -z "$REPO_ROOT" ]; then
|
|
|
11
11
|
exit 1
|
|
12
12
|
fi
|
|
13
13
|
|
|
14
|
-
# Walk up
|
|
15
|
-
#
|
|
14
|
+
# Walk up so a worktree without its own node_modules resolves via the parent
|
|
15
|
+
# install, but not past an enclosing repository: a bin above that boundary
|
|
16
|
+
# belongs to another project. `[ -x ]` also skips a broken (uninstalled) symlink.
|
|
16
17
|
BIN=""
|
|
17
18
|
DIR="$REPO_ROOT"
|
|
18
19
|
while true; do
|
|
@@ -24,6 +25,9 @@ while true; do
|
|
|
24
25
|
if [ "$DIR" = "/" ]; then
|
|
25
26
|
break
|
|
26
27
|
fi
|
|
28
|
+
if [ "$DIR" != "$REPO_ROOT" ] && [ -e "$DIR/.git" ]; then
|
|
29
|
+
break
|
|
30
|
+
fi
|
|
27
31
|
DIR="$(dirname "$DIR")"
|
|
28
32
|
done
|
|
29
33
|
|