@h3ravel/http 11.3.3 → 11.3.4

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.
@@ -33,5 +33,4 @@ var init_find_up_simple = require_chunk.__esm({ "../../node_modules/.pnpm/find-u
33
33
 
34
34
  //#endregion
35
35
  init_find_up_simple();
36
- exports.findUp = findUp;
37
- //# sourceMappingURL=find-up-simple-CPevfdC2.cjs.map
36
+ exports.findUp = findUp;
@@ -28,5 +28,4 @@ var init_find_up_simple = __esm({ "../../node_modules/.pnpm/find-up-simple@1.0.1
28
28
 
29
29
  //#endregion
30
30
  init_find_up_simple();
31
- export { findUp };
32
- //# sourceMappingURL=find-up-simple-DLa63O5_.js.map
31
+ export { findUp };
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  const require_chunk = require('./chunk-BncF-t-1.cjs');
2
- let __h3ravel_core = require("@h3ravel/core");
3
- __h3ravel_core = require_chunk.__toESM(__h3ravel_core);
2
+ let __h3ravel_musket = require("@h3ravel/musket");
3
+ __h3ravel_musket = require_chunk.__toESM(__h3ravel_musket);
4
4
  let __h3ravel_shared = require("@h3ravel/shared");
5
5
  __h3ravel_shared = require_chunk.__toESM(__h3ravel_shared);
6
6
  let node_url = require("node:url");
@@ -35,6 +35,8 @@ let node_buffer = require("node:buffer");
35
35
  node_buffer = require_chunk.__toESM(node_buffer);
36
36
  let h3 = require("h3");
37
37
  h3 = require_chunk.__toESM(h3);
38
+ let __h3ravel_core = require("@h3ravel/core");
39
+ __h3ravel_core = require_chunk.__toESM(__h3ravel_core);
38
40
  let __h3ravel_support = require("@h3ravel/support");
39
41
  __h3ravel_support = require_chunk.__toESM(__h3ravel_support);
40
42
 
@@ -18215,7 +18217,7 @@ var require_preferred_pm = /* @__PURE__ */ require_chunk.__commonJS({ "../../nod
18215
18217
  //#endregion
18216
18218
  //#region src/Commands/FireCommand.ts
18217
18219
  var import_preferred_pm = /* @__PURE__ */ require_chunk.__toESM(require_preferred_pm(), 1);
18218
- var FireCommand = class extends __h3ravel_core.ConsoleCommand {
18220
+ var FireCommand = class extends __h3ravel_musket.Command {
18219
18221
  /**
18220
18222
  * The name and signature of the console command.
18221
18223
  *
@@ -18312,7 +18314,7 @@ var HttpServiceProvider = class extends __h3ravel_core.ServiceProvider {
18312
18314
  /** Bind the HTTP server to the service container */
18313
18315
  this.app.singleton("http.serve", () => h3.serve);
18314
18316
  /** Register Musket Commands */
18315
- this.commands([FireCommand]);
18317
+ this.registerCommands([FireCommand]);
18316
18318
  }
18317
18319
  boot() {}
18318
18320
  };
@@ -18599,5 +18601,4 @@ exports.JsonResource = JsonResource;
18599
18601
  exports.LogRequests = LogRequests;
18600
18602
  exports.Middleware = Middleware;
18601
18603
  exports.Request = Request;
18602
- exports.Response = Response;
18603
- //# sourceMappingURL=index.cjs.map
18604
+ exports.Response = Response;
package/dist/index.d.cts CHANGED
@@ -1,11 +1,12 @@
1
1
  /// <reference path="./app.globals.d.ts" />
2
- import { Application, ConsoleCommand, ServiceProvider } from "@h3ravel/core";
2
+ import { Command } from "@h3ravel/musket";
3
3
  import { DotNestedKeys, DotNestedValue, HttpContext, HttpContext as HttpContext$1, IMiddleware, IRequest, IResponse } from "@h3ravel/shared";
4
+ import { Application, ServiceProvider } from "@h3ravel/core";
4
5
  import { EventHandlerRequest, H3Event } from "h3";
5
6
  import { ResponseHeaderMap, TypedHeaders } from "fetchdts";
6
7
 
7
8
  //#region src/Commands/FireCommand.d.ts
8
- declare class FireCommand extends ConsoleCommand {
9
+ declare class FireCommand extends Command {
9
10
  /**
10
11
  * The name and signature of the console command.
11
12
  *
@@ -239,5 +240,4 @@ declare class Response implements IResponse {
239
240
  getEvent<K extends DotNestedKeys<H3Event>>(key: K): DotNestedValue<H3Event, K>;
240
241
  }
241
242
  //#endregion
242
- export { ApiResource, FireCommand, HttpContext, HttpServiceProvider, JsonResource, LogRequests, Middleware, Request, Resource, Response };
243
- //# sourceMappingURL=index.d.cts.map
243
+ export { ApiResource, FireCommand, HttpContext, HttpServiceProvider, JsonResource, LogRequests, Middleware, Request, Resource, Response };
package/dist/index.d.ts CHANGED
@@ -1,11 +1,12 @@
1
1
  /// <reference path="./app.globals.d.ts" />
2
- import { Application, ConsoleCommand, ServiceProvider } from "@h3ravel/core";
2
+ import { Command } from "@h3ravel/musket";
3
3
  import { DotNestedKeys, DotNestedValue, HttpContext, HttpContext as HttpContext$1, IMiddleware, IRequest, IResponse } from "@h3ravel/shared";
4
4
  import { EventHandlerRequest, H3Event } from "h3";
5
+ import { Application, ServiceProvider } from "@h3ravel/core";
5
6
  import { ResponseHeaderMap, TypedHeaders } from "fetchdts";
6
7
 
7
8
  //#region src/Commands/FireCommand.d.ts
8
- declare class FireCommand extends ConsoleCommand {
9
+ declare class FireCommand extends Command {
9
10
  /**
10
11
  * The name and signature of the console command.
11
12
  *
@@ -239,5 +240,4 @@ declare class Response implements IResponse {
239
240
  getEvent<K extends DotNestedKeys<H3Event>>(key: K): DotNestedValue<H3Event, K>;
240
241
  }
241
242
  //#endregion
242
- export { ApiResource, FireCommand, HttpContext, HttpServiceProvider, JsonResource, LogRequests, Middleware, Request, Resource, Response };
243
- //# sourceMappingURL=index.d.ts.map
243
+ export { ApiResource, FireCommand, HttpContext, HttpServiceProvider, JsonResource, LogRequests, Middleware, Request, Resource, Response };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { __commonJS, __require, __toESM } from "./chunk-qJlxXUkR.js";
2
- import { ConsoleCommand, ServiceProvider } from "@h3ravel/core";
2
+ import { Command } from "@h3ravel/musket";
3
3
  import { HttpContext, Logger } from "@h3ravel/shared";
4
4
  import { fileURLToPath } from "node:url";
5
5
  import { ChildProcess, execFile, spawn, spawnSync } from "node:child_process";
@@ -17,6 +17,7 @@ import { finished } from "node:stream/promises";
17
17
  import { Duplex, PassThrough, Readable, Transform, Writable, getDefaultHighWaterMark } from "node:stream";
18
18
  import { Buffer as Buffer$1 } from "node:buffer";
19
19
  import { H3, getQuery, getRouterParams, html, readBody, redirect, serve } from "h3";
20
+ import { ServiceProvider } from "@h3ravel/core";
20
21
  import { safeDot } from "@h3ravel/support";
21
22
 
22
23
  //#region ../../node_modules/.pnpm/is-plain-obj@4.1.0/node_modules/is-plain-obj/index.js
@@ -18196,7 +18197,7 @@ var require_preferred_pm = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
18196
18197
  //#endregion
18197
18198
  //#region src/Commands/FireCommand.ts
18198
18199
  var import_preferred_pm = /* @__PURE__ */ __toESM(require_preferred_pm(), 1);
18199
- var FireCommand = class extends ConsoleCommand {
18200
+ var FireCommand = class extends Command {
18200
18201
  /**
18201
18202
  * The name and signature of the console command.
18202
18203
  *
@@ -18293,7 +18294,7 @@ var HttpServiceProvider = class extends ServiceProvider {
18293
18294
  /** Bind the HTTP server to the service container */
18294
18295
  this.app.singleton("http.serve", () => serve);
18295
18296
  /** Register Musket Commands */
18296
- this.commands([FireCommand]);
18297
+ this.registerCommands([FireCommand]);
18297
18298
  }
18298
18299
  boot() {}
18299
18300
  };
@@ -18567,5 +18568,4 @@ var Response = class {
18567
18568
  };
18568
18569
 
18569
18570
  //#endregion
18570
- export { ApiResource, FireCommand, HttpContext, HttpServiceProvider, JsonResource, LogRequests, Middleware, Request, Response };
18571
- //# sourceMappingURL=index.js.map
18571
+ export { ApiResource, FireCommand, HttpContext, HttpServiceProvider, JsonResource, LogRequests, Middleware, Request, Response };
package/package.json CHANGED
@@ -1,7 +1,12 @@
1
1
  {
2
2
  "name": "@h3ravel/http",
3
- "version": "11.3.3",
3
+ "version": "11.3.4",
4
4
  "description": "HTTP kernel, middleware pipeline, request/response classes for H3ravel.",
5
+ "h3ravel": {
6
+ "providers": [
7
+ "HttpServiceProvider"
8
+ ]
9
+ },
5
10
  "type": "module",
6
11
  "main": "./dist/index.js",
7
12
  "types": "./dist/index.d.ts",
@@ -36,13 +41,14 @@
36
41
  "laravel"
37
42
  ],
38
43
  "dependencies": {
44
+ "@h3ravel/musket": "^0.1.8",
39
45
  "h3": "^2.0.0-beta.4",
40
46
  "srvx": "^0.8.2",
41
- "@h3ravel/support": "^0.14.0",
42
- "@h3ravel/shared": "^0.22.1"
47
+ "@h3ravel/support": "^0.14.2",
48
+ "@h3ravel/shared": "^0.22.3"
43
49
  },
44
50
  "peerDependencies": {
45
- "@h3ravel/core": "^1.15.0"
51
+ "@h3ravel/core": "^1.17.0"
46
52
  },
47
53
  "devDependencies": {
48
54
  "typescript": "^5.4.0"
@@ -1 +0,0 @@
1
- {"version":3,"file":"find-up-simple-CPevfdC2.cjs","names":["process","path","fsPromises"],"sources":["../../../node_modules/.pnpm/find-up-simple@1.0.1/node_modules/find-up-simple/index.js"],"sourcesContent":["import process from 'node:process';\nimport fsPromises from 'node:fs/promises';\nimport {fileURLToPath} from 'node:url';\nimport fs from 'node:fs';\nimport path from 'node:path';\n\nconst toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n\nexport async function findUp(name, {\n\tcwd = process.cwd(),\n\ttype = 'file',\n\tstopAt,\n} = {}) {\n\tlet directory = path.resolve(toPath(cwd) ?? '');\n\tconst {root} = path.parse(directory);\n\tstopAt = path.resolve(directory, toPath(stopAt ?? root));\n\tconst isAbsoluteName = path.isAbsolute(name);\n\n\twhile (directory) {\n\t\tconst filePath = isAbsoluteName ? name : path.join(directory, name);\n\t\ttry {\n\t\t\tconst stats = await fsPromises.stat(filePath); // eslint-disable-line no-await-in-loop\n\t\t\tif ((type === 'file' && stats.isFile()) || (type === 'directory' && stats.isDirectory())) {\n\t\t\t\treturn filePath;\n\t\t\t}\n\t\t} catch {}\n\n\t\tif (directory === stopAt || directory === root) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n}\n\nexport function findUpSync(name, {\n\tcwd = process.cwd(),\n\ttype = 'file',\n\tstopAt,\n} = {}) {\n\tlet directory = path.resolve(toPath(cwd) ?? '');\n\tconst {root} = path.parse(directory);\n\tstopAt = path.resolve(directory, toPath(stopAt) ?? root);\n\tconst isAbsoluteName = path.isAbsolute(name);\n\n\twhile (directory) {\n\t\tconst filePath = isAbsoluteName ? name : path.join(directory, name);\n\n\t\ttry {\n\t\t\tconst stats = fs.statSync(filePath, {throwIfNoEntry: false});\n\t\t\tif ((type === 'file' && stats?.isFile()) || (type === 'directory' && stats?.isDirectory())) {\n\t\t\t\treturn filePath;\n\t\t\t}\n\t\t} catch {}\n\n\t\tif (directory === stopAt || directory === root) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n}\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;AAQA,eAAsB,OAAO,MAAM,EAClC,MAAMA,qBAAQ,KAAK,EACnB,OAAO,QACP,WACG,EAAE,EAAE;CACP,IAAI,YAAYC,kBAAK,QAAQ,OAAO,IAAI,IAAI,GAAG;CAC/C,MAAM,EAAC,SAAQA,kBAAK,MAAM,UAAU;AACpC,UAASA,kBAAK,QAAQ,WAAW,OAAO,UAAU,KAAK,CAAC;CACxD,MAAM,iBAAiBA,kBAAK,WAAW,KAAK;AAE5C,QAAO,WAAW;EACjB,MAAM,WAAW,iBAAiB,OAAOA,kBAAK,KAAK,WAAW,KAAK;AACnE,MAAI;GACH,MAAM,QAAQ,MAAMC,yBAAW,KAAK,SAAS;AAC7C,OAAK,SAAS,UAAU,MAAM,QAAQ,IAAM,SAAS,eAAe,MAAM,aAAa,CACtF,QAAO;UAED;AAER,MAAI,cAAc,UAAU,cAAc,KACzC;AAGD,cAAYD,kBAAK,QAAQ,UAAU;;;;;CAzB/B,UAAS,cAAa,qBAAqB,kCAAoB,UAAU,GAAG"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"find-up-simple-DLa63O5_.js","names":[],"sources":["../../../node_modules/.pnpm/find-up-simple@1.0.1/node_modules/find-up-simple/index.js"],"sourcesContent":["import process from 'node:process';\nimport fsPromises from 'node:fs/promises';\nimport {fileURLToPath} from 'node:url';\nimport fs from 'node:fs';\nimport path from 'node:path';\n\nconst toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n\nexport async function findUp(name, {\n\tcwd = process.cwd(),\n\ttype = 'file',\n\tstopAt,\n} = {}) {\n\tlet directory = path.resolve(toPath(cwd) ?? '');\n\tconst {root} = path.parse(directory);\n\tstopAt = path.resolve(directory, toPath(stopAt ?? root));\n\tconst isAbsoluteName = path.isAbsolute(name);\n\n\twhile (directory) {\n\t\tconst filePath = isAbsoluteName ? name : path.join(directory, name);\n\t\ttry {\n\t\t\tconst stats = await fsPromises.stat(filePath); // eslint-disable-line no-await-in-loop\n\t\t\tif ((type === 'file' && stats.isFile()) || (type === 'directory' && stats.isDirectory())) {\n\t\t\t\treturn filePath;\n\t\t\t}\n\t\t} catch {}\n\n\t\tif (directory === stopAt || directory === root) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n}\n\nexport function findUpSync(name, {\n\tcwd = process.cwd(),\n\ttype = 'file',\n\tstopAt,\n} = {}) {\n\tlet directory = path.resolve(toPath(cwd) ?? '');\n\tconst {root} = path.parse(directory);\n\tstopAt = path.resolve(directory, toPath(stopAt) ?? root);\n\tconst isAbsoluteName = path.isAbsolute(name);\n\n\twhile (directory) {\n\t\tconst filePath = isAbsoluteName ? name : path.join(directory, name);\n\n\t\ttry {\n\t\t\tconst stats = fs.statSync(filePath, {throwIfNoEntry: false});\n\t\t\tif ((type === 'file' && stats?.isFile()) || (type === 'directory' && stats?.isDirectory())) {\n\t\t\t\treturn filePath;\n\t\t\t}\n\t\t} catch {}\n\n\t\tif (directory === stopAt || directory === root) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n}\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;AAQA,eAAsB,OAAO,MAAM,EAClC,MAAM,QAAQ,KAAK,EACnB,OAAO,QACP,WACG,EAAE,EAAE;CACP,IAAI,YAAY,KAAK,QAAQ,OAAO,IAAI,IAAI,GAAG;CAC/C,MAAM,EAAC,SAAQ,KAAK,MAAM,UAAU;AACpC,UAAS,KAAK,QAAQ,WAAW,OAAO,UAAU,KAAK,CAAC;CACxD,MAAM,iBAAiB,KAAK,WAAW,KAAK;AAE5C,QAAO,WAAW;EACjB,MAAM,WAAW,iBAAiB,OAAO,KAAK,KAAK,WAAW,KAAK;AACnE,MAAI;GACH,MAAM,QAAQ,MAAM,WAAW,KAAK,SAAS;AAC7C,OAAK,SAAS,UAAU,MAAM,QAAQ,IAAM,SAAS,eAAe,MAAM,aAAa,CACtF,QAAO;UAED;AAER,MAAI,cAAc,UAAU,cAAc,KACzC;AAGD,cAAY,KAAK,QAAQ,UAAU;;;;;CAzB/B,UAAS,cAAa,qBAAqB,MAAM,cAAc,UAAU,GAAG"}