@arkstack/http 0.16.2 → 0.16.3

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.
Files changed (2) hide show
  1. package/dist/setup.js +15 -0
  2. package/package.json +3 -3
package/dist/setup.js CHANGED
@@ -1,13 +1,28 @@
1
1
  import { F as Response$1, I as Request$1, a as kanunSessionPlugin, i as arkstackHttpPlugin, j as old, t as redirect } from "./redirect-BPQIvVtB.js";
2
2
  import { CoreRouter } from "clear-router";
3
3
  import { Validator } from "kanun";
4
+ import { dirname, join } from "node:path";
4
5
  import "dotenv/config";
6
+ import { Publisher } from "@arkstack/common";
7
+ import { fileURLToPath } from "node:url";
5
8
  //#region src/setup.ts
9
+ const root = join(dirname(fileURLToPath(import.meta.url)), "..");
6
10
  CoreRouter.setRequestProvider(Request$1);
7
11
  CoreRouter.setResponseProvider(Response$1);
8
12
  Validator.use(kanunSessionPlugin);
9
13
  CoreRouter.use(arkstackHttpPlugin);
10
14
  globalThis.redirect = redirect;
11
15
  globalThis.old = old;
16
+ Publisher.publishes({
17
+ package: "@arkstack/http",
18
+ tag: "http-config",
19
+ entries: [{
20
+ from: join(root, "stubs/config/resources.ts.stub"),
21
+ to: "src/config/resources.ts"
22
+ }, {
23
+ from: join(root, "stubs/config/session.ts.stub"),
24
+ to: "src/config/session.ts"
25
+ }]
26
+ });
12
27
  //#endregion
13
28
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkstack/http",
3
- "version": "0.16.2",
3
+ "version": "0.16.3",
4
4
  "type": "module",
5
5
  "description": "HTTP module for Arkstack, providing framework-agnostic request and response primitives.",
6
6
  "homepage": "https://arkstack.toneflix.net/guide/http",
@@ -30,8 +30,8 @@
30
30
  "dependencies": {
31
31
  "clear-router": "^2.9.0",
32
32
  "dotenv": "^17.4.2",
33
- "@arkstack/contract": "^0.16.2",
34
- "@arkstack/common": "^0.16.2"
33
+ "@arkstack/contract": "^0.16.3",
34
+ "@arkstack/common": "^0.16.3"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "arkormx": "^2.10.1",