@nanobpm/urban 0.23.1 → 0.24.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.
@@ -1,6 +1,6 @@
1
1
  import type { HostContext } from "./host.ts";
2
2
  import type { AppManifest, Worker } from "@nanobpm/nano-app-schema";
3
- export type { ActionDecl, AppManifest, ChatSurface, Connection, Data, DataSource, DomainField, DomainType, LlmBinding, Models, PagesSurface, Runtime, Security, Surfaces, TaskInboxSurface, Trigger, TriggerAction, Worker, } from "@nanobpm/nano-app-schema";
3
+ export type { ActionDecl, AppManifest, AppUi, ChatSurface, Connection, Data, DataSource, DomainField, DomainType, LlmBinding, Models, PagesSurface, Runtime, Security, Surfaces, TaskInboxSurface, Trigger, TriggerAction, Worker, } from "@nanobpm/nano-app-schema";
4
4
  declare module "@nanobpm/nano-app-schema" {
5
5
  interface Models {
6
6
  /** `{{name}}` template sources substituted into model resources at deploy time: globs, a bare
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nanobpm/urban",
3
- "version": "0.23.1",
3
+ "version": "0.24.0",
4
4
  "description": "Urban: build and run code-first apps on Nano — runtime, derivation toolkit, and CLI in one. Author durable processes with @nanobpm/workflow (defineFlow), a typed datasource, forms, triggers and surfaces from a nano.app.json manifest, on Node or Deno.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -62,11 +62,11 @@
62
62
  "test:deno": "deno test -A --no-check src/"
63
63
  },
64
64
  "dependencies": {
65
- "@nanobpm/nano-app-schema": "^0.1.0",
65
+ "@nanobpm/nano-app-schema": "^0.2.0",
66
66
  "@nanobpm/nano-sdk": "^1.2.3",
67
67
  "@nanobpm/workflow": "^0.8.0",
68
68
  "bpmn-auto-layout": "^2.0.0-alpha.2",
69
- "create-urban-app": "^0.5.0"
69
+ "create-urban-app": "^0.7.0"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@types/node": "^22.20.1",
@@ -14,6 +14,7 @@ import type { AppManifest, Worker } from "@nanobpm/nano-app-schema";
14
14
  export type {
15
15
  ActionDecl,
16
16
  AppManifest,
17
+ AppUi,
17
18
  ChatSurface,
18
19
  Connection,
19
20
  Data,
@@ -32,10 +33,11 @@ export type {
32
33
  Worker,
33
34
  } from "@nanobpm/nano-app-schema";
34
35
 
35
- // The published `@nanobpm/nano-app-schema` does not yet declare `models.templates`; the manifest
36
+ // The published `@nanobpm/nano-app-schema` does not declare `models.templates`; the manifest
36
37
  // validator only enforces `additionalProperties:false` at the top level (see validate.ts), so the
37
38
  // nested key is accepted at runtime. Augment `Models` here so the deploy path can read it typed
38
- // (no cast) until it is formalized in the schema package.
39
+ // (no cast) until it is formalized in the schema package. (The top-level `ui` block, by contrast,
40
+ // now ships natively in the schema as `AppUi` — re-exported above — so it needs no shim.)
39
41
  declare module "@nanobpm/nano-app-schema" {
40
42
  interface Models {
41
43
  /** `{{name}}` template sources substituted into model resources at deploy time: globs, a bare
@@ -37,6 +37,14 @@ test("an `actions` array is an accepted top-level key (ADR 0055 §3)", () => {
37
37
  assert.deepEqual(issues, []);
38
38
  });
39
39
 
40
+ test("a `ui` block is an accepted top-level key (Studio App View, ADR 0057 / nano-bpm #638)", () => {
41
+ const issues = collectManifestIssues({
42
+ ...valid,
43
+ ui: { enabled: true, portEnv: "PORT", path: "/", label: "Nano Workforce" },
44
+ });
45
+ assert.deepEqual(issues, []);
46
+ });
47
+
40
48
  test("bad schemaVersion and bad slug id are reported", () => {
41
49
  const issues = collectManifestIssues({ ...valid, schemaVersion: 2, id: "Not A Slug" });
42
50
  assert.ok(issues.some((i) => i.path === "schemaVersion"));