@sdxc/kit 2026.10.16 → 2026.10.20
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/README.md +391 -20
- package/changelog.jsonl +1160 -1035
- package/config.schema.json +47 -1
- package/dist/author.d.ts +36 -0
- package/dist/author.js +107 -0
- package/dist/cli.js +12 -0
- package/dist/commands/create.js +9 -4
- package/dist/commands/deploy.d.ts +23 -0
- package/dist/commands/deploy.js +167 -0
- package/dist/commands/destroy.d.ts +22 -0
- package/dist/commands/destroy.js +92 -0
- package/dist/commands/doctor.d.ts +26 -0
- package/dist/commands/doctor.js +65 -0
- package/dist/commands/initializers.d.ts +16 -0
- package/dist/commands/initializers.js +23 -0
- package/dist/commands/make.d.ts +72 -6
- package/dist/commands/make.js +127 -19
- package/dist/commands/middleware.d.ts +16 -0
- package/dist/commands/middleware.js +21 -0
- package/dist/commands/models.d.ts +18 -0
- package/dist/commands/models.js +29 -0
- package/dist/commands/notes.d.ts +17 -0
- package/dist/commands/notes.js +27 -0
- package/dist/commands/routes.d.ts +25 -0
- package/dist/commands/routes.js +50 -0
- package/dist/commands/run.d.ts +18 -2
- package/dist/commands/run.js +35 -12
- package/dist/commands/scaffold.d.ts +29 -0
- package/dist/commands/scaffold.js +33 -0
- package/dist/commands/schedule.d.ts +16 -0
- package/dist/commands/schedule.js +21 -0
- package/dist/commands/stats.d.ts +16 -0
- package/dist/commands/stats.js +21 -0
- package/dist/commands/ui/update.d.ts +6 -3
- package/dist/commands/ui/update.js +24 -7
- package/dist/commands/upgrade.d.ts +3 -1
- package/dist/commands/upgrade.js +88 -23
- package/dist/config.d.ts +18 -0
- package/dist/config.js +28 -1
- package/dist/contract.d.ts +97 -3
- package/dist/contract.js +360 -26
- package/dist/create/templates.d.ts +8 -1
- package/dist/create/templates.js +26 -2
- package/dist/dependencies.d.ts +4 -1
- package/dist/dependencies.js +13 -1
- package/dist/deploy/plan.d.ts +49 -0
- package/dist/deploy/plan.js +68 -0
- package/dist/destroy.d.ts +40 -0
- package/dist/destroy.js +311 -0
- package/dist/doctor/check.d.ts +71 -0
- package/dist/doctor/check.js +53 -0
- package/dist/doctor/checks.d.ts +23 -0
- package/dist/doctor/checks.js +68 -0
- package/dist/doctor/define.d.ts +59 -0
- package/dist/doctor/define.js +16 -0
- package/dist/doctor/emails.d.ts +18 -0
- package/dist/doctor/emails.js +243 -0
- package/dist/doctor/env.d.ts +26 -0
- package/dist/doctor/env.js +88 -0
- package/dist/doctor/files.d.ts +14 -0
- package/dist/doctor/files.js +34 -0
- package/dist/doctor/fixture.d.ts +23 -0
- package/dist/doctor/fixture.js +46 -0
- package/dist/doctor/install.d.ts +17 -0
- package/dist/doctor/install.js +37 -0
- package/dist/doctor/installed.d.ts +11 -0
- package/dist/doctor/installed.js +79 -0
- package/dist/doctor/layout.d.ts +23 -0
- package/dist/doctor/layout.js +83 -0
- package/dist/doctor/migrations.d.ts +16 -0
- package/dist/doctor/migrations.js +96 -0
- package/dist/doctor/models.d.ts +13 -0
- package/dist/doctor/models.js +69 -0
- package/dist/doctor/pins.d.ts +15 -0
- package/dist/doctor/pins.js +79 -0
- package/dist/doctor/project.d.ts +58 -0
- package/dist/doctor/project.js +261 -0
- package/dist/doctor/remix.d.ts +14 -0
- package/dist/doctor/remix.js +44 -0
- package/dist/doctor/routes.d.ts +11 -0
- package/dist/doctor/routes.js +49 -0
- package/dist/doctor/typegen.d.ts +13 -0
- package/dist/doctor/typegen.js +57 -0
- package/dist/doctor/ui.d.ts +14 -0
- package/dist/doctor/ui.js +51 -0
- package/dist/init.d.ts +5 -3
- package/dist/init.js +15 -7
- package/dist/initializers.d.ts +25 -0
- package/dist/initializers.js +89 -0
- package/dist/lock.d.ts +2 -2
- package/dist/make/actions.d.ts +23 -0
- package/dist/make/actions.js +82 -0
- package/dist/make/declare.d.ts +32 -4
- package/dist/make/declare.js +405 -27
- package/dist/make/email.d.ts +23 -0
- package/dist/make/email.js +111 -0
- package/dist/make/from-fields.d.ts +30 -0
- package/dist/make/from-fields.js +162 -0
- package/dist/make/from-model.d.ts +39 -0
- package/dist/make/from-model.js +161 -0
- package/dist/make/generate.d.ts +16 -5
- package/dist/make/generate.js +43 -14
- package/dist/make/guard.d.ts +35 -0
- package/dist/make/guard.js +73 -0
- package/dist/make/imports.d.ts +6 -0
- package/dist/make/imports.js +19 -0
- package/dist/make/index.d.ts +47 -4
- package/dist/make/index.js +287 -25
- package/dist/make/kinds.d.ts +31 -3
- package/dist/make/kinds.js +82 -9
- package/dist/make/mount.d.ts +25 -0
- package/dist/make/mount.js +135 -0
- package/dist/make/schema-diff.d.ts +58 -0
- package/dist/make/schema-diff.js +609 -0
- package/dist/make/schema.d.ts +76 -0
- package/dist/make/schema.js +206 -0
- package/dist/make/stubs.d.ts +7 -5
- package/dist/make/stubs.js +16 -5
- package/dist/make/test.d.ts +43 -0
- package/dist/make/test.js +149 -0
- package/dist/make/trigger.d.ts +31 -0
- package/dist/make/trigger.js +163 -0
- package/dist/models.d.ts +42 -0
- package/dist/models.js +149 -0
- package/dist/notes.d.ts +28 -0
- package/dist/notes.js +66 -0
- package/dist/reference.d.ts +27 -0
- package/dist/reference.js +103 -0
- package/dist/releases.d.ts +9 -0
- package/dist/releases.js +29 -8
- package/dist/routes/chains.d.ts +34 -0
- package/dist/routes/chains.js +95 -0
- package/dist/routes/filter.d.ts +53 -0
- package/dist/routes/filter.js +147 -0
- package/dist/routes/format.d.ts +23 -0
- package/dist/routes/format.js +123 -0
- package/dist/routes/helpers.d.ts +21 -0
- package/dist/routes/helpers.js +165 -0
- package/dist/routes/index.d.ts +56 -0
- package/dist/routes/index.js +167 -0
- package/dist/routes/modules.d.ts +116 -0
- package/dist/routes/modules.js +235 -0
- package/dist/routes/parse.d.ts +161 -0
- package/dist/routes/parse.js +621 -0
- package/dist/routes/routers.d.ts +69 -0
- package/dist/routes/routers.js +327 -0
- package/dist/scaffold/fields.d.ts +129 -0
- package/dist/scaffold/fields.js +421 -0
- package/dist/scaffold/index.d.ts +37 -0
- package/dist/scaffold/index.js +613 -0
- package/dist/scaffold/render.d.ts +51 -0
- package/dist/scaffold/render.js +332 -0
- package/dist/schedule.d.ts +45 -0
- package/dist/schedule.js +124 -0
- package/dist/stats.d.ts +37 -0
- package/dist/stats.js +126 -0
- package/dist/testing.d.ts +12 -2
- package/dist/testing.js +22 -3
- package/dist/ui/commands.d.ts +10 -3
- package/dist/ui/commands.js +85 -15
- package/dist/ui/registry.d.ts +8 -8
- package/dist/upgrade/agents.d.ts +49 -0
- package/dist/upgrade/agents.js +110 -0
- package/dist/upgrade/changelog.d.ts +2 -2
- package/dist/upgrade/project.d.ts +4 -0
- package/dist/upgrade/project.js +11 -1
- package/dist/upgrade/prompt.d.ts +11 -0
- package/dist/upgrade/prompt.js +50 -7
- package/package.json +6 -4
- package/registry/ui/alert-dialog.json +2 -2
- package/registry/ui/attachment.json +2 -2
- package/registry/ui/calendar.json +2 -2
- package/registry/ui/color-picker.json +2 -2
- package/registry/ui/command.json +2 -2
- package/registry/ui/date-picker.json +2 -2
- package/registry/ui/date-range-picker.json +2 -2
- package/registry/ui/dialog.json +2 -2
- package/registry/ui/file-trigger.json +2 -2
- package/registry/ui/heading-scope.json +2 -2
- package/registry/ui/message-scroller.json +2 -2
- package/registry/ui/number-field.json +2 -2
- package/registry/ui/range-calendar.json +2 -2
- package/registry/ui/resizable.json +2 -2
- package/registry/ui/select.json +2 -2
- package/registry/ui/shared-element.json +2 -2
- package/stubs/command.stub +4 -0
- package/stubs/command.test.stub +3 -0
- package/stubs/controller.api.resource.stub +23 -0
- package/stubs/controller.api.stub +21 -0
- package/stubs/controller.api.test.stub +18 -0
- package/stubs/controller.form.stub +40 -10
- package/stubs/controller.form.test.stub +61 -0
- package/stubs/controller.resource.form.stub +67 -0
- package/stubs/controller.resource.stub +28 -0
- package/stubs/controller.stub +15 -8
- package/stubs/controller.test.stub +3 -0
- package/stubs/email.stub +15 -38
- package/stubs/email.test.stub +12 -7
- package/stubs/factory.stub +4 -1
- package/stubs/initializer.stub +2 -0
- package/stubs/initializer.test.stub +3 -0
- package/stubs/job.cron.stub +4 -0
- package/stubs/job.stub +4 -0
- package/stubs/job.test.stub +3 -0
- package/stubs/mcp.resource.stub +3 -0
- package/stubs/mcp.stub +3 -0
- package/stubs/mcp.test.stub +3 -0
- package/stubs/middleware.stub +6 -1
- package/stubs/middleware.test.stub +3 -0
- package/stubs/model.stub +12 -3
- package/stubs/model.test.stub +3 -0
- package/stubs/policy.test.stub +36 -7
- package/stubs/scaffold.api.create.stub +34 -0
- package/stubs/scaffold.api.create.test.stub +37 -0
- package/stubs/scaffold.api.destroy.stub +34 -0
- package/stubs/scaffold.api.destroy.test.stub +44 -0
- package/stubs/scaffold.api.index.stub +23 -0
- package/stubs/scaffold.api.index.test.stub +31 -0
- package/stubs/scaffold.api.show.stub +27 -0
- package/stubs/scaffold.api.show.test.stub +41 -0
- package/stubs/scaffold.api.update.stub +44 -0
- package/stubs/scaffold.api.update.test.stub +46 -0
- package/stubs/scaffold.command.create.stub +22 -0
- package/stubs/scaffold.command.create.test.stub +30 -0
- package/stubs/scaffold.command.delete.stub +20 -0
- package/stubs/scaffold.command.delete.test.stub +39 -0
- package/stubs/scaffold.command.list.stub +18 -0
- package/stubs/scaffold.command.list.test.stub +31 -0
- package/stubs/scaffold.command.show.stub +19 -0
- package/stubs/scaffold.command.show.test.stub +37 -0
- package/stubs/scaffold.controller.destroy.stub +35 -0
- package/stubs/scaffold.controller.destroy.test.stub +65 -0
- package/stubs/scaffold.controller.edit.stub +97 -0
- package/stubs/scaffold.controller.edit.test.stub +91 -0
- package/stubs/scaffold.controller.index.stub +55 -0
- package/stubs/scaffold.controller.index.test.stub +32 -0
- package/stubs/scaffold.controller.new.stub +70 -0
- package/stubs/scaffold.controller.new.test.stub +81 -0
- package/stubs/scaffold.controller.show.stub +59 -0
- package/stubs/scaffold.controller.show.test.stub +43 -0
- package/stubs/scaffold.factory.stub +16 -0
- package/stubs/scaffold.form.stub +75 -0
- package/stubs/scaffold.mcp.create.stub +24 -0
- package/stubs/scaffold.mcp.create.test.stub +36 -0
- package/stubs/scaffold.mcp.delete.stub +31 -0
- package/stubs/scaffold.mcp.delete.test.stub +43 -0
- package/stubs/scaffold.mcp.get.stub +21 -0
- package/stubs/scaffold.mcp.get.test.stub +31 -0
- package/stubs/scaffold.mcp.list.stub +23 -0
- package/stubs/scaffold.mcp.list.test.stub +25 -0
- package/stubs/scaffold.mcp.update.stub +37 -0
- package/stubs/scaffold.mcp.update.test.stub +40 -0
- package/stubs/scaffold.migration.stub +2 -0
- package/stubs/scaffold.model.stub +35 -0
- package/stubs/scaffold.model.test.stub +25 -0
- package/stubs/scaffold.test-database.stub +33 -0
- package/stubs/scaffold.test-mcp.stub +92 -0
- package/stubs/scaffold.validator.stub +18 -0
- package/stubs/scaffold.validator.test.stub +26 -0
- package/stubs/service.stub +4 -0
- package/stubs/service.test.stub +3 -0
- package/stubs/validator.stub +3 -0
- package/stubs/validator.test.stub +3 -0
- package/templates/app/.env.example +16 -0
- package/templates/app/AGENTS.md +163 -0
- package/templates/app/CLAUDE.md +1 -0
- package/templates/app/README.md +79 -37
- package/templates/app/app/commands/about.test.ts +1 -1
- package/templates/app/app/commands/console.test.ts +26 -0
- package/templates/app/app/commands/console.ts +19 -0
- package/templates/app/app/commands/db/console.ts +6 -0
- package/templates/app/app/commands/db/fresh.test.ts +57 -0
- package/templates/app/app/commands/db/fresh.ts +37 -0
- package/templates/app/app/commands/db/migrate.test.ts +46 -0
- package/templates/app/app/commands/db/migrate.ts +88 -0
- package/templates/app/app/commands/db/prepare.test.ts +39 -0
- package/templates/app/app/commands/db/prepare.ts +35 -0
- package/templates/app/app/commands/db/seed.test.ts +38 -0
- package/templates/app/app/commands/db/seed.ts +26 -0
- package/templates/app/app/commands/deploy.test.ts +34 -0
- package/templates/app/app/commands/deploy.ts +18 -0
- package/templates/app/app/commands/emails/preview.test.tsx +63 -0
- package/templates/app/app/commands/emails/preview.ts +24 -0
- package/templates/app/app/commands/index.ts +72 -1
- package/templates/app/app/commands/typegen.test.ts +17 -0
- package/templates/app/app/commands/typegen.ts +16 -0
- package/templates/app/app/emails/index.ts +10 -0
- package/templates/app/app/http/controllers/api/health.tsx +15 -0
- package/templates/app/app/http/controllers/api/not-found.tsx +16 -0
- package/templates/app/app/http/controllers/api/openapi.tsx +17 -0
- package/templates/app/app/http/controllers/home.tsx +21 -13
- package/templates/app/app/http/controllers/mcp.tsx +16 -0
- package/templates/app/app/http/controllers/not-found.tsx +23 -18
- package/templates/app/app/http/controllers/robots.test.ts +18 -0
- package/templates/app/app/http/controllers/robots.ts +24 -0
- package/templates/app/app/http/controllers/sitemap.test.ts +28 -0
- package/templates/app/app/http/controllers/sitemap.ts +25 -0
- package/templates/app/app/http/middleware/access.test.ts +43 -0
- package/templates/app/app/http/middleware/access.ts +41 -0
- package/templates/app/app/http/middleware/api.ts +19 -0
- package/templates/app/app/http/middleware/page.test.ts +43 -0
- package/templates/app/app/http/middleware/page.ts +51 -0
- package/templates/app/app/http/middleware/server-timing.test.ts +15 -0
- package/templates/app/app/http/middleware/server-timing.ts +42 -0
- package/templates/app/app/initializers/assets.ts +1 -1
- package/templates/app/app/initializers/captcha.ts +11 -0
- package/templates/app/app/initializers/cli.ts +68 -2
- package/templates/app/app/initializers/database.test.ts +18 -0
- package/templates/app/app/initializers/database.ts +18 -0
- package/templates/app/app/initializers/dispatcher.ts +26 -0
- package/templates/app/app/initializers/honeypot.ts +11 -0
- package/templates/app/app/initializers/i18n.test.ts +16 -0
- package/templates/app/app/initializers/i18n.ts +28 -0
- package/templates/app/app/initializers/local-database.test.ts +33 -0
- package/templates/app/app/initializers/local-database.ts +53 -0
- package/templates/app/app/initializers/mail-transport.test.ts +27 -0
- package/templates/app/app/initializers/mail-transport.ts +26 -0
- package/templates/app/app/initializers/mail.test.ts +27 -0
- package/templates/app/app/initializers/mail.ts +19 -0
- package/templates/app/app/initializers/mcp.ts +1 -1
- package/templates/app/app/initializers/openapi.ts +21 -0
- package/templates/app/app/initializers/router.test.ts +68 -0
- package/templates/app/app/initializers/router.tsx +81 -25
- package/templates/app/app/initializers/seo.ts +15 -0
- package/templates/app/app/initializers/session.test.ts +34 -0
- package/templates/app/app/initializers/session.ts +29 -0
- package/templates/app/app/initializers/spam.ts +10 -0
- package/templates/app/app/jobs/email.test.tsx +70 -0
- package/templates/app/app/jobs/email.ts +16 -0
- package/templates/app/app/jobs/index.ts +6 -2
- package/templates/app/app/models/index.ts +10 -0
- package/templates/app/app/policies/abilities.ts +13 -0
- package/templates/app/app/policies/policy.test.ts +15 -0
- package/templates/app/app/policies/policy.ts +30 -0
- package/templates/app/app/services/commands.ts +30 -0
- package/templates/app/app/services/migrations.test.ts +92 -0
- package/templates/app/app/services/migrations.ts +117 -0
- package/templates/app/app/test/cloudflare-workers.ts +25 -0
- package/templates/app/app/test/local-database.ts +67 -0
- package/templates/app/app/test/session.ts +28 -0
- package/templates/app/bootstrap/cli.ts +1 -1
- package/templates/app/bootstrap/console.ts +13 -0
- package/templates/app/bootstrap/worker.ts +4 -4
- package/templates/app/cloudflare.config.ts +30 -2
- package/templates/app/config/constants.ts +19 -0
- package/templates/app/config/problems.ts +24 -0
- package/templates/app/config/security-policy.ts +34 -0
- package/templates/app/config/security-txt.ts +28 -0
- package/templates/app/database/migrations/.gitkeep +0 -0
- package/templates/app/database/seed.ts +12 -0
- package/templates/app/package.json +37 -6
- package/templates/app/resources/layouts/document.tsx +28 -7
- package/templates/app/resources/locales/en.json +10 -0
- package/templates/app/routes/api.ts +29 -0
- package/templates/app/routes/web.ts +6 -4
- package/templates/app/vite.config.ts +4 -0
- package/stubs/policy.stub +0 -13
- package/templates/app/config/router-context.d.ts +0 -20
package/dist/commands/upgrade.js
CHANGED
|
@@ -14,16 +14,17 @@ import { compare } from "@sdxc/semver";
|
|
|
14
14
|
import { SDXC_COMMANDS } from "../contract.js";
|
|
15
15
|
import { packageRoot, project } from "../middleware.js";
|
|
16
16
|
import { lockFileAtOrAbove, packageManager } from "../package-manager.js";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { bumpManifest, currentRelease, listedScopedPackages, lists, projectImports, readManifest, } from "../upgrade/project.js";
|
|
17
|
+
import { datedPin, fetchPackuments, scopedPackageOf, versionAtRelease, versionsAt, } from "../releases.js";
|
|
18
|
+
import { AGENTS_FILE, planAgentsFile, writeAgentsFile } from "../upgrade/agents.js";
|
|
19
|
+
import { bumpManifest, currentRelease, listedScopedPackages, lists, pinnedRelease, projectImports, readManifest, } from "../upgrade/project.js";
|
|
20
20
|
import { buildPrompt } from "../upgrade/prompt.js";
|
|
21
21
|
import { fetchChangelog, fetchRelease, RELEASE_PACKAGE } from "../upgrade/registry.js";
|
|
22
22
|
/** The middleware `upgrade` runs behind. */
|
|
23
23
|
const UPGRADE_MIDDLEWARE = [project(), packageRoot()];
|
|
24
24
|
/**
|
|
25
25
|
* Exits 0 when done or already up to date, 1 when the upgrade failed or the target is older.
|
|
26
|
-
*
|
|
26
|
+
* A target equal to the project's release still re-pins what lags behind it, `remix` included,
|
|
27
|
+
* so "up to date" means no pin moves. Progress goes to stderr; stdout carries only the prompt.
|
|
27
28
|
*/
|
|
28
29
|
export default createCommand(SDXC_COMMANDS.upgrade, {
|
|
29
30
|
middleware: UPGRADE_MIDDLEWARE,
|
|
@@ -57,13 +58,37 @@ export default createCommand(SDXC_COMMANDS.upgrade, {
|
|
|
57
58
|
if (order < 0) {
|
|
58
59
|
return failure(new Error(`Release ${release.version} is older than the project's ${current}; upgrade only moves forward`));
|
|
59
60
|
}
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
let pins = await ctx.task(`Resolving ${scoped.length} @sdxc packages at ${release.version}`, async (task) => {
|
|
62
|
+
let packuments = await fetchPackuments(scoped, task.signal);
|
|
63
|
+
if (isFailure(packuments))
|
|
64
|
+
return packuments;
|
|
65
|
+
let versions = versionsAt(packuments.data, release.version);
|
|
66
|
+
if (isFailure(versions))
|
|
67
|
+
return versions;
|
|
68
|
+
return success({
|
|
69
|
+
versions: versions.data,
|
|
70
|
+
since: laggingSince(manifest, packuments.data, current),
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
if (isFailure(pins))
|
|
74
|
+
return pins;
|
|
75
|
+
let { since } = pins.data;
|
|
76
|
+
let versions = Object.fromEntries(pins.data.versions);
|
|
77
|
+
if (release.remix !== null && lists(manifest, "remix"))
|
|
78
|
+
versions.remix = release.remix;
|
|
79
|
+
let bumped = bumpManifest(text, versions);
|
|
80
|
+
if (bumped.bumps.length === 0) {
|
|
81
|
+
ctx.stderr(`The @sdxc packages are up to date at ${release.version}\n`);
|
|
62
82
|
return success();
|
|
63
83
|
}
|
|
64
|
-
let imports = await projectImports(root);
|
|
65
84
|
if (changelog !== null) {
|
|
66
|
-
let
|
|
85
|
+
let imports = await projectImports(root);
|
|
86
|
+
let proceed = await confirmBreaking(ctx, changelog, {
|
|
87
|
+
from: current,
|
|
88
|
+
since,
|
|
89
|
+
to: release.version,
|
|
90
|
+
imports,
|
|
91
|
+
});
|
|
67
92
|
if (isFailure(proceed))
|
|
68
93
|
return proceed;
|
|
69
94
|
if (!proceed.data) {
|
|
@@ -71,13 +96,6 @@ export default createCommand(SDXC_COMMANDS.upgrade, {
|
|
|
71
96
|
return success();
|
|
72
97
|
}
|
|
73
98
|
}
|
|
74
|
-
let pins = await ctx.task(`Resolving ${scoped.length} @sdxc packages at ${release.version}`, (task) => resolveRelease(scoped, release.version, task.signal));
|
|
75
|
-
if (isFailure(pins))
|
|
76
|
-
return pins;
|
|
77
|
-
let versions = Object.fromEntries(pins.data);
|
|
78
|
-
if (release.remix !== null && lists(manifest, "remix"))
|
|
79
|
-
versions.remix = release.remix;
|
|
80
|
-
let bumped = bumpManifest(text, versions);
|
|
81
99
|
let written = await wrap(() => writeFile(resolve(root, "package.json"), bumped.text));
|
|
82
100
|
if (isFailure(written))
|
|
83
101
|
return written;
|
|
@@ -96,6 +114,7 @@ export default createCommand(SDXC_COMMANDS.upgrade, {
|
|
|
96
114
|
"--prompt",
|
|
97
115
|
"--from",
|
|
98
116
|
current,
|
|
117
|
+
...[...since].flatMap(([name, pinned]) => ["--since", `${name}@${pinned}`]),
|
|
99
118
|
...(remixFrom === null ? [] : ["--remix-from", remixFrom]),
|
|
100
119
|
...(output === null ? [] : ["--output", output]),
|
|
101
120
|
];
|
|
@@ -113,16 +132,41 @@ export default createCommand(SDXC_COMMANDS.upgrade, {
|
|
|
113
132
|
return success();
|
|
114
133
|
},
|
|
115
134
|
});
|
|
116
|
-
/**
|
|
135
|
+
/**
|
|
136
|
+
* Rewrites the sdxc section of the project's `AGENTS.md` from this kit's release, then prints
|
|
137
|
+
* the prompt for that release, or writes it to `output`.
|
|
138
|
+
*/
|
|
117
139
|
async function printPrompt(ctx, from, output) {
|
|
140
|
+
let since = new Map();
|
|
141
|
+
for (let value of ctx.flags.since) {
|
|
142
|
+
let at = value.lastIndexOf("@");
|
|
143
|
+
let pinned = at > 0 ? datedPin(value.slice(at + 1)) : null;
|
|
144
|
+
if (pinned === null) {
|
|
145
|
+
return usage("--since takes <package>@<version>, such as @sdxc/jwt@2026.9.4");
|
|
146
|
+
}
|
|
147
|
+
since.set(value.slice(0, at), pinned);
|
|
148
|
+
}
|
|
149
|
+
let agents = await planAgentsFile(ctx.project.root, ctx.packageRoot);
|
|
150
|
+
if (isFailure(agents))
|
|
151
|
+
return agents;
|
|
118
152
|
let prompt = await buildPrompt({
|
|
119
153
|
root: ctx.project.root,
|
|
120
154
|
packageRoot: ctx.packageRoot,
|
|
121
155
|
from,
|
|
122
156
|
remixFrom: ctx.flags.remixFrom ?? null,
|
|
157
|
+
since,
|
|
158
|
+
...(agents.data === null ? {} : { agents: agents.data.status }),
|
|
123
159
|
});
|
|
124
160
|
if (isFailure(prompt))
|
|
125
161
|
return prompt;
|
|
162
|
+
if (agents.data !== null) {
|
|
163
|
+
let refreshed = await writeAgentsFile(ctx.project.root, agents.data);
|
|
164
|
+
if (isFailure(refreshed))
|
|
165
|
+
return refreshed;
|
|
166
|
+
if (agents.data.status === "refreshed") {
|
|
167
|
+
ctx.stderr(`${AGENTS_FILE}: refreshed the sdxc section\n`);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
126
170
|
if (output === null) {
|
|
127
171
|
ctx.stdout(prompt.data);
|
|
128
172
|
return success();
|
|
@@ -135,7 +179,7 @@ async function printPrompt(ctx, from, output) {
|
|
|
135
179
|
return success();
|
|
136
180
|
}
|
|
137
181
|
/**
|
|
138
|
-
* Finds the release `version` names on npm, and,
|
|
182
|
+
* Finds the release `version` names on npm, and, unless it is older than `current`, the
|
|
139
183
|
* changelog it ships. A changelog the CDN cannot serve is `null`, which skips the question
|
|
140
184
|
* about breaking changes rather than the upgrade.
|
|
141
185
|
*/
|
|
@@ -145,7 +189,7 @@ async function lookUp(ctx, version, current) {
|
|
|
145
189
|
if (isFailure(release))
|
|
146
190
|
return release;
|
|
147
191
|
task.update(`Found release ${release.data.version}`);
|
|
148
|
-
if (compare(release.data.version, current)
|
|
192
|
+
if (compare(release.data.version, current) < 0) {
|
|
149
193
|
return success({ release: release.data, changelog: null });
|
|
150
194
|
}
|
|
151
195
|
let changelog = await fetchChangelog(release.data.version, task.signal);
|
|
@@ -156,21 +200,42 @@ async function lookUp(ctx, version, current) {
|
|
|
156
200
|
});
|
|
157
201
|
}
|
|
158
202
|
/**
|
|
159
|
-
*
|
|
160
|
-
*
|
|
203
|
+
* The release each listed `@sdxc/*` package is pinned to when that pin is older than its version
|
|
204
|
+
* at `current`, by name, so the prompt covers its changes from its own pin; a package at its
|
|
205
|
+
* version, or pinned to no dated release, is left out and covered from `current`.
|
|
206
|
+
*/
|
|
207
|
+
function laggingSince(manifest, packuments, current) {
|
|
208
|
+
let since = new Map();
|
|
209
|
+
for (let packument of packuments) {
|
|
210
|
+
let pinned = pinnedRelease(manifest, packument.name);
|
|
211
|
+
let expected = versionAtRelease(packument, current);
|
|
212
|
+
if (pinned !== null && expected !== null && compare(pinned, expected) < 0) {
|
|
213
|
+
since.set(packument.name, pinned);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
return since;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Lists the breaking changes the move brings to packages the project imports, each package's
|
|
220
|
+
* from its entry in `since` or else `from`, up to `to`, and asks whether to go on. Without a
|
|
221
|
+
* terminal the upgrade goes on; with none to list nothing is asked.
|
|
161
222
|
*
|
|
162
223
|
* @returns Whether to bump `package.json`
|
|
163
224
|
*/
|
|
164
|
-
async function confirmBreaking(ctx, changelog,
|
|
225
|
+
async function confirmBreaking(ctx, changelog, range) {
|
|
165
226
|
let imported = new Set();
|
|
166
|
-
for (let specifier of imports.keys()) {
|
|
227
|
+
for (let specifier of range.imports.keys()) {
|
|
167
228
|
let name = scopedPackageOf(specifier);
|
|
168
229
|
if (name !== null)
|
|
169
230
|
imported.add(name);
|
|
170
231
|
}
|
|
171
|
-
let breaking =
|
|
232
|
+
let breaking = changelog.filter((entry) => entry.breaking &&
|
|
233
|
+
imported.has(entry.package) &&
|
|
234
|
+
compare(entry.release, range.since.get(entry.package) ?? range.from) > 0 &&
|
|
235
|
+
compare(entry.release, range.to) <= 0);
|
|
172
236
|
if (breaking.length === 0)
|
|
173
237
|
return success(true);
|
|
238
|
+
let to = range.to;
|
|
174
239
|
let count = breaking.length === 1 ? "1 breaking change" : `${breaking.length} breaking changes`;
|
|
175
240
|
ctx.stderr(`Release ${to} brings ${count} to packages this project imports:\n`);
|
|
176
241
|
for (let entry of breaking) {
|
package/dist/config.d.ts
CHANGED
|
@@ -29,6 +29,15 @@ export declare const CONFIG_SCHEMA: s.Schema<{
|
|
|
29
29
|
migrations?: Record<string, string> | undefined;
|
|
30
30
|
stubs?: string | undefined;
|
|
31
31
|
} | undefined;
|
|
32
|
+
doctor?: {
|
|
33
|
+
migrations?: {
|
|
34
|
+
accept?: {
|
|
35
|
+
file: string;
|
|
36
|
+
column: string;
|
|
37
|
+
}[] | undefined;
|
|
38
|
+
} | undefined;
|
|
39
|
+
checks?: string | undefined;
|
|
40
|
+
} | undefined;
|
|
32
41
|
lock?: string | undefined;
|
|
33
42
|
}, {
|
|
34
43
|
ui: {
|
|
@@ -42,6 +51,15 @@ export declare const CONFIG_SCHEMA: s.Schema<{
|
|
|
42
51
|
migrations: Record<string, string>;
|
|
43
52
|
stubs: string;
|
|
44
53
|
};
|
|
54
|
+
doctor: {
|
|
55
|
+
migrations: {
|
|
56
|
+
accept: {
|
|
57
|
+
file: string;
|
|
58
|
+
column: string;
|
|
59
|
+
}[];
|
|
60
|
+
};
|
|
61
|
+
checks: string;
|
|
62
|
+
};
|
|
45
63
|
lock: string;
|
|
46
64
|
$schema?: string | undefined;
|
|
47
65
|
format?: string[] | undefined;
|
package/dist/config.js
CHANGED
|
@@ -24,6 +24,20 @@ const MAKE_DEFAULTS = {
|
|
|
24
24
|
tests: true,
|
|
25
25
|
stubs: ".config/sdxc/stubs",
|
|
26
26
|
};
|
|
27
|
+
/**
|
|
28
|
+
* A migration error `sdxc doctor` accepts: the file that raised it and the column the error
|
|
29
|
+
* names, narrow enough that a different error in the same file still fails.
|
|
30
|
+
*/
|
|
31
|
+
const ACCEPTED_MIGRATION_FAILURE = s.object({
|
|
32
|
+
file: s.string().meta({ description: "Migration file name, without its folder" }),
|
|
33
|
+
column: s.string().meta({ description: "Column SQLite's error names" }),
|
|
34
|
+
}, { unknownKeys: "error" });
|
|
35
|
+
/** The `doctor.migrations` group as a project with no such key gets it. */
|
|
36
|
+
const DOCTOR_MIGRATIONS_DEFAULTS = {
|
|
37
|
+
accept: [],
|
|
38
|
+
};
|
|
39
|
+
/** The `doctor` group as a project with no `doctor` key gets it. */
|
|
40
|
+
const DOCTOR_DEFAULTS = { checks: ".config/sdxc/checks", migrations: DOCTOR_MIGRATIONS_DEFAULTS };
|
|
27
41
|
/**
|
|
28
42
|
* Every configuration key. Each leaf carries its default, or an example when it has none, and
|
|
29
43
|
* a description that becomes its comment in `sdxc init`'s output; an unknown key is an error, so
|
|
@@ -59,9 +73,21 @@ export const CONFIG_SCHEMA = s.object({
|
|
|
59
73
|
description: "Stubs here replace the built-in ones; `sdxc make stubs` copies them out",
|
|
60
74
|
}),
|
|
61
75
|
}, { unknownKeys: "error" }), MAKE_DEFAULTS),
|
|
76
|
+
doctor: s.defaulted(s.object({
|
|
77
|
+
checks: s.defaulted(s.string(), DOCTOR_DEFAULTS.checks).meta({
|
|
78
|
+
description: "Folder of the project's own checks, each module run by `sdxc doctor`",
|
|
79
|
+
}),
|
|
80
|
+
migrations: s.defaulted(s.object({
|
|
81
|
+
accept: s
|
|
82
|
+
.defaulted(s.array(ACCEPTED_MIGRATION_FAILURE), DOCTOR_MIGRATIONS_DEFAULTS.accept)
|
|
83
|
+
.meta({
|
|
84
|
+
description: "Migration errors `sdxc doctor` steps past, each a file that already ran and the column its error names",
|
|
85
|
+
}),
|
|
86
|
+
}, { unknownKeys: "error" }), DOCTOR_MIGRATIONS_DEFAULTS),
|
|
87
|
+
}, { unknownKeys: "error" }), DOCTOR_DEFAULTS),
|
|
62
88
|
format: s.optional(s.array(s.string()).pipe(checks.minItems(1))).meta({
|
|
63
89
|
description: "Command run on every file the CLI writes or edits, paths appended",
|
|
64
|
-
examples: [["bunx", "vp", "fmt"]],
|
|
90
|
+
examples: [["bunx", "vp", "fmt", "--no-error-on-unmatched-pattern"]],
|
|
65
91
|
}),
|
|
66
92
|
lock: s.defaulted(s.string(), ".config/sdxc.lock.jsonl").meta({
|
|
67
93
|
description: "Where the CLI keeps its state; commit it with the project",
|
|
@@ -144,6 +170,7 @@ function configuredPaths(config) {
|
|
|
144
170
|
let paths = [
|
|
145
171
|
["ui.directory", config.ui.directory],
|
|
146
172
|
["make.stubs", config.make.stubs],
|
|
173
|
+
["doctor.checks", config.doctor.checks],
|
|
147
174
|
["lock", config.lock],
|
|
148
175
|
];
|
|
149
176
|
for (let [chain, folder] of Object.entries(config.make.migrations)) {
|
package/dist/contract.d.ts
CHANGED
|
@@ -16,9 +16,30 @@ export declare const SDXC_COMMANDS: import("@sdxc/cli").Group<Omit<{
|
|
|
16
16
|
readonly template: import("@sdxc/cli").ValueFlag<string, true, false, false>;
|
|
17
17
|
readonly git: import("@sdxc/cli").Flag<boolean | undefined>;
|
|
18
18
|
}>;
|
|
19
|
+
readonly deploy: import("@sdxc/cli").Command<Readonly<Record<string, import("@sdxc/cli").Argument<unknown>>>, {
|
|
20
|
+
readonly yes: import("@sdxc/cli").Flag<boolean>;
|
|
21
|
+
readonly dryRun: import("@sdxc/cli").Flag<boolean>;
|
|
22
|
+
readonly skip: import("@sdxc/cli").ValueFlag<"build" | "migrate" | "deploy", false, true, false>;
|
|
23
|
+
}>;
|
|
24
|
+
readonly destroy: import("@sdxc/cli").Command<{
|
|
25
|
+
readonly kind: import("@sdxc/cli").Argument<"email" | "command" | "controller" | "middleware" | "validator" | "job" | "model" | "factory" | "service" | "initializer" | "mcp">;
|
|
26
|
+
readonly name: import("@sdxc/cli").Argument<string>;
|
|
27
|
+
}, {
|
|
28
|
+
readonly yes: import("@sdxc/cli").Flag<boolean>;
|
|
29
|
+
readonly dryRun: import("@sdxc/cli").Flag<boolean>;
|
|
30
|
+
readonly resource: import("@sdxc/cli").Flag<boolean>;
|
|
31
|
+
}>;
|
|
32
|
+
readonly doctor: import("@sdxc/cli").Command<Readonly<Record<string, import("@sdxc/cli").Argument<unknown>>>, {
|
|
33
|
+
readonly json: import("@sdxc/cli").Flag<boolean>;
|
|
34
|
+
readonly only: import("@sdxc/cli").ValueFlag<string, false, true, false>;
|
|
35
|
+
readonly skip: import("@sdxc/cli").ValueFlag<string, false, true, false>;
|
|
36
|
+
}>;
|
|
19
37
|
readonly init: import("@sdxc/cli").Command<Readonly<Record<string, import("@sdxc/cli").Argument<unknown>>>, {
|
|
20
38
|
readonly dryRun: import("@sdxc/cli").Flag<boolean>;
|
|
21
39
|
}>;
|
|
40
|
+
readonly initializers: import("@sdxc/cli").Command<Readonly<Record<string, import("@sdxc/cli").Argument<unknown>>>, {
|
|
41
|
+
readonly json: import("@sdxc/cli").Flag<boolean>;
|
|
42
|
+
}>;
|
|
22
43
|
readonly make: import("@sdxc/cli").Group<Omit<{
|
|
23
44
|
readonly description: "Write a controller, job, model or other file where the app layout puts it";
|
|
24
45
|
readonly arguments: {
|
|
@@ -28,28 +49,35 @@ export declare const SDXC_COMMANDS: import("@sdxc/cli").Group<Omit<{
|
|
|
28
49
|
readonly flags: {
|
|
29
50
|
readonly test: import("@sdxc/cli").Flag<boolean | undefined>;
|
|
30
51
|
readonly dryRun: import("@sdxc/cli").Flag<boolean>;
|
|
52
|
+
readonly force: import("@sdxc/cli").Flag<boolean>;
|
|
31
53
|
};
|
|
32
54
|
readonly tasks: true;
|
|
33
55
|
readonly controller: import("@sdxc/cli").Command<{
|
|
34
56
|
readonly name: import("@sdxc/cli").Argument<string>;
|
|
35
57
|
}, {
|
|
36
|
-
readonly method: import("@sdxc/cli").ValueFlag<"delete" | "get" | "post" | "put" | "patch" | "form",
|
|
58
|
+
readonly method: import("@sdxc/cli").ValueFlag<"delete" | "get" | "post" | "put" | "patch" | "form", false, false, false>;
|
|
37
59
|
readonly path: import("@sdxc/cli").ValueFlag<string, false, false, false>;
|
|
38
60
|
readonly routes: import("@sdxc/cli").ValueFlag<string, false, false, false>;
|
|
61
|
+
readonly resource: import("@sdxc/cli").ValueFlag<string, false, false, false>;
|
|
62
|
+
readonly actions: import("@sdxc/cli").ValueFlag<"index" | "all" | "new" | "show" | "edit" | "create" | "update" | "destroy", false, true, false>;
|
|
39
63
|
readonly test: import("@sdxc/cli").Flag<boolean | undefined>;
|
|
40
64
|
readonly dryRun: import("@sdxc/cli").Flag<boolean>;
|
|
65
|
+
readonly force: import("@sdxc/cli").Flag<boolean>;
|
|
41
66
|
}>;
|
|
42
67
|
readonly middleware: import("@sdxc/cli").Command<{
|
|
43
68
|
readonly name: import("@sdxc/cli").Argument<string>;
|
|
44
69
|
}, {
|
|
70
|
+
readonly mount: import("@sdxc/cli").ValueFlag<string, false, false, false>;
|
|
45
71
|
readonly test: import("@sdxc/cli").Flag<boolean | undefined>;
|
|
46
72
|
readonly dryRun: import("@sdxc/cli").Flag<boolean>;
|
|
73
|
+
readonly force: import("@sdxc/cli").Flag<boolean>;
|
|
47
74
|
}>;
|
|
48
75
|
readonly validator: import("@sdxc/cli").Command<{
|
|
49
76
|
readonly name: import("@sdxc/cli").Argument<string>;
|
|
50
77
|
}, {
|
|
51
78
|
readonly test: import("@sdxc/cli").Flag<boolean | undefined>;
|
|
52
79
|
readonly dryRun: import("@sdxc/cli").Flag<boolean>;
|
|
80
|
+
readonly force: import("@sdxc/cli").Flag<boolean>;
|
|
53
81
|
}>;
|
|
54
82
|
readonly job: import("@sdxc/cli").Command<{
|
|
55
83
|
readonly name: import("@sdxc/cli").Argument<string>;
|
|
@@ -57,47 +85,60 @@ export declare const SDXC_COMMANDS: import("@sdxc/cli").Group<Omit<{
|
|
|
57
85
|
readonly cron: import("@sdxc/cli").ValueFlag<string, false, false, false>;
|
|
58
86
|
readonly test: import("@sdxc/cli").Flag<boolean | undefined>;
|
|
59
87
|
readonly dryRun: import("@sdxc/cli").Flag<boolean>;
|
|
88
|
+
readonly force: import("@sdxc/cli").Flag<boolean>;
|
|
60
89
|
}>;
|
|
61
90
|
readonly model: import("@sdxc/cli").Command<{
|
|
62
91
|
readonly name: import("@sdxc/cli").Argument<string>;
|
|
92
|
+
readonly fields: import("@sdxc/cli").Argument<string[]>;
|
|
63
93
|
}, {
|
|
94
|
+
readonly chain: import("@sdxc/cli").ValueFlag<string, false, false, false>;
|
|
95
|
+
readonly skip: import("@sdxc/cli").ValueFlag<"migration" | "factory", false, true, false>;
|
|
64
96
|
readonly test: import("@sdxc/cli").Flag<boolean | undefined>;
|
|
65
97
|
readonly dryRun: import("@sdxc/cli").Flag<boolean>;
|
|
98
|
+
readonly force: import("@sdxc/cli").Flag<boolean>;
|
|
66
99
|
}>;
|
|
67
100
|
readonly migration: import("@sdxc/cli").Command<{
|
|
68
101
|
readonly name: import("@sdxc/cli").Argument<string>;
|
|
102
|
+
readonly fields: import("@sdxc/cli").Argument<string[]>;
|
|
69
103
|
}, {
|
|
70
104
|
readonly chain: import("@sdxc/cli").ValueFlag<string, false, false, false>;
|
|
105
|
+
readonly fromModel: import("@sdxc/cli").ValueFlag<string, false, false, false>;
|
|
71
106
|
readonly dryRun: import("@sdxc/cli").Flag<boolean>;
|
|
72
107
|
}>;
|
|
73
108
|
readonly factory: import("@sdxc/cli").Command<{
|
|
74
109
|
readonly name: import("@sdxc/cli").Argument<string>;
|
|
75
110
|
}, {
|
|
76
111
|
readonly dryRun: import("@sdxc/cli").Flag<boolean>;
|
|
112
|
+
readonly force: import("@sdxc/cli").Flag<boolean>;
|
|
77
113
|
}>;
|
|
78
114
|
readonly service: import("@sdxc/cli").Command<{
|
|
79
115
|
readonly name: import("@sdxc/cli").Argument<string>;
|
|
80
116
|
}, {
|
|
81
117
|
readonly test: import("@sdxc/cli").Flag<boolean | undefined>;
|
|
82
118
|
readonly dryRun: import("@sdxc/cli").Flag<boolean>;
|
|
119
|
+
readonly force: import("@sdxc/cli").Flag<boolean>;
|
|
83
120
|
}>;
|
|
84
121
|
readonly policy: import("@sdxc/cli").Command<{
|
|
85
122
|
readonly name: import("@sdxc/cli").Argument<string>;
|
|
86
123
|
}, {
|
|
87
124
|
readonly test: import("@sdxc/cli").Flag<boolean | undefined>;
|
|
88
125
|
readonly dryRun: import("@sdxc/cli").Flag<boolean>;
|
|
126
|
+
readonly force: import("@sdxc/cli").Flag<boolean>;
|
|
89
127
|
}>;
|
|
90
128
|
readonly initializer: import("@sdxc/cli").Command<{
|
|
91
129
|
readonly name: import("@sdxc/cli").Argument<string>;
|
|
92
130
|
}, {
|
|
93
131
|
readonly test: import("@sdxc/cli").Flag<boolean | undefined>;
|
|
94
132
|
readonly dryRun: import("@sdxc/cli").Flag<boolean>;
|
|
133
|
+
readonly force: import("@sdxc/cli").Flag<boolean>;
|
|
95
134
|
}>;
|
|
96
135
|
readonly email: import("@sdxc/cli").Command<{
|
|
97
136
|
readonly name: import("@sdxc/cli").Argument<string>;
|
|
137
|
+
readonly fields: import("@sdxc/cli").Argument<string[]>;
|
|
98
138
|
}, {
|
|
99
139
|
readonly test: import("@sdxc/cli").Flag<boolean | undefined>;
|
|
100
140
|
readonly dryRun: import("@sdxc/cli").Flag<boolean>;
|
|
141
|
+
readonly force: import("@sdxc/cli").Flag<boolean>;
|
|
101
142
|
}>;
|
|
102
143
|
readonly mcp: import("@sdxc/cli").Command<{
|
|
103
144
|
readonly name: import("@sdxc/cli").Argument<string>;
|
|
@@ -105,15 +146,23 @@ export declare const SDXC_COMMANDS: import("@sdxc/cli").Group<Omit<{
|
|
|
105
146
|
readonly resource: import("@sdxc/cli").Flag<boolean>;
|
|
106
147
|
readonly test: import("@sdxc/cli").Flag<boolean | undefined>;
|
|
107
148
|
readonly dryRun: import("@sdxc/cli").Flag<boolean>;
|
|
149
|
+
readonly force: import("@sdxc/cli").Flag<boolean>;
|
|
108
150
|
}>;
|
|
109
151
|
readonly command: import("@sdxc/cli").Command<{
|
|
110
152
|
readonly name: import("@sdxc/cli").Argument<string>;
|
|
111
153
|
}, {
|
|
112
154
|
readonly test: import("@sdxc/cli").Flag<boolean | undefined>;
|
|
113
155
|
readonly dryRun: import("@sdxc/cli").Flag<boolean>;
|
|
156
|
+
readonly force: import("@sdxc/cli").Flag<boolean>;
|
|
157
|
+
}>;
|
|
158
|
+
readonly test: import("@sdxc/cli").Command<{
|
|
159
|
+
readonly file: import("@sdxc/cli").Argument<string>;
|
|
160
|
+
}, {
|
|
161
|
+
readonly dryRun: import("@sdxc/cli").Flag<boolean>;
|
|
162
|
+
readonly force: import("@sdxc/cli").Flag<boolean>;
|
|
114
163
|
}>;
|
|
115
164
|
readonly stubs: import("@sdxc/cli").Command<{
|
|
116
|
-
readonly kinds: import("@sdxc/cli").Argument<import("./make/kinds.js").KindName[]>;
|
|
165
|
+
readonly kinds: import("@sdxc/cli").Argument<(import("./make/kinds.js").KindName | "scaffold")[]>;
|
|
117
166
|
}, Readonly<Record<string, import("@sdxc/cli").Flag<unknown>>>>;
|
|
118
167
|
}, "description" | "hidden" | "arguments" | "flags" | "tasks">, {
|
|
119
168
|
readonly kind: import("@sdxc/cli").Argument<import("./make/kinds.js").KindName>;
|
|
@@ -121,10 +170,52 @@ export declare const SDXC_COMMANDS: import("@sdxc/cli").Group<Omit<{
|
|
|
121
170
|
}, {
|
|
122
171
|
readonly test: import("@sdxc/cli").Flag<boolean | undefined>;
|
|
123
172
|
readonly dryRun: import("@sdxc/cli").Flag<boolean>;
|
|
173
|
+
readonly force: import("@sdxc/cli").Flag<boolean>;
|
|
174
|
+
}>;
|
|
175
|
+
readonly middleware: import("@sdxc/cli").Command<Readonly<Record<string, import("@sdxc/cli").Argument<unknown>>>, {
|
|
176
|
+
readonly json: import("@sdxc/cli").Flag<boolean>;
|
|
177
|
+
}>;
|
|
178
|
+
readonly models: import("@sdxc/cli").Command<{
|
|
179
|
+
readonly names: import("@sdxc/cli").Argument<string[]>;
|
|
180
|
+
}, {
|
|
181
|
+
readonly json: import("@sdxc/cli").Flag<boolean>;
|
|
182
|
+
}>;
|
|
183
|
+
readonly notes: import("@sdxc/cli").Command<Readonly<Record<string, import("@sdxc/cli").Argument<unknown>>>, {
|
|
184
|
+
readonly tag: import("@sdxc/cli").ValueFlag<string, false, true, false>;
|
|
185
|
+
readonly json: import("@sdxc/cli").Flag<boolean>;
|
|
186
|
+
}>;
|
|
187
|
+
readonly routes: import("@sdxc/cli").Command<Readonly<Record<string, import("@sdxc/cli").Argument<unknown>>>, {
|
|
188
|
+
readonly json: import("@sdxc/cli").Flag<boolean>;
|
|
189
|
+
readonly expanded: import("@sdxc/cli").Flag<boolean>;
|
|
190
|
+
readonly grep: import("@sdxc/cli").ValueFlag<string, false, false, false>;
|
|
191
|
+
readonly controller: import("@sdxc/cli").ValueFlag<string, false, false, false>;
|
|
192
|
+
readonly method: import("@sdxc/cli").ValueFlag<string, false, false, false>;
|
|
193
|
+
readonly contract: import("@sdxc/cli").ValueFlag<string, false, false, false>;
|
|
194
|
+
readonly unused: import("@sdxc/cli").Flag<boolean>;
|
|
195
|
+
readonly exceptPath: import("@sdxc/cli").ValueFlag<string, false, true, false>;
|
|
196
|
+
readonly sort: import("@sdxc/cli").ValueFlag<"name" | "pattern" | "controller" | "method", false, false, false>;
|
|
124
197
|
}>;
|
|
125
198
|
readonly run: import("@sdxc/cli").Command<{
|
|
126
199
|
readonly args: import("@sdxc/cli").Argument<string[]>;
|
|
127
200
|
}, Readonly<Record<string, import("@sdxc/cli").Flag<unknown>>>>;
|
|
201
|
+
readonly scaffold: import("@sdxc/cli").Command<{
|
|
202
|
+
readonly name: import("@sdxc/cli").Argument<string>;
|
|
203
|
+
readonly fields: import("@sdxc/cli").Argument<string[]>;
|
|
204
|
+
}, {
|
|
205
|
+
readonly plural: import("@sdxc/cli").ValueFlag<string, false, false, false>;
|
|
206
|
+
readonly mcp: import("@sdxc/cli").Flag<boolean>;
|
|
207
|
+
readonly command: import("@sdxc/cli").Flag<boolean>;
|
|
208
|
+
readonly api: import("@sdxc/cli").Flag<boolean>;
|
|
209
|
+
readonly skip: import("@sdxc/cli").ValueFlag<"validator" | "model" | "migration" | "factory" | "policy" | "pages", false, true, false>;
|
|
210
|
+
readonly test: import("@sdxc/cli").Flag<boolean | undefined>;
|
|
211
|
+
readonly dryRun: import("@sdxc/cli").Flag<boolean>;
|
|
212
|
+
}>;
|
|
213
|
+
readonly schedule: import("@sdxc/cli").Command<Readonly<Record<string, import("@sdxc/cli").Argument<unknown>>>, {
|
|
214
|
+
readonly json: import("@sdxc/cli").Flag<boolean>;
|
|
215
|
+
}>;
|
|
216
|
+
readonly stats: import("@sdxc/cli").Command<Readonly<Record<string, import("@sdxc/cli").Argument<unknown>>>, {
|
|
217
|
+
readonly json: import("@sdxc/cli").Flag<boolean>;
|
|
218
|
+
}>;
|
|
128
219
|
readonly ui: import("@sdxc/cli").Group<Omit<{
|
|
129
220
|
readonly description: "Copy @sdxc/ui components into the project and keep imports on the copies";
|
|
130
221
|
readonly list: import("@sdxc/cli").Command<Readonly<Record<string, import("@sdxc/cli").Argument<unknown>>>, Readonly<Record<string, import("@sdxc/cli").Flag<unknown>>>>;
|
|
@@ -138,8 +229,10 @@ export declare const SDXC_COMMANDS: import("@sdxc/cli").Group<Omit<{
|
|
|
138
229
|
readonly component: import("@sdxc/cli").Argument<string>;
|
|
139
230
|
}, Readonly<Record<string, import("@sdxc/cli").Flag<unknown>>>>;
|
|
140
231
|
readonly update: import("@sdxc/cli").Command<{
|
|
141
|
-
readonly components: import("@sdxc/cli").Argument<
|
|
232
|
+
readonly components: import("@sdxc/cli").Argument<string[]>;
|
|
142
233
|
}, {
|
|
234
|
+
readonly all: import("@sdxc/cli").Flag<boolean>;
|
|
235
|
+
readonly withDeps: import("@sdxc/cli").Flag<boolean>;
|
|
143
236
|
readonly force: import("@sdxc/cli").Flag<boolean>;
|
|
144
237
|
readonly dryRun: import("@sdxc/cli").Flag<boolean>;
|
|
145
238
|
}>;
|
|
@@ -156,6 +249,7 @@ export declare const SDXC_COMMANDS: import("@sdxc/cli").Group<Omit<{
|
|
|
156
249
|
readonly output: import("@sdxc/cli").ValueFlag<string, false, false, false>;
|
|
157
250
|
readonly prompt: import("@sdxc/cli").Flag<boolean>;
|
|
158
251
|
readonly from: import("@sdxc/cli").ValueFlag<string, false, false, false>;
|
|
252
|
+
readonly since: import("@sdxc/cli").ValueFlag<string, false, true, false>;
|
|
159
253
|
readonly remixFrom: import("@sdxc/cli").ValueFlag<string, false, false, false>;
|
|
160
254
|
}>;
|
|
161
255
|
}, "description" | "hidden" | "arguments" | "flags" | "tasks">, Record<never, never>, Record<never, never>>;
|