@orieljs/framework 0.1.0-alpha.12 → 0.1.0-alpha.14
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/{chunk-MURTCTRH.js → chunk-4NCMY3ZS.js} +48 -2
- package/dist/chunk-4NCMY3ZS.js.map +1 -0
- package/dist/{chunk-HTJKT2R2.js → chunk-BKA5F3TH.js} +1 -1
- package/dist/{chunk-HTJKT2R2.js.map → chunk-BKA5F3TH.js.map} +1 -1
- package/dist/{chunk-7NA4HALO.js → chunk-UBSIBGXR.js} +236 -54
- package/dist/chunk-UBSIBGXR.js.map +1 -0
- package/dist/{chunk-24673JQF.js → chunk-X4N74JDO.js} +98 -4
- package/dist/chunk-X4N74JDO.js.map +1 -0
- package/dist/contracts.d.ts +11 -1
- package/dist/contracts.js +1 -1
- package/dist/{index.d-WQpfdIbG.d.ts → index.d-lffxurFs.d.ts} +10 -1
- package/dist/index.d.ts +363 -19
- package/dist/index.js +1193 -189
- package/dist/index.js.map +1 -1
- package/dist/{jsx-runtime-6um4Mwfb.d.ts → jsx-runtime-Bc5KJzwb.d.ts} +1 -1
- package/dist/jsx-runtime.d.ts +2 -2
- package/dist/jsx-runtime.js +3 -3
- package/dist/{testing-CKwfWJGn.d.ts → testing-CVpo7aRl.d.ts} +46 -7
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +5 -3
- package/docs/authentication.md +42 -1
- package/docs/console.md +17 -6
- package/docs/database-testing.md +21 -0
- package/docs/database.md +12 -0
- package/docs/deployment.md +33 -6
- package/docs/encryption.md +2 -0
- package/docs/installation.md +2 -1
- package/docs/live-tests.md +20 -0
- package/docs/live.md +22 -0
- package/docs/navigation.json +4 -0
- package/docs/pagination.md +10 -0
- package/docs/routing.md +1 -1
- package/docs/scheduling.md +3 -0
- package/docs/session.md +19 -2
- package/docs/starter-kits.md +4 -0
- package/docs/storage.md +44 -5
- package/docs/testing.md +9 -6
- package/docs/two-factor.md +192 -0
- package/docs/views.md +2 -0
- package/docs/vite.md +1 -1
- package/package.json +56 -38
- package/dist/chunk-24673JQF.js.map +0 -1
- package/dist/chunk-7NA4HALO.js.map +0 -1
- package/dist/chunk-MURTCTRH.js.map +0 -1
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
Application,
|
|
3
3
|
ConfigRepository,
|
|
4
4
|
Container
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-BKA5F3TH.js";
|
|
6
6
|
|
|
7
7
|
// ../Container/dist/index.js
|
|
8
8
|
import { AsyncLocalStorage } from "async_hooks";
|
|
@@ -1137,6 +1137,8 @@ function collect(items = []) {
|
|
|
1137
1137
|
// ../Support/dist/index.js
|
|
1138
1138
|
import { randomBytes, randomUUID } from "crypto";
|
|
1139
1139
|
import pluralize from "pluralize";
|
|
1140
|
+
import { existsSync } from "fs";
|
|
1141
|
+
import { join } from "path";
|
|
1140
1142
|
import { setTimeout as sleep } from "timers/promises";
|
|
1141
1143
|
var __defProp = Object.defineProperty;
|
|
1142
1144
|
var __export = (target, all) => {
|
|
@@ -3001,6 +3003,48 @@ function facade(abstract, extras) {
|
|
|
3001
3003
|
});
|
|
3002
3004
|
return proxy;
|
|
3003
3005
|
}
|
|
3006
|
+
var MissingPackageError = class extends Error {
|
|
3007
|
+
constructor(packageName, neededFor, command) {
|
|
3008
|
+
super(`${neededFor} needs the ${packageName} package. Install it with: ${command}`);
|
|
3009
|
+
this.packageName = packageName;
|
|
3010
|
+
this.neededFor = neededFor;
|
|
3011
|
+
this.command = command;
|
|
3012
|
+
}
|
|
3013
|
+
packageName;
|
|
3014
|
+
neededFor;
|
|
3015
|
+
command;
|
|
3016
|
+
name = "MissingPackageError";
|
|
3017
|
+
};
|
|
3018
|
+
var ADD = { pnpm: "pnpm add", yarn: "yarn add", bun: "bun add", npm: "npm install" };
|
|
3019
|
+
var LOCKFILES = [
|
|
3020
|
+
["pnpm-lock.yaml", "pnpm"],
|
|
3021
|
+
["yarn.lock", "yarn"],
|
|
3022
|
+
["bun.lock", "bun"],
|
|
3023
|
+
["bun.lockb", "bun"],
|
|
3024
|
+
["package-lock.json", "npm"]
|
|
3025
|
+
];
|
|
3026
|
+
function installCommand(packageName, options = {}) {
|
|
3027
|
+
const { env = process.env, cwd = process.cwd() } = options;
|
|
3028
|
+
const agent = /^(pnpm|yarn|bun|npm)\//.exec(env.npm_config_user_agent ?? "")?.[1];
|
|
3029
|
+
const manager = agent ?? LOCKFILES.find(([file]) => existsSync(join(cwd, file)))?.[1] ?? "npm";
|
|
3030
|
+
return `${ADD[manager]} ${packageName}`;
|
|
3031
|
+
}
|
|
3032
|
+
function isMissing(error, packageName) {
|
|
3033
|
+
if (!(error instanceof Error)) return false;
|
|
3034
|
+
const { code } = error;
|
|
3035
|
+
const notFound = code === "ERR_MODULE_NOT_FOUND" || code === "MODULE_NOT_FOUND" || error.message.startsWith("Failed to load url ");
|
|
3036
|
+
if (!notFound) return false;
|
|
3037
|
+
const name = packageName.replace(/[.*+?^${}()|[\]\\/]/g, "\\$&");
|
|
3038
|
+
return new RegExp(`(?:package|module|url) ['"]?${name}(?:['"\\s]|$)`).test(error.message);
|
|
3039
|
+
}
|
|
3040
|
+
async function importOptional(packageName, neededFor, load) {
|
|
3041
|
+
try {
|
|
3042
|
+
return await load();
|
|
3043
|
+
} catch (error) {
|
|
3044
|
+
if (isMissing(error, packageName)) throw new MissingPackageError(packageName, neededFor, installCommand(packageName));
|
|
3045
|
+
throw error;
|
|
3046
|
+
}
|
|
3047
|
+
}
|
|
3004
3048
|
var ClassRegistry = class {
|
|
3005
3049
|
byName = /* @__PURE__ */ new Map();
|
|
3006
3050
|
byClass = /* @__PURE__ */ new Map();
|
|
@@ -3220,6 +3264,8 @@ export {
|
|
|
3220
3264
|
Arr,
|
|
3221
3265
|
ServiceProvider,
|
|
3222
3266
|
facade,
|
|
3267
|
+
MissingPackageError,
|
|
3268
|
+
importOptional,
|
|
3223
3269
|
ClassRegistry,
|
|
3224
3270
|
app,
|
|
3225
3271
|
config,
|
|
@@ -3250,4 +3296,4 @@ export {
|
|
|
3250
3296
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
3251
3297
|
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
3252
3298
|
*/
|
|
3253
|
-
//# sourceMappingURL=chunk-
|
|
3299
|
+
//# sourceMappingURL=chunk-4NCMY3ZS.js.map
|