@palbase/backend 34.1.0 → 35.0.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.
- package/LICENSE +21 -0
- package/dist/bin/palbase-backend.cjs +0 -0
- package/dist/bin/palbase-backend.cjs.map +1 -1
- package/dist/bin/palbase-backend.js +2 -2
- package/dist/{chunk-X2UYIXDS.js → chunk-6FEHCEB7.js} +4 -2
- package/dist/chunk-6FEHCEB7.js.map +1 -0
- package/dist/{chunk-XZPDPYVY.js → chunk-BOD3DT6D.js} +2 -2
- package/dist/{chunk-5UGPXKMJ.js → chunk-L4R7WXLH.js} +4 -1
- package/dist/chunk-L4R7WXLH.js.map +1 -0
- package/dist/db/index.cjs.map +1 -1
- package/dist/db/index.d.cts +2 -2
- package/dist/db/index.d.ts +2 -2
- package/dist/db/index.js +1 -1
- package/dist/{endpoint-BXPdsTA5.d.ts → endpoint-BI0yGuEL.d.ts} +61 -2
- package/dist/{endpoint-DqhUP7RT.d.cts → endpoint-DaGnjt42.d.cts} +61 -2
- package/dist/engine/index.cjs.map +1 -1
- package/dist/engine/index.d.cts +3 -3
- package/dist/engine/index.d.ts +3 -3
- package/dist/engine/index.js +2 -2
- package/dist/{index-Co0Hj_aO.d.cts → index-DllNjpTl.d.cts} +2 -2
- package/dist/{index-MhCL7ll4.d.ts → index-E8Sd6NFy.d.ts} +2 -2
- package/dist/index.cjs +36 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -8
- package/dist/index.d.ts +13 -8
- package/dist/index.js +32 -3
- package/dist/index.js.map +1 -1
- package/dist/openapi/index.d.cts +2 -2
- package/dist/openapi/index.d.ts +2 -2
- package/dist/{registry-BkIVHPzB.d.cts → registry-BnKvIyve.d.cts} +1 -1
- package/dist/{registry-CvGLR5j1.d.ts → registry-zDCj0eOU.d.ts} +1 -1
- package/dist/test/index.d.cts +1 -1
- package/dist/test/index.d.ts +1 -1
- package/package.json +15 -15
- package/stager/generics.js +12 -4
- package/stager/stage.js +38 -3
- package/template/scripts/test.sh +0 -0
- package/dist/chunk-5UGPXKMJ.js.map +0 -1
- package/dist/chunk-X2UYIXDS.js.map +0 -1
- /package/dist/{chunk-XZPDPYVY.js.map → chunk-BOD3DT6D.js.map} +0 -0
package/dist/openapi/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OpenApiGeneratorV31 } from '@asteasolutions/zod-to-openapi';
|
|
2
2
|
import { ZodTypeAny } from 'zod';
|
|
3
|
-
import { A as AuthSpec, R as RateLimitConfig } from '../endpoint-
|
|
4
|
-
import { P as ParamMeta, T as ThrowDescriptor, U as UploadConfig, S as SseConfig } from '../registry-
|
|
3
|
+
import { A as AuthSpec, R as RateLimitConfig } from '../endpoint-DaGnjt42.cjs';
|
|
4
|
+
import { P as ParamMeta, T as ThrowDescriptor, U as UploadConfig, S as SseConfig } from '../registry-BnKvIyve.cjs';
|
|
5
5
|
import '../stack.cjs';
|
|
6
6
|
import '../db/env.cjs';
|
|
7
7
|
import 'node:async_hooks';
|
package/dist/openapi/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OpenApiGeneratorV31 } from '@asteasolutions/zod-to-openapi';
|
|
2
2
|
import { ZodTypeAny } from 'zod';
|
|
3
|
-
import { A as AuthSpec, R as RateLimitConfig } from '../endpoint-
|
|
4
|
-
import { P as ParamMeta, T as ThrowDescriptor, U as UploadConfig, S as SseConfig } from '../registry-
|
|
3
|
+
import { A as AuthSpec, R as RateLimitConfig } from '../endpoint-BI0yGuEL.js';
|
|
4
|
+
import { P as ParamMeta, T as ThrowDescriptor, U as UploadConfig, S as SseConfig } from '../registry-zDCj0eOU.js';
|
|
5
5
|
import '../stack.js';
|
|
6
6
|
import '../db/env.js';
|
|
7
7
|
import 'node:async_hooks';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as DatabaseBudget, A as AuthSpec, R as RateLimitConfig } from './endpoint-
|
|
1
|
+
import { D as DatabaseBudget, A as AuthSpec, R as RateLimitConfig } from './endpoint-DaGnjt42.cjs';
|
|
2
2
|
import { ZodTypeAny } from 'zod';
|
|
3
3
|
import { PalbaseBucketName } from './stack.cjs';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as DatabaseBudget, A as AuthSpec, R as RateLimitConfig } from './endpoint-
|
|
1
|
+
import { D as DatabaseBudget, A as AuthSpec, R as RateLimitConfig } from './endpoint-BI0yGuEL.js';
|
|
2
2
|
import { ZodTypeAny } from 'zod';
|
|
3
3
|
import { PalbaseBucketName } from './stack.js';
|
|
4
4
|
|
package/dist/test/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { T as Token } from '../module-Dl1KFVtc.cjs';
|
|
2
|
-
import { E as EnvServiceDatabase, a as DBClient, b as RuntimeServices } from '../endpoint-
|
|
2
|
+
import { E as EnvServiceDatabase, a as DBClient, b as RuntimeServices } from '../endpoint-DaGnjt42.cjs';
|
|
3
3
|
import 'zod';
|
|
4
4
|
import '../stack.cjs';
|
|
5
5
|
import '../db/env.cjs';
|
package/dist/test/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { T as Token } from '../module-Dl1KFVtc.js';
|
|
2
|
-
import { E as EnvServiceDatabase, a as DBClient, b as RuntimeServices } from '../endpoint-
|
|
2
|
+
import { E as EnvServiceDatabase, a as DBClient, b as RuntimeServices } from '../endpoint-BI0yGuEL.js';
|
|
3
3
|
import 'zod';
|
|
4
4
|
import '../stack.js';
|
|
5
5
|
import '../db/env.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@palbase/backend",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "35.0.0",
|
|
4
4
|
"description": "Palbase Backend SDK — class controllers (@Controller/@Get/@Post + @Body/@QueryParams/@Param), error classes, schema DSL",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -94,24 +94,12 @@
|
|
|
94
94
|
"stager",
|
|
95
95
|
"template"
|
|
96
96
|
],
|
|
97
|
-
"scripts": {
|
|
98
|
-
"build": "tsup && npm run build:stager",
|
|
99
|
-
"test": "vitest run",
|
|
100
|
-
"test:watch": "vitest",
|
|
101
|
-
"typecheck": "tsc --noEmit",
|
|
102
|
-
"docs:build": "node scripts/build-llms.mjs",
|
|
103
|
-
"emit:openapi-fixture": "tsx scripts/emit-openapi-fixture.mjs",
|
|
104
|
-
"check:api": "node scripts/api-surface.mjs",
|
|
105
|
-
"api:update": "node scripts/api-surface.mjs --update",
|
|
106
|
-
"build:stager": "mkdir -p stager && for f in src/stager/*.js; do case \"$f\" in *.test.js) ;; *) cp \"$f\" stager/ ;; esac; done && cp src/stager/package.json stager/"
|
|
107
|
-
},
|
|
108
97
|
"dependencies": {
|
|
109
98
|
"@asteasolutions/zod-to-openapi": "^7.3.4",
|
|
110
99
|
"reflect-metadata": "^0.2.2",
|
|
111
100
|
"zod": "^3.24.0"
|
|
112
101
|
},
|
|
113
102
|
"devDependencies": {
|
|
114
|
-
"@palbase/core": "workspace:^",
|
|
115
103
|
"@swc/core": "^1.16.1",
|
|
116
104
|
"@types/node": "^25.5.2",
|
|
117
105
|
"bun-types": "^1.4.0",
|
|
@@ -121,12 +109,24 @@
|
|
|
121
109
|
"tsx": "^4.22.4",
|
|
122
110
|
"typescript": "^5.7.0",
|
|
123
111
|
"unplugin-swc": "^1.5.11",
|
|
124
|
-
"vitest": "^3.0.0"
|
|
112
|
+
"vitest": "^3.0.0",
|
|
113
|
+
"@palbase/core": "^2.4.0"
|
|
125
114
|
},
|
|
126
115
|
"publishConfig": {
|
|
127
116
|
"access": "public"
|
|
128
117
|
},
|
|
129
118
|
"bin": {
|
|
130
119
|
"palbase-backend": "./dist/bin/palbase-backend.js"
|
|
120
|
+
},
|
|
121
|
+
"scripts": {
|
|
122
|
+
"build": "tsup && npm run build:stager",
|
|
123
|
+
"test": "vitest run",
|
|
124
|
+
"test:watch": "vitest",
|
|
125
|
+
"typecheck": "tsc --noEmit",
|
|
126
|
+
"docs:build": "node scripts/build-llms.mjs",
|
|
127
|
+
"emit:openapi-fixture": "tsx scripts/emit-openapi-fixture.mjs",
|
|
128
|
+
"check:api": "node scripts/api-surface.mjs",
|
|
129
|
+
"api:update": "node scripts/api-surface.mjs --update",
|
|
130
|
+
"build:stager": "mkdir -p stager && for f in src/stager/*.js; do case \"$f\" in *.test.js) ;; *) cp \"$f\" stager/ ;; esac; done && cp src/stager/package.json stager/"
|
|
131
131
|
}
|
|
132
|
-
}
|
|
132
|
+
}
|
package/stager/generics.js
CHANGED
|
@@ -163,6 +163,12 @@ const SKIP = new Set([
|
|
|
163
163
|
'.palbase',
|
|
164
164
|
'.palbase-staged-controllers',
|
|
165
165
|
'.palbase-build-controllers',
|
|
166
|
+
// An iOS app's build output beside the backend (stage.js SKIP, same list):
|
|
167
|
+
// not source, large, and Xcode writes symlinks into it.
|
|
168
|
+
'DerivedData',
|
|
169
|
+
'.build',
|
|
170
|
+
'Pods',
|
|
171
|
+
'xcuserdata',
|
|
166
172
|
]);
|
|
167
173
|
|
|
168
174
|
function sources(dir, root, out) {
|
|
@@ -173,12 +179,14 @@ function sources(dir, root, out) {
|
|
|
173
179
|
return out;
|
|
174
180
|
}
|
|
175
181
|
for (const entry of entries) {
|
|
176
|
-
if (
|
|
177
|
-
|
|
178
|
-
|
|
182
|
+
if (SKIP.has(entry.name)) continue;
|
|
183
|
+
// Symlinks are skipped here for the same reason stage.js skips them: this
|
|
184
|
+
// walk runs BEFORE staging, on the whole project root, and a dangling link
|
|
185
|
+
// whose name ends in `.ts` used to refuse the entire push with ENOENT one
|
|
186
|
+
// function before the stager's own guard could (W4 r2 C-2).
|
|
187
|
+
if (entry.isSymbolicLink()) continue;
|
|
179
188
|
const full = path.join(dir, entry.name);
|
|
180
189
|
if (entry.isDirectory()) {
|
|
181
|
-
if (SKIP.has(entry.name)) continue;
|
|
182
190
|
sources(full, root, out);
|
|
183
191
|
} else if (/\.(c?ts|tsx)$/i.test(entry.name) && !/\.d\.ts$/i.test(entry.name)) {
|
|
184
192
|
out.push(full);
|
package/stager/stage.js
CHANGED
|
@@ -36,9 +36,23 @@ const throwAnalysis = require("./throw_analysis.js");
|
|
|
36
36
|
* resolves from above the staged tree anyway, and `.palbase*` holds build output
|
|
37
37
|
* including previous staging runs.
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
//
|
|
40
|
+
// The last four are an iOS app's build output, which lives BESIDE the backend
|
|
41
|
+
// in a project that ships both (the 2026-09-06 demo did). None of it is source
|
|
42
|
+
// the stager could type, all of it is large, and Xcode writes symlinks into it.
|
|
43
|
+
const SKIP = new Set([
|
|
44
|
+
"node_modules",
|
|
45
|
+
"dist",
|
|
46
|
+
"build",
|
|
47
|
+
".git",
|
|
48
|
+
".palbase",
|
|
49
|
+
"DerivedData",
|
|
50
|
+
".build",
|
|
51
|
+
"Pods",
|
|
52
|
+
"xcuserdata",
|
|
53
|
+
]);
|
|
40
54
|
|
|
41
|
-
function walk(dir) {
|
|
55
|
+
function walk(dir, root = dir) {
|
|
42
56
|
const out = [];
|
|
43
57
|
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
44
58
|
// Skipped by NAME, not by type: `node_modules` is often a SYMLINK (pnpm, and
|
|
@@ -46,8 +60,29 @@ function walk(dir) {
|
|
|
46
60
|
// for one — so a type-gated check walked straight into it and tried to
|
|
47
61
|
// `copyFileSync` a symlinked directory. Measured: ENOTSUP, copyfile.
|
|
48
62
|
if (SKIP.has(entry.name) || entry.name.startsWith(".palbase")) continue;
|
|
63
|
+
// And every OTHER symlink is skipped by TYPE. A staged copy is a copy of
|
|
64
|
+
// the project's source; a link is a pointer to something that is either
|
|
65
|
+
// already in the tree (staged once under its real name), outside it (not
|
|
66
|
+
// this project's source), or gone. `copyFileSync` on one is ENOENT when the
|
|
67
|
+
// target is missing and ENOTSUP on a bind mount — measured 2026-09-06 on a
|
|
68
|
+
// demo whose `ios/DerivedData/Framework/Resources` was a dangling link, and
|
|
69
|
+
// that one link refused the whole push.
|
|
49
70
|
const full = path.join(dir, entry.name);
|
|
50
|
-
if (entry.
|
|
71
|
+
if (entry.isSymbolicLink()) {
|
|
72
|
+
// Said once, with the path from the project root, so a `TS2307 Cannot
|
|
73
|
+
// find module` in the staged copy has its explanation next to it: a
|
|
74
|
+
// project that symlinks a shared source directory stages a tree without
|
|
75
|
+
// it (the declared FR-037 trade-off).
|
|
76
|
+
let target = '';
|
|
77
|
+
try {
|
|
78
|
+
target = fs.readlinkSync(full);
|
|
79
|
+
} catch {
|
|
80
|
+
/* unreadable link: nothing to name */
|
|
81
|
+
}
|
|
82
|
+
process.stderr.write(`stager: skipped symlink ${path.relative(root, full)} -> ${target}\n`);
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
if (entry.isDirectory()) out.push(...walk(full, root));
|
|
51
86
|
else out.push(full);
|
|
52
87
|
}
|
|
53
88
|
return out;
|
package/template/scripts/test.sh
CHANGED
|
File without changes
|