@ultimat3/cli 22.6.0 → 22.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultimat3/cli",
3
- "version": "22.6.0",
3
+ "version": "22.6.1",
4
4
  "description": "The `x` binary: new, dev, build, verify, generate, db, mcp, doctor, deploy",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -38,33 +38,33 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@babel/core": "^8.0.1",
41
- "@ultimat3/action": "22.6.0",
42
- "@ultimat3/admin": "22.6.0",
43
- "@ultimat3/ai": "22.6.0",
44
- "@ultimat3/auth": "22.6.0",
45
- "@ultimat3/cache": "22.6.0",
46
- "@ultimat3/core": "22.6.0",
47
- "@ultimat3/db": "22.6.0",
48
- "@ultimat3/entity": "22.6.0",
49
- "@ultimat3/flags": "22.6.0",
50
- "@ultimat3/http": "22.6.0",
51
- "@ultimat3/i18n": "22.6.0",
52
- "@ultimat3/jobs": "22.6.0",
53
- "@ultimat3/mail": "22.6.0",
54
- "@ultimat3/manifest": "22.6.0",
55
- "@ultimat3/mcp": "22.6.0",
56
- "@ultimat3/money": "22.6.0",
57
- "@ultimat3/notify": "22.6.0",
58
- "@ultimat3/policy": "22.6.0",
59
- "@ultimat3/pwa": "22.6.0",
60
- "@ultimat3/query": "22.6.0",
61
- "@ultimat3/realtime": "22.6.0",
62
- "@ultimat3/render": "22.6.0",
63
- "@ultimat3/schema": "22.6.0",
64
- "@ultimat3/seo": "22.6.0",
65
- "@ultimat3/storage": "22.6.0",
66
- "@ultimat3/testing": "22.6.0",
67
- "@ultimat3/time": "22.6.0",
41
+ "@ultimat3/action": "22.6.1",
42
+ "@ultimat3/admin": "22.6.1",
43
+ "@ultimat3/ai": "22.6.1",
44
+ "@ultimat3/auth": "22.6.1",
45
+ "@ultimat3/cache": "22.6.1",
46
+ "@ultimat3/core": "22.6.1",
47
+ "@ultimat3/db": "22.6.1",
48
+ "@ultimat3/entity": "22.6.1",
49
+ "@ultimat3/flags": "22.6.1",
50
+ "@ultimat3/http": "22.6.1",
51
+ "@ultimat3/i18n": "22.6.1",
52
+ "@ultimat3/jobs": "22.6.1",
53
+ "@ultimat3/mail": "22.6.1",
54
+ "@ultimat3/manifest": "22.6.1",
55
+ "@ultimat3/mcp": "22.6.1",
56
+ "@ultimat3/money": "22.6.1",
57
+ "@ultimat3/notify": "22.6.1",
58
+ "@ultimat3/policy": "22.6.1",
59
+ "@ultimat3/pwa": "22.6.1",
60
+ "@ultimat3/query": "22.6.1",
61
+ "@ultimat3/realtime": "22.6.1",
62
+ "@ultimat3/render": "22.6.1",
63
+ "@ultimat3/schema": "22.6.1",
64
+ "@ultimat3/seo": "22.6.1",
65
+ "@ultimat3/storage": "22.6.1",
66
+ "@ultimat3/testing": "22.6.1",
67
+ "@ultimat3/time": "22.6.1",
68
68
  "babel-preset-solid": "^1.9.15"
69
69
  }
70
70
  }
@@ -3,13 +3,11 @@
3
3
  // nothing lists keeps the positional `anonymous-job-2` that `job()` minted, on the queue row, in
4
4
  // `x.manifest.json` and in every dead-letter trace — under a green gate (plan 101 slice 11 b).
5
5
 
6
+ import { API_INDEX } from './app-root';
6
7
  import { containedPath } from './generate-write';
7
8
  import { camel } from './templates/naming';
8
9
  import { wrapList } from './templates/wrap';
9
10
 
10
- /** The one file `defineApi` is called from in a scaffolded app. */
11
- export const API_INDEX = 'apps/web/api/index.ts';
12
-
13
11
  /** One module to import as a namespace and list under a `defineApi` key. */
14
12
  export interface ApiEntry {
15
13
  readonly key: 'jobs' | 'tasks';
package/src/app-load.ts CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  // Bun ships no `Bun.*` path API: `relative`/`sep` turn an absolute scan hit into the app-root-
7
7
  // relative POSIX path every finding and every manifest fact is keyed by.
8
- import { join, relative, sep } from 'node:path';
8
+ import { join, relative, resolve, sep } from 'node:path';
9
9
  import { listActions, registerActions } from '@ultimat3/action';
10
10
  import { describeEntities } from '@ultimat3/entity';
11
11
  import { localeConfig } from '@ultimat3/i18n';
@@ -28,7 +28,7 @@ import {
28
28
  // accident one refactor away from compiling every app's `.tsx` to `React.createElement`. The named
29
29
  // import is a value import, so the side effect holds without the bare line it replaced.
30
30
  import { setStylesheetRoot } from '@ultimat3/render/server';
31
- import { APP_CONFIG_FILE } from './app-root';
31
+ import { API_INDEX, APP_CONFIG_FILE } from './app-root';
32
32
  import { collectDeclaredCodes } from './error-contract';
33
33
  import type { Finding } from './output';
34
34
  import { findingFrom } from './output';
@@ -116,11 +116,17 @@ export function resetAppLoad(): void {
116
116
  }
117
117
 
118
118
  /**
119
- * Every module path the app globs match, SORTED. `Bun.Glob` answers in directory order, which is
120
- * the filesystem's — ext4 hashes names with a per-filesystem seed — so two pods of one image
121
- * imported the app in two orders, registered its stylesheets in two orders, and served two
122
- * different `/styles/<hash>.css` for one page (notificado.co, 22.3.2). Import order is the
123
- * stylesheet cascade's order, so it must be the same everywhere.
119
+ * Every module path the app globs match, SORTED — with the API index first. `Bun.Glob` answers in
120
+ * directory order, which is the filesystem's — ext4 hashes names with a per-filesystem seed — so
121
+ * two pods of one image imported the app in two orders, registered its stylesheets in two orders,
122
+ * and served two different `/styles/<hash>.css` for one page (notificado.co, 22.3.2). Import order
123
+ * is the stylesheet cascade's order, so it must be the same everywhere.
124
+ *
125
+ * The API index leads because `defineApi({ http: { pathStyle } })` is what every action URL is
126
+ * derived under: sorted, `apps/admin/**` evaluated before it, and a module-level
127
+ * `derivePath('signOut').path` there captured the default style's `/api/outs/sign` — a form
128
+ * posting to a URL no route served (notificado.co, 22.6.0). Anything still evaluated before the
129
+ * declaration (the index's own imports) is refused at it, `X_ACTION_PATH_DERIVED_EARLY`.
124
130
  */
125
131
  export async function appModulePaths(root: string): Promise<readonly string[]> {
126
132
  // Pattern by pattern, as before — only the order WITHIN a pattern was the filesystem's.
@@ -134,7 +140,9 @@ export async function appModulePaths(root: string): Promise<readonly string[]> {
134
140
  }
135
141
  found.push(...matched.sort((a, b) => (a < b ? -1 : a > b ? 1 : 0)));
136
142
  }
137
- return found;
143
+ // Resolved, like the glob's own answers: `loadApp('.')` is a legal call.
144
+ const index = resolve(root, API_INDEX);
145
+ return found.includes(index) ? [index, ...found.filter((path) => path !== index)] : found;
138
146
  }
139
147
 
140
148
  export async function loadApp(root: string): Promise<LoadedApp> {
package/src/app-root.ts CHANGED
@@ -6,6 +6,12 @@ import { dirname, join, resolve } from 'node:path';
6
6
  import { BunVersionError, NotInAppError } from './errors';
7
7
 
8
8
  export const APP_CONFIG_FILE = 'app.config.ts';
9
+
10
+ /**
11
+ * The one file `defineApi` is called from in a scaffolded app — here, beside the config file, so
12
+ * the module scan can import it first without pulling the generators into the serve graph.
13
+ */
14
+ export const API_INDEX = 'apps/web/api/index.ts';
9
15
  export const MANIFEST_FILE = 'x.manifest.json';
10
16
  /**
11
17
  * The floor the shipped `x` enforces, and it must not sit below what `x` EMITS. It said `1.3.0`