astroidjs 0.13.0 → 0.15.0

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.
@@ -25,7 +25,7 @@ export function generateWorkflowSchema(config) {
25
25
  const fk = `${config.key.replace(/s$/, "")}_id`;
26
26
  const camel = (s) => s.replace(/_(\w)/g, (_, c) => c.toUpperCase());
27
27
  const lines = [
28
- "// Workflow tables — generated by Astroid from defineWorkflow().",
28
+ "// Workflow tables—generated by Astroid from defineWorkflow().",
29
29
  "//",
30
30
  `// Stage model: \`${config.key}.stage\` is the stage currently IN PROGRESS`,
31
31
  `// (0–${stages.length - 1}); ${stages.length} means complete. A stage is done once its`,
@@ -35,7 +35,7 @@ export function generateWorkflowSchema(config) {
35
35
  `// stage: integer("stage").notNull().default(0),`,
36
36
  'import { index, integer, sqliteTable, text, uniqueIndex } from "drizzle-orm/sqlite-core";',
37
37
  "",
38
- `/** One row per COMPLETED stage — who signed it off, when, and what they recorded. */`,
38
+ `/** One row per COMPLETED stage—who signed it off, when, and what they recorded. */`,
39
39
  `export const ${camel(audit)} = sqliteTable(`,
40
40
  ` ${JSON.stringify(audit)},`,
41
41
  " {",
@@ -62,7 +62,7 @@ export function generateWorkflowSchema(config) {
62
62
  ");",
63
63
  ];
64
64
  if (override) {
65
- lines.push("", "/** Out-of-band moves — sending an item back a stage, or skipping one.", " * A pipeline you can override without a trace is one nobody trusts. */", `export const ${camel(override)} = sqliteTable(`, ` ${JSON.stringify(override)},`, " {", ' id: integer("id").primaryKey({ autoIncrement: true }),', ` ${camel(fk)}: text(${JSON.stringify(fk)}).notNull(),`, ' /** "back" | "skip". */', ' action: text("action").notNull(),', ' initials: text("initials").notNull(),', ' station: text("station"),', ' at: integer("at", { mode: "timestamp" })', " .notNull()", " .$defaultFn(() => new Date()),", " },", ` (t) => [index(${JSON.stringify(`${override}_entity_idx`)}).on(t.${camel(fk)})],`, ");");
65
+ lines.push("", "/** Out-of-band moves—sending an item back a stage, or skipping one.", " * A pipeline you can override without a trace is one nobody trusts. */", `export const ${camel(override)} = sqliteTable(`, ` ${JSON.stringify(override)},`, " {", ' id: integer("id").primaryKey({ autoIncrement: true }),', ` ${camel(fk)}: text(${JSON.stringify(fk)}).notNull(),`, ' /** "back" | "skip". */', ' action: text("action").notNull(),', ' initials: text("initials").notNull(),', ' station: text("station"),', ' at: integer("at", { mode: "timestamp" })', " .notNull()", " .$defaultFn(() => new Date()),", " },", ` (t) => [index(${JSON.stringify(`${override}_entity_idx`)}).on(t.${camel(fk)})],`, ");");
66
66
  }
67
67
  lines.push("", "/** Stage labels, index === stage number. */", `export const ${config.key.toUpperCase()}_STAGES = ${JSON.stringify(stages.map((s) => s.label))} as const;`, "");
68
68
  return { source: lines.join("\n"), stageColumn: 'stage: integer("stage").notNull().default(0),' };
@@ -82,8 +82,8 @@ export function generateWorkflowRoute(config) {
82
82
  `// Advance one ${config.key} item by a stage.`,
83
83
  "//",
84
84
  "// Scaffolded once; yours to edit. `advanceWorkflowStage` owns the part that",
85
- "// is easy to get wrong — the optimistic-concurrency guard, so two operators",
86
- "// pressing sign-off at the same moment can't run an item forward twice — and",
85
+ "// is easy to get wrong—the optimistic-concurrency guard, so two operators",
86
+ "// pressing sign-off at the same moment can't run an item forward twice—and",
87
87
  "// returns a status rather than throwing, because a conflict is an ordinary",
88
88
  "// outcome of two people working at once.",
89
89
  "//",
@@ -99,7 +99,7 @@ export function generateWorkflowRoute(config) {
99
99
  `const STAGE_COUNT = ${stages.length};`,
100
100
  "",
101
101
  "export const POST: APIRoute = async ({ request, locals }) => {",
102
- " // TODO: gate this. A pipeline advance is a privileged action — check the",
102
+ " // TODO: gate this. A pipeline advance is a privileged action—check the",
103
103
  " // portal session/role here before anything else.",
104
104
  " void locals;",
105
105
  "",
@@ -128,7 +128,7 @@ export function generateWorkflowRoute(config) {
128
128
  "",
129
129
  " if (!result.ok) return Response.json(result, { status: result.status });",
130
130
  "",
131
- " // TODO: per-stage side effects go here — `result.stage` is the stage now in",
131
+ " // TODO: per-stage side effects go here—`result.stage` is the stage now in",
132
132
  " // progress, and `result.complete` is true once the last one is signed.",
133
133
  "",
134
134
  " return Response.json(result);",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astroidjs",
3
- "version": "0.13.0",
3
+ "version": "0.15.0",
4
4
  "description": "Astroid — an opinionated meta-framework over Louise Toolkit and Astro for building editable, multi-editor sites on Cloudflare Workers.",
5
5
  "keywords": [
6
6
  "astro",
@@ -64,14 +64,14 @@
64
64
  "@typescript/native-preview": "7.0.0-dev.20260707.2",
65
65
  "@vitest/coverage-v8": "4.1.11",
66
66
  "astro": "^7.2.9",
67
- "louise-toolkit": "^0.31.0",
67
+ "louise-toolkit": "^0.33.0",
68
68
  "solid-js": "^1.9.15",
69
- "typescript": "^5.9.3",
69
+ "typescript": "^6.0.3",
70
70
  "vitest": "^4.1.11"
71
71
  },
72
72
  "peerDependencies": {
73
73
  "astro": "^7.0.9",
74
- "louise-toolkit": "^0.31.0",
74
+ "louise-toolkit": "^0.33.0",
75
75
  "solid-js": "^1.9.0"
76
76
  },
77
77
  "peerDependenciesMeta": {