create-absolutejs 0.16.0 → 0.17.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/CHANGELOG.md ADDED
@@ -0,0 +1,13 @@
1
+ # Changelog
2
+
3
+ All notable changes to `create-absolutejs`.
4
+
5
+ This file is generated by `absolute-changelog` from the entries in
6
+ `changelog/`. Edit an entry, not this file — and add new ones under
7
+ `changelog/unreleased/`.
8
+
9
+ ## 0.17.1 — 2026-09-22
10
+
11
+ ### Fixed
12
+
13
+ - **Generate the Elysia 2 onError lifecycle instead of an unsupported on error hook**
package/README.md CHANGED
@@ -116,7 +116,14 @@ Usage: create-absolute [project-name] [options]
116
116
  ORM to configure: `drizzle` | `prisma` | `none`.
117
117
 
118
118
  - `--plugin <plugin>`
119
- Elysia plugin(s) to include (repeatable); `none` skips plugin setup.
119
+ Elysia plugin(s) to include (repeatable); `none` skips plugin setup. Select
120
+ `@absolutejs/observability` to mount the credential-safe error, Replay,
121
+ vitals, and Support Mode relay from environment configuration.
122
+
123
+ ```bash
124
+ bun create absolutejs my-app \
125
+ --plugin @absolutejs/observability
126
+ ```
120
127
 
121
128
  - `--react`
122
129
  Include a React frontend.
package/changelog.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "contract": 1,
3
+ "name": "create-absolutejs",
4
+ "releases": [
5
+ {
6
+ "version": "0.17.1",
7
+ "date": "2026-09-22",
8
+ "changes": [
9
+ {
10
+ "kind": "fixed",
11
+ "summary": "Generate the Elysia 2 onError lifecycle instead of an unsupported on error hook"
12
+ }
13
+ ]
14
+ }
15
+ ]
16
+ }
package/dist/data.js CHANGED
@@ -53,6 +53,19 @@ export const availableFrontends = [
53
53
  ];
54
54
  export const availableORMs = ['drizzle', 'prisma', 'none'];
55
55
  export const availablePlugins = [
56
+ {
57
+ imports: [
58
+ {
59
+ config: null,
60
+ importFrom: '@absolutejs/observability/elysia',
61
+ isPlugin: true,
62
+ packageName: 'createManagedObservabilityRelayFromEnv'
63
+ }
64
+ ],
65
+ label: magenta('🔎 @absolutejs/observability + Support Mode'),
66
+ latestVersion: versions['@absolutejs/observability'],
67
+ value: '@absolutejs/observability'
68
+ },
56
69
  {
57
70
  imports: [{ config: null, isPlugin: true, packageName: 'cors' }],
58
71
  label: cyan('⚙️ @elysia/cors'),
@@ -14,10 +14,17 @@ export const generateImportsBlock = ({ deps, flags, orm, authOption, databaseEng
14
14
  const importsList = dependency.imports ?? [];
15
15
  if (importsList.length === 0)
16
16
  continue;
17
- rawImports.push(`import { ${importsList
18
- .map((imp) => imp.packageName)
19
- .sort()
20
- .join(', ')} } from '${dependency.value}'`);
17
+ const bySource = new Map();
18
+ for (const imported of importsList) {
19
+ const source = imported.importFrom ?? dependency.value;
20
+ bySource.set(source, [
21
+ ...(bySource.get(source) ?? []),
22
+ imported.packageName
23
+ ]);
24
+ }
25
+ for (const [source, names] of bySource) {
26
+ rawImports.push(`import { ${names.sort().join(', ')} } from '${source}'`);
27
+ }
21
28
  }
22
29
  const buildExamplePath = (dir, file) => `../frontend${dir ? `/${dir}` : ''}/pages/${file}`;
23
30
  const reactDir = frontendDirectories.react;
@@ -75,9 +75,8 @@ const server = new Elysia()
75
75
  ${useBlock}${authOption === 'abs' ? `\n${guardBlock}` : ''}
76
76
  ${routesBlock}
77
77
  .use(networking)
78
- .on('error', err => {
79
- const { request } = err
80
- console.error(\`Server error on \${request.method} \${request.url}: \${err.message}\`)
78
+ .onError(({ request, error }) => {
79
+ console.error(\`Server error on \${request.method} \${request.url}\`, error)
81
80
  })
82
81
 
83
82
  export type Server = typeof server
package/dist/types.d.ts CHANGED
@@ -23,6 +23,7 @@ export type FrontendDirectories = Partial<Record<Frontend, string>>;
23
23
  export type ImportEntry = {
24
24
  packageName: string;
25
25
  isPlugin: boolean;
26
+ importFrom?: string;
26
27
  config?: Record<string, unknown> | null;
27
28
  };
28
29
  export type AvailableDependency = {
@@ -20,6 +20,7 @@ export declare const versions: {
20
20
  readonly '@absolutejs/execution': "0.14.4";
21
21
  readonly '@absolutejs/manifest': "0.9.0";
22
22
  readonly '@absolutejs/mcp': "0.12.0";
23
+ readonly '@absolutejs/observability': "0.6.0";
23
24
  readonly '@absolutejs/policy': "0.2.0";
24
25
  readonly '@absolutejs/secrets': "0.7.0";
25
26
  readonly '@absolutejs/sync-bus-pg': "0.2.0";
package/dist/versions.js CHANGED
@@ -21,6 +21,7 @@ export const versions = {
21
21
  '@absolutejs/execution': '0.14.4',
22
22
  '@absolutejs/manifest': '0.9.0',
23
23
  '@absolutejs/mcp': '0.12.0',
24
+ '@absolutejs/observability': '0.6.0',
24
25
  '@absolutejs/policy': '0.2.0',
25
26
  '@absolutejs/secrets': '0.7.0',
26
27
  '@absolutejs/sync-bus-pg': '0.2.0',
package/package.json CHANGED
@@ -11,6 +11,7 @@
11
11
  "description": "A CLI tool to create a new AbsoluteJS project",
12
12
  "devDependencies": {
13
13
  "@absolutejs/absolute": "0.20.0-beta.0",
14
+ "@absolutejs/changelog": "^0.6.0",
14
15
  "@eslint/compat": "2.0.2",
15
16
  "@stylistic/eslint-plugin": "5.9.0",
16
17
  "@types/bun": "1.3.8",
@@ -31,6 +32,8 @@
31
32
  "vue": "3.5.27"
32
33
  },
33
34
  "files": [
35
+ "CHANGELOG.md",
36
+ "changelog.json",
34
37
  "dist",
35
38
  "dist/templates"
36
39
  ],
@@ -50,9 +53,10 @@
50
53
  "release": "bun run format && bun run check:package && bun publish",
51
54
  "test": "cd absolutejs-project && bun dev",
52
55
  "test:unit": "bun test tests/",
53
- "check:package": "bun run typecheck && bun run test:unit && bun run build",
54
- "typecheck": "bun run tsc --noEmit"
56
+ "check:package": "bun run typecheck && bun run test:unit && bun run build && absolute-changelog check",
57
+ "typecheck": "bun run tsc --noEmit",
58
+ "prepublishOnly": "bun run check:package"
55
59
  },
56
60
  "type": "module",
57
- "version": "0.16.0"
61
+ "version": "0.17.1"
58
62
  }