@noverax/courier-build 0.0.0-stage → 0.5.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/README.md +295 -2
- package/lib/config/index.d.ts +811 -0
- package/lib/config/index.js +75 -0
- package/lib/config-file-of-Clf_dWUQ.js +28 -0
- package/lib/config-in-page-message-DLd3f0Jd.js +20 -0
- package/lib/courier-routes-options-BYF7Sfdf.d.cts +13 -0
- package/lib/courier-routes-options-BYF7Sfdf.d.ts +13 -0
- package/lib/engine/worker.d.ts +1 -0
- package/lib/engine/worker.js +548 -0
- package/lib/errno-code-CNx_E80R.js +32 -0
- package/lib/esbuild/index.d.ts +58 -0
- package/lib/esbuild/index.js +191 -0
- package/lib/index-_VUU5N5v.d.ts +134 -0
- package/lib/index.d.ts +101 -0
- package/lib/index.js +4 -0
- package/lib/jest/routes-thread.d.ts +1 -0
- package/lib/jest/routes-thread.js +46 -0
- package/lib/jest/transformer.cjs +121 -0
- package/lib/jest/transformer.d.cts +39 -0
- package/lib/load-config-barNPfXN.js +2834 -0
- package/lib/metro/index.cjs +25 -0
- package/lib/metro/index.d.cts +55 -0
- package/lib/metro/index.d.ts +67 -0
- package/lib/metro/index.js +105 -0
- package/lib/package-file-CVAKY_Nu.js +39 -0
- package/lib/read-limits-DUuUaEQM.js +41 -0
- package/lib/rollup/index.d.ts +51 -0
- package/lib/rollup/index.js +95 -0
- package/lib/routes-engine-BfwrCuNL.d.ts +117 -0
- package/lib/routes-file-DRoqUZ0S.js +206 -0
- package/lib/routes-loader-context-40OKDrQp.d.ts +26 -0
- package/lib/routes-module-code-DYtP7uj1.js +405 -0
- package/lib/routes-module-id-CnUjQjYF.js +12 -0
- package/lib/routes-read-error-DQhKIE2F.js +30 -0
- package/lib/routes-rule-Pu1Tz8Xm.js +108 -0
- package/lib/rsbuild/index.d.ts +41 -0
- package/lib/rsbuild/index.js +37 -0
- package/lib/rspack/index.d.ts +3 -0
- package/lib/rspack/index.js +1 -0
- package/lib/shared-engine-D0j7uXg8.js +28 -0
- package/lib/vite/index.d.ts +33 -0
- package/lib/vite/index.js +357 -0
- package/lib/webpack/index.d.ts +4 -0
- package/lib/webpack/index.js +3 -0
- package/lib/webpack/loader.cjs +31 -0
- package/lib/webpack/loader.d.cts +40 -0
- package/lib/webpack/run-routes-loader.d.ts +22 -0
- package/lib/webpack/run-routes-loader.js +103 -0
- package/lib/webpack-BPxhBYGV.js +42 -0
- package/lib/worker-messages-BT2vvNQJ.js +35 -0
- package/package.json +209 -4
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What of a loader's context the routes loader uses. webpack and Rspack give
|
|
3
|
+
* all of it; Turbopack runs webpack loaders with a part of it, so what it may
|
|
4
|
+
* lack is optional and used only where it is there.
|
|
5
|
+
*/
|
|
6
|
+
interface RoutesLoaderContext {
|
|
7
|
+
/** The module the loader runs on, absolute. */
|
|
8
|
+
readonly resourcePath: string;
|
|
9
|
+
/** `"production"` in a build, `"development"` under a dev server; Turbopack names none. */
|
|
10
|
+
readonly mode?: string | undefined;
|
|
11
|
+
/** The options the rule hands the loader. */
|
|
12
|
+
getOptions(): unknown;
|
|
13
|
+
/** Whether the loader's result may be kept for the same inputs: never for the routes. */
|
|
14
|
+
cacheable(flag?: boolean): void;
|
|
15
|
+
/** Mark the loader asynchronous; the callback ends it with an error or the module's code. */
|
|
16
|
+
async(): (error: Error | null, content?: string) => void;
|
|
17
|
+
/** Build the module again when this file changes. */
|
|
18
|
+
addDependency(file: string): void;
|
|
19
|
+
/** Build the module again when an entry of this folder is added or removed. */
|
|
20
|
+
addContextDependency?(folder: string): void;
|
|
21
|
+
/** Build the module again once this path, absent now, appears. */
|
|
22
|
+
addMissingDependency?(path: string): void;
|
|
23
|
+
/** Report an error while the module still builds: what a dev server shows over the page. */
|
|
24
|
+
emitError?(error: Error): void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The loader webpack, Rspack and Turbopack run on the module
|
|
28
|
+
* `@noverax/courier/routes` ships, which they load as CommonJS: it hands the
|
|
29
|
+
* work to the package's ES modules. Its result is never kept for the same
|
|
30
|
+
* inputs, as the routes may follow a variable the config reads, which no
|
|
31
|
+
* bundler sees; the engine reads them again only when what they came from
|
|
32
|
+
* has changed.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* config.module.rules.push({ test: stubFile, use: [{ loader: routesLoaderFile(), options: { root } }] });
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
declare function courierRoutesLoader(this: RoutesLoaderContext): void;
|
|
40
|
+
export = courierRoutesLoader;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { t as RoutesLoaderContext } from "../routes-loader-context-40OKDrQp.js";
|
|
2
|
+
/**
|
|
3
|
+
* What the routes loader gives for the module it runs on: the routes read
|
|
4
|
+
* from the project's config, as a page's bundle and a server's take them, in
|
|
5
|
+
* place of the module `@noverax/courier/routes` ships; or, on the config
|
|
6
|
+
* itself in a page's bundle, a refusal.
|
|
7
|
+
*
|
|
8
|
+
* Every file the routes came from is handed to the bundler, which builds the
|
|
9
|
+
* module again when one changes. When the routes cannot be read, a build
|
|
10
|
+
* fails with why; a dev server keeps the routes it read last and reports why
|
|
11
|
+
* over the page, and with none read yet, the module fails with the reason.
|
|
12
|
+
*
|
|
13
|
+
* @param context - The loader's context
|
|
14
|
+
* @returns The module's code
|
|
15
|
+
* @throws RoutesReadError when the routes cannot be read in a build, or ever were
|
|
16
|
+
* @throws Error on the config itself, in a page's bundle
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const code = await runRoutesLoader(this);
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare function runRoutesLoader(context: RoutesLoaderContext): Promise<string>;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { t as RoutesReadError } from "../routes-read-error-DQhKIE2F.js";
|
|
2
|
+
import { n as routesModuleCode } from "../routes-module-code-DYtP7uj1.js";
|
|
3
|
+
import { n as isRecord } from "../errno-code-CNx_E80R.js";
|
|
4
|
+
import { t as configInPageMessage } from "../config-in-page-message-DLd3f0Jd.js";
|
|
5
|
+
import { t as sharedEngine } from "../shared-engine-D0j7uXg8.js";
|
|
6
|
+
import { statSync } from "node:fs";
|
|
7
|
+
// src/webpack/follow-loader-inputs.ts
|
|
8
|
+
/**
|
|
9
|
+
* Hand the bundler what a reading of the routes read, so that a change to
|
|
10
|
+
* any of it builds the routes module again: each file there, each path that
|
|
11
|
+
* is not there yet, should one appear, and each folder whose entries the
|
|
12
|
+
* reading listed. A bundler that has no way to follow a missing path or a
|
|
13
|
+
* folder's entries is told the rest.
|
|
14
|
+
*
|
|
15
|
+
* @param context - The loader's context
|
|
16
|
+
* @param inputs - What the reading read, whether it gave routes or failed
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* followLoaderInputs(this, snapshot);
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
function followLoaderInputs(context, inputs) {
|
|
23
|
+
for (const path of inputs.files) if (isThere(path)) context.addDependency(path);
|
|
24
|
+
else context.addMissingDependency?.(path);
|
|
25
|
+
for (const folder of inputs.listed ?? []) context.addContextDependency?.(folder);
|
|
26
|
+
}
|
|
27
|
+
function isThere(path) {
|
|
28
|
+
try {
|
|
29
|
+
return statSync(path, { throwIfNoEntry: false }) !== void 0;
|
|
30
|
+
} catch {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
// src/webpack/routes-loader-options.ts
|
|
35
|
+
/**
|
|
36
|
+
* The loader's options, as the rule handed them.
|
|
37
|
+
*
|
|
38
|
+
* @param value - What the loader context's `getOptions()` gave
|
|
39
|
+
* @returns The options
|
|
40
|
+
* @throws Error when they are not the ones a Courier rule hands it
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* routesLoaderOptionsOf(this.getOptions()); // { root: "/app" }
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
function routesLoaderOptionsOf(value) {
|
|
47
|
+
const root = isRecord(value) ? value.root : void 0;
|
|
48
|
+
if (!isRecord(value) || typeof root !== "string") throw new Error("[courier] The routes loader was given no project root: add it through Courier's plugin or routesRule(), not by hand.");
|
|
49
|
+
return {
|
|
50
|
+
root,
|
|
51
|
+
config: typeof value.config === "string" ? value.config : void 0,
|
|
52
|
+
refuse: value.refuse === "config-in-page" ? "config-in-page" : void 0
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
// src/webpack/run-routes-loader.ts
|
|
56
|
+
/**
|
|
57
|
+
* What the routes loader gives for the module it runs on: the routes read
|
|
58
|
+
* from the project's config, as a page's bundle and a server's take them, in
|
|
59
|
+
* place of the module `@noverax/courier/routes` ships; or, on the config
|
|
60
|
+
* itself in a page's bundle, a refusal.
|
|
61
|
+
*
|
|
62
|
+
* Every file the routes came from is handed to the bundler, which builds the
|
|
63
|
+
* module again when one changes. When the routes cannot be read, a build
|
|
64
|
+
* fails with why; a dev server keeps the routes it read last and reports why
|
|
65
|
+
* over the page, and with none read yet, the module fails with the reason.
|
|
66
|
+
*
|
|
67
|
+
* @param context - The loader's context
|
|
68
|
+
* @returns The module's code
|
|
69
|
+
* @throws RoutesReadError when the routes cannot be read in a build, or ever were
|
|
70
|
+
* @throws Error on the config itself, in a page's bundle
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* const code = await runRoutesLoader(this);
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
async function runRoutesLoader(context) {
|
|
77
|
+
const options = routesLoaderOptionsOf(context.getOptions());
|
|
78
|
+
if (options.refuse === "config-in-page") throw new Error(configInPageMessage(context.resourcePath));
|
|
79
|
+
const engine = sharedEngine({
|
|
80
|
+
root: options.root,
|
|
81
|
+
config: options.config,
|
|
82
|
+
envFiles: []
|
|
83
|
+
});
|
|
84
|
+
try {
|
|
85
|
+
const snapshot = await engine.read();
|
|
86
|
+
followLoaderInputs(context, snapshot);
|
|
87
|
+
return routesModuleCode(snapshot);
|
|
88
|
+
} catch (error) {
|
|
89
|
+
const failure = error instanceof Error ? error : new Error(String(error));
|
|
90
|
+
const followed = (failure instanceof RoutesReadError ? failure.inputs : void 0) ?? engine.last;
|
|
91
|
+
if (followed !== void 0) followLoaderInputs(context, followed);
|
|
92
|
+
const last = engine.last;
|
|
93
|
+
if (last === void 0 || builds(context)) throw failure;
|
|
94
|
+
const reported = new Error(`[courier] ${failure.message}`, { cause: failure });
|
|
95
|
+
if (context.emitError) context.emitError(reported);
|
|
96
|
+
else console.error(reported.message);
|
|
97
|
+
return routesModuleCode(last);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
function builds(context) {
|
|
101
|
+
return context.mode === void 0 ? process.env.NODE_ENV === "production" : context.mode === "production";
|
|
102
|
+
}
|
|
103
|
+
export { runRoutesLoader };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { n as routesProject, r as configInPageRule, t as routesRule } from "./routes-rule-Pu1Tz8Xm.js";
|
|
2
|
+
// src/webpack/courier-routes-plugin.ts
|
|
3
|
+
const SERVER_TARGET = /^(async-)?node|^electron-(main|preload)|^nwjs/;
|
|
4
|
+
/**
|
|
5
|
+
* The webpack and Rspack plugin that builds the routes a page's proxy
|
|
6
|
+
* client may call from `courier.config.ts`, in place of the module
|
|
7
|
+
* `@noverax/courier/routes` ships, for every bundle the compiler builds. No
|
|
8
|
+
* routes file is written, and the routes carry no address, path or
|
|
9
|
+
* middleware. A page's bundle that takes the config itself fails.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* // webpack.config.js
|
|
14
|
+
* import { CourierRoutesPlugin } from "@noverax/courier-build/webpack";
|
|
15
|
+
*
|
|
16
|
+
* export default { plugins: [new CourierRoutesPlugin()] };
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
var CourierRoutesPlugin = class {
|
|
20
|
+
#options;
|
|
21
|
+
/**
|
|
22
|
+
* @param options - Where the config is, when it is not found from the compiler's context
|
|
23
|
+
*/
|
|
24
|
+
constructor(options = {}) {
|
|
25
|
+
this.#options = options;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @param compiler - The compiler the plugin is given
|
|
29
|
+
*/
|
|
30
|
+
apply(compiler) {
|
|
31
|
+
const project = routesProject(compiler.context, this.#options);
|
|
32
|
+
compiler.options.module.rules ??= [];
|
|
33
|
+
const rules = compiler.options.module.rules;
|
|
34
|
+
rules.push(routesRule(project));
|
|
35
|
+
const guard = configInPageRule(project);
|
|
36
|
+
if (guard !== void 0 && buildsPage(compiler.options.target)) rules.push(guard);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
function buildsPage(target) {
|
|
40
|
+
return !(Array.isArray(target) ? target : [target]).some((one) => typeof one === "string" && SERVER_TARGET.test(one));
|
|
41
|
+
}
|
|
42
|
+
export { CourierRoutesPlugin as t };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { n as isRecord } from "./errno-code-CNx_E80R.js";
|
|
2
|
+
// src/engine/worker-messages.ts
|
|
3
|
+
const REQUEST_KIND = "courier-routes-request";
|
|
4
|
+
const REPLY_KIND = "courier-routes-reply";
|
|
5
|
+
/**
|
|
6
|
+
* The messages between the engine and the process that reads the routes,
|
|
7
|
+
* marked and checked, so a message a config or a library sends on the same
|
|
8
|
+
* channel — a readiness signal to a supervisor — is never taken for one.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* child.send(workerMessages.request(request));
|
|
13
|
+
* child.on("message", (message) => {
|
|
14
|
+
* if (workerMessages.isReply(message)) settle(message.reply);
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
const workerMessages = {
|
|
19
|
+
request: (request) => ({
|
|
20
|
+
kind: REQUEST_KIND,
|
|
21
|
+
request
|
|
22
|
+
}),
|
|
23
|
+
reply: (reply) => ({
|
|
24
|
+
kind: REPLY_KIND,
|
|
25
|
+
reply
|
|
26
|
+
}),
|
|
27
|
+
isRequest: (message) => isRecord(message) && message.kind === REQUEST_KIND && isRecord(message.request),
|
|
28
|
+
isReply: (message) => isRecord(message) && message.kind === REPLY_KIND && isWorkerReply(message.reply)
|
|
29
|
+
};
|
|
30
|
+
function isWorkerReply(value) {
|
|
31
|
+
if (!isRecord(value)) return false;
|
|
32
|
+
if (value.ok === true) return isRecord(value.snapshot) && isRecord(value.snapshot.routes);
|
|
33
|
+
return value.ok === false && typeof value.code === "string" && typeof value.message === "string" && isRecord(value.context);
|
|
34
|
+
}
|
|
35
|
+
export { workerMessages as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,211 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noverax/courier-build",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"description": "Courier at build time: loads courier.config the way every Courier tool does, and hands a page's bundle the routes its proxy client may call through a plugin for the app's bundler, with no routes file to generate",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"courier",
|
|
7
|
+
"vite",
|
|
8
|
+
"vite-plugin",
|
|
9
|
+
"rsbuild",
|
|
10
|
+
"rspack",
|
|
11
|
+
"webpack",
|
|
12
|
+
"esbuild",
|
|
13
|
+
"rollup",
|
|
14
|
+
"rolldown",
|
|
15
|
+
"jest",
|
|
16
|
+
"metro",
|
|
17
|
+
"expo",
|
|
18
|
+
"react-native",
|
|
19
|
+
"bundler",
|
|
20
|
+
"plugin",
|
|
21
|
+
"proxy",
|
|
22
|
+
"routes",
|
|
23
|
+
"typescript",
|
|
24
|
+
"type-safe",
|
|
25
|
+
"api"
|
|
26
|
+
],
|
|
27
|
+
"author": {
|
|
28
|
+
"name": "NoveraX",
|
|
29
|
+
"url": "https://github.com/NoveraX"
|
|
30
|
+
},
|
|
31
|
+
"license": "MIT",
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "git+https://github.com/NoveraX/courier.git",
|
|
35
|
+
"directory": "packages/build"
|
|
36
|
+
},
|
|
37
|
+
"homepage": "https://courier.noverax.cloud/docs/proxy-mode/expose",
|
|
38
|
+
"bugs": {
|
|
39
|
+
"url": "https://github.com/NoveraX/courier/issues"
|
|
40
|
+
},
|
|
41
|
+
"type": "module",
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": ">=22"
|
|
44
|
+
},
|
|
45
|
+
"sideEffects": false,
|
|
46
|
+
"main": "./lib/index.js",
|
|
47
|
+
"module": "./lib/index.js",
|
|
48
|
+
"types": "./lib/index.d.ts",
|
|
49
|
+
"exports": {
|
|
50
|
+
"./package.json": "./package.json",
|
|
51
|
+
".": {
|
|
52
|
+
"types": "./lib/index.d.ts",
|
|
53
|
+
"import": "./lib/index.js",
|
|
54
|
+
"default": "./lib/index.js"
|
|
55
|
+
},
|
|
56
|
+
"./config": {
|
|
57
|
+
"types": "./lib/config/index.d.ts",
|
|
58
|
+
"import": "./lib/config/index.js",
|
|
59
|
+
"default": "./lib/config/index.js"
|
|
60
|
+
},
|
|
61
|
+
"./vite": {
|
|
62
|
+
"types": "./lib/vite/index.d.ts",
|
|
63
|
+
"import": "./lib/vite/index.js",
|
|
64
|
+
"default": "./lib/vite/index.js"
|
|
65
|
+
},
|
|
66
|
+
"./webpack": {
|
|
67
|
+
"types": "./lib/webpack/index.d.ts",
|
|
68
|
+
"import": "./lib/webpack/index.js",
|
|
69
|
+
"default": "./lib/webpack/index.js"
|
|
70
|
+
},
|
|
71
|
+
"./rspack": {
|
|
72
|
+
"types": "./lib/rspack/index.d.ts",
|
|
73
|
+
"import": "./lib/rspack/index.js",
|
|
74
|
+
"default": "./lib/rspack/index.js"
|
|
75
|
+
},
|
|
76
|
+
"./rsbuild": {
|
|
77
|
+
"types": "./lib/rsbuild/index.d.ts",
|
|
78
|
+
"import": "./lib/rsbuild/index.js",
|
|
79
|
+
"default": "./lib/rsbuild/index.js"
|
|
80
|
+
},
|
|
81
|
+
"./esbuild": {
|
|
82
|
+
"types": "./lib/esbuild/index.d.ts",
|
|
83
|
+
"import": "./lib/esbuild/index.js",
|
|
84
|
+
"default": "./lib/esbuild/index.js"
|
|
85
|
+
},
|
|
86
|
+
"./rollup": {
|
|
87
|
+
"types": "./lib/rollup/index.d.ts",
|
|
88
|
+
"import": "./lib/rollup/index.js",
|
|
89
|
+
"default": "./lib/rollup/index.js"
|
|
90
|
+
},
|
|
91
|
+
"./jest": {
|
|
92
|
+
"types": "./lib/jest/transformer.d.cts",
|
|
93
|
+
"default": "./lib/jest/transformer.cjs"
|
|
94
|
+
},
|
|
95
|
+
"./metro": {
|
|
96
|
+
"import": {
|
|
97
|
+
"types": "./lib/metro/index.d.ts",
|
|
98
|
+
"default": "./lib/metro/index.js"
|
|
99
|
+
},
|
|
100
|
+
"require": {
|
|
101
|
+
"types": "./lib/metro/index.d.cts",
|
|
102
|
+
"default": "./lib/metro/index.cjs"
|
|
103
|
+
},
|
|
104
|
+
"default": "./lib/metro/index.js"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"typesVersions": {
|
|
108
|
+
"*": {
|
|
109
|
+
"config": [
|
|
110
|
+
"./lib/config/index.d.ts"
|
|
111
|
+
],
|
|
112
|
+
"vite": [
|
|
113
|
+
"./lib/vite/index.d.ts"
|
|
114
|
+
],
|
|
115
|
+
"webpack": [
|
|
116
|
+
"./lib/webpack/index.d.ts"
|
|
117
|
+
],
|
|
118
|
+
"rspack": [
|
|
119
|
+
"./lib/rspack/index.d.ts"
|
|
120
|
+
],
|
|
121
|
+
"rsbuild": [
|
|
122
|
+
"./lib/rsbuild/index.d.ts"
|
|
123
|
+
],
|
|
124
|
+
"esbuild": [
|
|
125
|
+
"./lib/esbuild/index.d.ts"
|
|
126
|
+
],
|
|
127
|
+
"rollup": [
|
|
128
|
+
"./lib/rollup/index.d.ts"
|
|
129
|
+
],
|
|
130
|
+
"jest": [
|
|
131
|
+
"./lib/jest/transformer.d.cts"
|
|
132
|
+
],
|
|
133
|
+
"metro": [
|
|
134
|
+
"./lib/metro/index.d.ts"
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"files": [
|
|
139
|
+
"lib",
|
|
140
|
+
"README.md",
|
|
141
|
+
"LICENSE"
|
|
142
|
+
],
|
|
143
|
+
"scripts": {
|
|
144
|
+
"build": "tsdown",
|
|
145
|
+
"test": "vitest run",
|
|
146
|
+
"typecheck": "tsc --noEmit",
|
|
147
|
+
"dev": "tsdown --watch"
|
|
148
|
+
},
|
|
149
|
+
"publishConfig": {
|
|
150
|
+
"access": "public"
|
|
151
|
+
},
|
|
152
|
+
"dependencies": {
|
|
153
|
+
"confbox": "^0.3.1",
|
|
154
|
+
"jiti": "^2.7.0"
|
|
155
|
+
},
|
|
156
|
+
"peerDependencies": {
|
|
157
|
+
"@noverax/courier": "^0.5.0",
|
|
158
|
+
"@rsbuild/core": ">=1.0.0",
|
|
159
|
+
"@rspack/core": ">=1.0.0",
|
|
160
|
+
"esbuild": ">=0.17.0",
|
|
161
|
+
"jest": ">=29.0.0",
|
|
162
|
+
"metro": ">=0.80.0",
|
|
163
|
+
"rolldown": ">=1.0.0",
|
|
164
|
+
"rollup": ">=3.0.0",
|
|
165
|
+
"vite": ">=5.0.0",
|
|
166
|
+
"webpack": ">=5.0.0"
|
|
167
|
+
},
|
|
168
|
+
"peerDependenciesMeta": {
|
|
169
|
+
"@rsbuild/core": {
|
|
170
|
+
"optional": true
|
|
171
|
+
},
|
|
172
|
+
"@rspack/core": {
|
|
173
|
+
"optional": true
|
|
174
|
+
},
|
|
175
|
+
"esbuild": {
|
|
176
|
+
"optional": true
|
|
177
|
+
},
|
|
178
|
+
"jest": {
|
|
179
|
+
"optional": true
|
|
180
|
+
},
|
|
181
|
+
"metro": {
|
|
182
|
+
"optional": true
|
|
183
|
+
},
|
|
184
|
+
"rolldown": {
|
|
185
|
+
"optional": true
|
|
186
|
+
},
|
|
187
|
+
"rollup": {
|
|
188
|
+
"optional": true
|
|
189
|
+
},
|
|
190
|
+
"vite": {
|
|
191
|
+
"optional": true
|
|
192
|
+
},
|
|
193
|
+
"webpack": {
|
|
194
|
+
"optional": true
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"devDependencies": {
|
|
198
|
+
"@babel/core": "^7.29.7",
|
|
199
|
+
"@babel/plugin-transform-modules-commonjs": "^7.29.7",
|
|
200
|
+
"@noverax/courier": "*",
|
|
201
|
+
"@rsbuild/core": "^2.3.1",
|
|
202
|
+
"@rspack/core": "^2.3.1",
|
|
203
|
+
"esbuild": "^0.28.2",
|
|
204
|
+
"jest": "^30.5.2",
|
|
205
|
+
"metro": "^0.87.2",
|
|
206
|
+
"metro-config": "^0.87.2",
|
|
207
|
+
"rolldown": "^1.2.15",
|
|
208
|
+
"rollup": "^4.65.0",
|
|
209
|
+
"webpack": "^5.112.2"
|
|
210
|
+
}
|
|
211
|
+
}
|