express-file-cluster 0.10.0 → 0.10.2
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/dist/auth/index.cjs +7 -6
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.d.cts +1 -1
- package/dist/auth/index.d.ts +1 -1
- package/dist/auth/index.js +5 -5
- package/dist/{chunk-R52CUEGT.js → chunk-3SWI46YK.js} +2 -2
- package/dist/{chunk-DCJOWFVD.cjs → chunk-4GHK27JA.cjs} +3 -3
- package/dist/{chunk-DCJOWFVD.cjs.map → chunk-4GHK27JA.cjs.map} +1 -1
- package/dist/{chunk-NI2BNGGV.js → chunk-5LPRKZPB.js} +2 -2
- package/dist/chunk-74BSJXWD.cjs +220 -0
- package/dist/chunk-74BSJXWD.cjs.map +1 -0
- package/dist/{chunk-7KO4DJRJ.cjs → chunk-7BC3AN7R.cjs} +14 -14
- package/dist/{chunk-7KO4DJRJ.cjs.map → chunk-7BC3AN7R.cjs.map} +1 -1
- package/dist/chunk-AGOYTFRO.cjs +42 -0
- package/dist/chunk-AGOYTFRO.cjs.map +1 -0
- package/dist/{chunk-RAB44UGX.js → chunk-B6MB6HEG.js} +1 -1
- package/dist/{chunk-PGJQK36V.js → chunk-BG4A7Z32.js} +7 -5
- package/dist/{chunk-PGJQK36V.js.map → chunk-BG4A7Z32.js.map} +1 -1
- package/dist/{chunk-ATVD2HGC.js → chunk-C2FOZ7ME.js} +4 -4
- package/dist/chunk-CGY7JU4Y.cjs +8 -0
- package/dist/chunk-CGY7JU4Y.cjs.map +1 -0
- package/dist/{chunk-EGSSZUVO.js → chunk-DN4TCGYB.js} +38 -11
- package/dist/chunk-DN4TCGYB.js.map +1 -0
- package/dist/{chunk-GBI77W5T.cjs → chunk-H2PVWCWC.cjs} +1 -1
- package/dist/{chunk-GBI77W5T.cjs.map → chunk-H2PVWCWC.cjs.map} +1 -1
- package/dist/{chunk-NKLOE4AK.cjs → chunk-IUZ6A7PB.cjs} +20 -53
- package/dist/chunk-IUZ6A7PB.cjs.map +1 -0
- package/dist/{chunk-DUADUR6R.cjs → chunk-JP36TLL4.cjs} +171 -14
- package/dist/chunk-JP36TLL4.cjs.map +1 -0
- package/dist/chunk-KLWL7XSC.js +220 -0
- package/dist/chunk-KLWL7XSC.js.map +1 -0
- package/dist/{chunk-4DOHQU6I.cjs → chunk-M53GODCX.cjs} +39 -12
- package/dist/chunk-M53GODCX.cjs.map +1 -0
- package/dist/{chunk-R4XO4SVM.js → chunk-MUVO7MGS.js} +4 -4
- package/dist/{chunk-HBCY7ILD.cjs → chunk-R2K7AFIB.cjs} +97 -95
- package/dist/chunk-R2K7AFIB.cjs.map +1 -0
- package/dist/{chunk-QDEDOHP7.js → chunk-RETV3GKE.js} +9 -42
- package/dist/chunk-RETV3GKE.js.map +1 -0
- package/dist/{chunk-WBLUGOAG.cjs → chunk-RPL2IFWK.cjs} +8 -5
- package/dist/chunk-RPL2IFWK.cjs.map +1 -0
- package/dist/{chunk-YK4ZM3CA.cjs → chunk-TBIVIR6L.cjs} +15 -15
- package/dist/{chunk-YK4ZM3CA.cjs.map → chunk-TBIVIR6L.cjs.map} +1 -1
- package/dist/{chunk-73XJUT2S.js → chunk-V73R76I4.js} +162 -5
- package/dist/chunk-V73R76I4.js.map +1 -0
- package/dist/chunk-XPY5TQDK.js +42 -0
- package/dist/chunk-XPY5TQDK.js.map +1 -0
- package/dist/{chunk-KFVFP2Q7.cjs → chunk-Y4NKIXUL.cjs} +70 -55
- package/dist/chunk-Y4NKIXUL.cjs.map +1 -0
- package/dist/{chunk-7KC2H76D.js → chunk-Y75V5FCU.js} +62 -47
- package/dist/chunk-Y75V5FCU.js.map +1 -0
- package/dist/cli/db-runner.cjs +81 -42
- package/dist/cli/db-runner.cjs.map +1 -1
- package/dist/cli/db-runner.js +54 -16
- package/dist/cli/db-runner.js.map +1 -1
- package/dist/cli/index.cjs +23 -25
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.js +12 -17
- package/dist/cli/index.js.map +1 -1
- package/dist/docs/api-reference/auth.md +23 -0
- package/dist/docs/api-reference/compose.md +1 -1
- package/dist/docs/api-reference/db.md +8 -0
- package/dist/docs/api-reference/ignite.md +4 -1
- package/dist/docs/api-reference/testing.md +26 -0
- package/dist/docs/cli/add.md +2 -2
- package/dist/docs/core-concepts/file-based-routing.md +2 -0
- package/dist/docs/core-concepts/middleware.md +2 -2
- package/dist/docs/getting-started/index.md +4 -0
- package/dist/docs/guides/authentication.md +33 -0
- package/dist/docs/guides/caching.md +2 -0
- package/dist/docs/guides/database.md +15 -0
- package/dist/docs/guides/environment-variables.md +6 -0
- package/dist/docs/guides/generated-portals.md +3 -1
- package/dist/docs/guides/logging.md +17 -0
- package/dist/docs/guides/migrations.md +4 -2
- package/dist/docs/guides/testing.md +31 -0
- package/dist/docs/index.md +2 -1
- package/dist/docs/skills/SKILL.md +5 -1
- package/dist/docs/skills/api-surface.md +20 -4
- package/dist/docs/skills/auth-internals.md +14 -1
- package/dist/docs/skills/pre-flight.md +6 -0
- package/dist/docs/skills/routing-rules.md +1 -1
- package/dist/docs/skills/what-not-to-invent.md +9 -1
- package/dist/docs/versioning.md +1 -1
- package/dist/index.cjs +75 -264
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +27 -3
- package/dist/index.d.ts +27 -3
- package/dist/index.js +28 -218
- package/dist/index.js.map +1 -1
- package/dist/pgboss-backend-4X2YT4RB.js +14 -0
- package/dist/pgboss-backend-UXQ3O2WT.cjs +15 -0
- package/dist/pgboss-backend-UXQ3O2WT.cjs.map +1 -0
- package/dist/registry/index.json +27 -3
- package/dist/registry/js-mongo/account-security.json +1 -1
- package/dist/registry/js-mongo/admin-users.json +1 -1
- package/dist/registry/js-mongo/auth.json +1 -1
- package/dist/registry/js-mongo/auth@apple.json +1 -1
- package/dist/registry/js-mongo/auth@google.json +1 -1
- package/dist/registry/js-mongo/forgot-password.json +1 -1
- package/dist/registry/js-mongo/user-profile.json +1 -1
- package/dist/registry/js-mongo-collection/account-security.json +1 -1
- package/dist/registry/js-mongo-collection/admin-users.json +1 -1
- package/dist/registry/js-mongo-collection/auth.json +1 -1
- package/dist/registry/js-mongo-collection/auth@apple.json +1 -1
- package/dist/registry/js-mongo-collection/auth@google.json +1 -1
- package/dist/registry/js-mongo-collection/forgot-password.json +1 -1
- package/dist/registry/js-mongo-collection/user-profile.json +1 -1
- package/dist/registry/js-pg-model/account-security.json +1 -1
- package/dist/registry/js-pg-model/admin-users.json +1 -1
- package/dist/registry/js-pg-model/auth.json +1 -1
- package/dist/registry/js-pg-model/auth@apple.json +1 -1
- package/dist/registry/js-pg-model/auth@google.json +1 -1
- package/dist/registry/js-pg-model/forgot-password.json +1 -1
- package/dist/registry/js-pg-model/user-profile.json +1 -1
- package/dist/registry/js-pg-table/account-security.json +1 -1
- package/dist/registry/js-pg-table/admin-users.json +1 -1
- package/dist/registry/js-pg-table/auth.json +1 -1
- package/dist/registry/js-pg-table/auth@apple.json +1 -1
- package/dist/registry/js-pg-table/auth@google.json +1 -1
- package/dist/registry/js-pg-table/forgot-password.json +1 -1
- package/dist/registry/js-pg-table/user-profile.json +1 -1
- package/dist/registry/ts-mongo/account-security.json +1 -1
- package/dist/registry/ts-mongo/admin-users.json +1 -1
- package/dist/registry/ts-mongo/auth.json +1 -1
- package/dist/registry/ts-mongo/auth@apple.json +1 -1
- package/dist/registry/ts-mongo/auth@google.json +1 -1
- package/dist/registry/ts-mongo/forgot-password.json +1 -1
- package/dist/registry/ts-mongo/user-profile.json +1 -1
- package/dist/registry/ts-mongo-collection/account-security.json +1 -1
- package/dist/registry/ts-mongo-collection/admin-users.json +1 -1
- package/dist/registry/ts-mongo-collection/auth.json +1 -1
- package/dist/registry/ts-mongo-collection/auth@apple.json +1 -1
- package/dist/registry/ts-mongo-collection/auth@google.json +1 -1
- package/dist/registry/ts-mongo-collection/forgot-password.json +1 -1
- package/dist/registry/ts-mongo-collection/user-profile.json +1 -1
- package/dist/registry/ts-pg-model/account-security.json +1 -1
- package/dist/registry/ts-pg-model/admin-users.json +1 -1
- package/dist/registry/ts-pg-model/auth.json +1 -1
- package/dist/registry/ts-pg-model/auth@apple.json +1 -1
- package/dist/registry/ts-pg-model/auth@google.json +1 -1
- package/dist/registry/ts-pg-model/forgot-password.json +1 -1
- package/dist/registry/ts-pg-model/user-profile.json +1 -1
- package/dist/registry/ts-pg-table/account-security.json +1 -1
- package/dist/registry/ts-pg-table/admin-users.json +1 -1
- package/dist/registry/ts-pg-table/auth.json +1 -1
- package/dist/registry/ts-pg-table/auth@apple.json +1 -1
- package/dist/registry/ts-pg-table/auth@google.json +1 -1
- package/dist/registry/ts-pg-table/forgot-password.json +1 -1
- package/dist/registry/ts-pg-table/user-profile.json +1 -1
- package/dist/tasks/index.cjs +3 -2
- package/dist/tasks/index.cjs.map +1 -1
- package/dist/tasks/index.d.cts +1 -1
- package/dist/tasks/index.d.ts +1 -1
- package/dist/tasks/index.js +1 -1
- package/dist/testing-cjs.cjs +5 -0
- package/dist/testing.cjs +59 -0
- package/dist/testing.cjs.map +1 -0
- package/dist/testing.d.cts +27 -0
- package/dist/testing.d.ts +27 -0
- package/dist/testing.js +58 -0
- package/dist/testing.js.map +1 -0
- package/dist/thread-runner.cjs +4 -3
- package/dist/thread-runner.cjs.map +1 -1
- package/dist/thread-runner.js +2 -2
- package/dist/{types-Bnxvj3l0.d.ts → types-CPMFTVXm.d.cts} +8 -0
- package/dist/{types-Bnxvj3l0.d.cts → types-CPMFTVXm.d.ts} +8 -0
- package/package.json +6 -1
- package/dist/chunk-4DOHQU6I.cjs.map +0 -1
- package/dist/chunk-73XJUT2S.js.map +0 -1
- package/dist/chunk-7KC2H76D.js.map +0 -1
- package/dist/chunk-DUADUR6R.cjs.map +0 -1
- package/dist/chunk-EGSSZUVO.js.map +0 -1
- package/dist/chunk-HBCY7ILD.cjs.map +0 -1
- package/dist/chunk-KFVFP2Q7.cjs.map +0 -1
- package/dist/chunk-NKLOE4AK.cjs.map +0 -1
- package/dist/chunk-QDEDOHP7.js.map +0 -1
- package/dist/chunk-WBLUGOAG.cjs.map +0 -1
- package/dist/pgboss-backend-FW42SBSM.js +0 -14
- package/dist/pgboss-backend-RVHUBJTU.cjs +0 -14
- package/dist/pgboss-backend-RVHUBJTU.cjs.map +0 -1
- /package/dist/{chunk-R52CUEGT.js.map → chunk-3SWI46YK.js.map} +0 -0
- /package/dist/{chunk-NI2BNGGV.js.map → chunk-5LPRKZPB.js.map} +0 -0
- /package/dist/{chunk-RAB44UGX.js.map → chunk-B6MB6HEG.js.map} +0 -0
- /package/dist/{chunk-ATVD2HGC.js.map → chunk-C2FOZ7ME.js.map} +0 -0
- /package/dist/{chunk-R4XO4SVM.js.map → chunk-MUVO7MGS.js.map} +0 -0
- /package/dist/{pgboss-backend-FW42SBSM.js.map → pgboss-backend-4X2YT4RB.js.map} +0 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/errors.ts
|
|
2
|
+
var HttpError = class _HttpError extends Error {
|
|
3
|
+
|
|
4
|
+
constructor(statusCode, message) {
|
|
5
|
+
super(message);
|
|
6
|
+
this.name = "HttpError";
|
|
7
|
+
this.statusCode = statusCode;
|
|
8
|
+
Error.captureStackTrace(this, _HttpError);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Wraps an unknown caught value into an `HttpError`.
|
|
12
|
+
* If the value is already an `HttpError`, it is returned as-is.
|
|
13
|
+
* Otherwise the `message` from the caught `Error` (or a fallback) is used.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* } catch (err) {
|
|
17
|
+
* throw HttpError.from(err, 500, 'Something went wrong');
|
|
18
|
+
* }
|
|
19
|
+
*/
|
|
20
|
+
static from(err, statusCode = 500, fallback = "Internal Server Error") {
|
|
21
|
+
if (err instanceof _HttpError) return err;
|
|
22
|
+
const message = err instanceof Error ? err.message : fallback;
|
|
23
|
+
return new _HttpError(statusCode, message);
|
|
24
|
+
}
|
|
25
|
+
/** Returns a plain object representation suitable for JSON serialization. */
|
|
26
|
+
toJSON() {
|
|
27
|
+
return {
|
|
28
|
+
statusCode: this.statusCode,
|
|
29
|
+
error: this.name,
|
|
30
|
+
message: this.message
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
function isHttpError(value) {
|
|
35
|
+
return value instanceof HttpError;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
exports.HttpError = HttpError; exports.isHttpError = isHttpError;
|
|
42
|
+
//# sourceMappingURL=chunk-AGOYTFRO.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/express-file-cluster/express-file-cluster/packages/core/dist/chunk-AGOYTFRO.cjs","../src/errors.ts"],"names":[],"mappings":"AAAA;ACYO,IAAM,UAAA,EAAN,MAAM,WAAA,QAAkB,MAAM;AAAA,EAC1B;AAAA,EAET,WAAA,CAAY,UAAA,EAAoB,OAAA,EAAiB;AAC/C,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,KAAA,EAAO,WAAA;AACZ,IAAA,IAAA,CAAK,WAAA,EAAa,UAAA;AAClB,IAAA,KAAA,CAAM,iBAAA,CAAkB,IAAA,EAAM,UAAS,CAAA;AAAA,EACzC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYA,OAAO,IAAA,CAAK,GAAA,EAAc,WAAA,EAAa,GAAA,EAAK,SAAA,EAAW,uBAAA,EAAoC;AACzF,IAAA,GAAA,CAAI,IAAA,WAAe,UAAA,EAAW,OAAO,GAAA;AACrC,IAAA,MAAM,QAAA,EAAU,IAAA,WAAe,MAAA,EAAQ,GAAA,CAAI,QAAA,EAAU,QAAA;AACrD,IAAA,OAAO,IAAI,UAAA,CAAU,UAAA,EAAY,OAAO,CAAA;AAAA,EAC1C;AAAA;AAAA,EAGA,MAAA,CAAA,EAAiE;AAC/D,IAAA,OAAO;AAAA,MACL,UAAA,EAAY,IAAA,CAAK,UAAA;AAAA,MACjB,KAAA,EAAO,IAAA,CAAK,IAAA;AAAA,MACZ,OAAA,EAAS,IAAA,CAAK;AAAA,IAChB,CAAA;AAAA,EACF;AACF,CAAA;AAQO,SAAS,WAAA,CAAY,KAAA,EAAoC;AAC9D,EAAA,OAAO,MAAA,WAAiB,SAAA;AAC1B;ADpBA;AACA;AACE;AACA;AACF,iEAAC","file":"/home/runner/work/express-file-cluster/express-file-cluster/packages/core/dist/chunk-AGOYTFRO.cjs","sourcesContent":[null,"/**\n * Represents an HTTP error with a status code and message.\n * Throw this inside any route handler to send a structured error response.\n *\n * @example\n * throw new HttpError(404, 'User not found');\n *\n * @example Wrapping an unknown caught error\n * catch (err) {\n * throw HttpError.from(err, 500);\n * }\n */\nexport class HttpError extends Error {\n readonly statusCode: number;\n\n constructor(statusCode: number, message: string) {\n super(message);\n this.name = 'HttpError';\n this.statusCode = statusCode;\n Error.captureStackTrace(this, HttpError);\n }\n\n /**\n * Wraps an unknown caught value into an `HttpError`.\n * If the value is already an `HttpError`, it is returned as-is.\n * Otherwise the `message` from the caught `Error` (or a fallback) is used.\n *\n * @example\n * } catch (err) {\n * throw HttpError.from(err, 500, 'Something went wrong');\n * }\n */\n static from(err: unknown, statusCode = 500, fallback = 'Internal Server Error'): HttpError {\n if (err instanceof HttpError) return err;\n const message = err instanceof Error ? err.message : fallback;\n return new HttpError(statusCode, message);\n }\n\n /** Returns a plain object representation suitable for JSON serialization. */\n toJSON(): { statusCode: number; error: string; message: string } {\n return {\n statusCode: this.statusCode,\n error: this.name,\n message: this.message,\n };\n }\n}\n\n/**\n * Type guard — returns `true` when `value` is an `HttpError` instance.\n *\n * @example\n * if (isHttpError(err)) console.log(err.statusCode);\n */\nexport function isHttpError(value: unknown): value is HttpError {\n return value instanceof HttpError;\n}\n"]}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
HttpError,
|
|
3
2
|
ModelValidationError,
|
|
4
3
|
currentTx,
|
|
5
4
|
getDbEngine,
|
|
6
5
|
getRegisteredModel,
|
|
7
6
|
isAutoSync,
|
|
8
|
-
isHttpError,
|
|
9
7
|
isSyncSuppressed,
|
|
10
8
|
nodeAt,
|
|
11
9
|
normalizeSchema,
|
|
@@ -18,7 +16,11 @@ import {
|
|
|
18
16
|
tableNameFor,
|
|
19
17
|
timestampFields,
|
|
20
18
|
validateAtPath
|
|
21
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-RETV3GKE.js";
|
|
20
|
+
import {
|
|
21
|
+
HttpError,
|
|
22
|
+
isHttpError
|
|
23
|
+
} from "./chunk-XPY5TQDK.js";
|
|
22
24
|
import {
|
|
23
25
|
countStatement,
|
|
24
26
|
getLogger,
|
|
@@ -27,7 +29,7 @@ import {
|
|
|
27
29
|
traceOps,
|
|
28
30
|
untracked,
|
|
29
31
|
whenQueryTracking
|
|
30
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-V73R76I4.js";
|
|
31
33
|
|
|
32
34
|
// src/db/mongo-model.ts
|
|
33
35
|
var mongoosePromise;
|
|
@@ -3233,4 +3235,4 @@ export {
|
|
|
3233
3235
|
getDbClient,
|
|
3234
3236
|
db
|
|
3235
3237
|
};
|
|
3236
|
-
//# sourceMappingURL=chunk-
|
|
3238
|
+
//# sourceMappingURL=chunk-BG4A7Z32.js.map
|