unplugin-relay 0.1.0 → 0.1.1
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/README.md +47 -30
- package/dist/astro.d.mts +5 -0
- package/dist/{astro.js → astro.mjs} +3 -5
- package/dist/esbuild.d.mts +4 -0
- package/dist/{esbuild.js → esbuild.mjs} +2 -4
- package/dist/farm.d.mts +4 -0
- package/dist/{farm.js → farm.mjs} +2 -4
- package/dist/index.d.mts +7 -0
- package/dist/index.mjs +26 -0
- package/dist/nuxt.d.mts +6 -0
- package/dist/{nuxt.js → nuxt.mjs} +3 -6
- package/dist/rolldown.d.mts +4 -0
- package/dist/{rolldown.js → rolldown.mjs} +2 -4
- package/dist/rollup.d.mts +4 -0
- package/dist/{rollup.js → rollup.mjs} +2 -4
- package/dist/rspack.d.mts +4 -0
- package/dist/{rspack.js → rspack.mjs} +2 -4
- package/dist/{types-C903-00Z.d.ts → types.d.mts} +1 -1
- package/dist/types.mjs +1 -0
- package/dist/vite.d.mts +4 -0
- package/dist/{vite-DT2H4_FH.js → vite.mjs} +2 -4
- package/dist/webpack.d.mts +4 -0
- package/dist/{webpack-B0bSjJna.js → webpack.mjs} +2 -4
- package/package.json +69 -53
- package/LICENSE +0 -21
- package/dist/astro.d.ts +0 -7
- package/dist/esbuild.d.ts +0 -8
- package/dist/farm.d.ts +0 -8
- package/dist/index.d.ts +0 -10
- package/dist/index.js +0 -3
- package/dist/nuxt.d.ts +0 -9
- package/dist/rolldown.d.ts +0 -8
- package/dist/rollup.d.ts +0 -8
- package/dist/rspack.d.ts +0 -7
- package/dist/src-BsgyTMzn.js +0 -27
- package/dist/types.d.ts +0 -2
- package/dist/types.js +0 -0
- package/dist/vite.d.ts +0 -8
- package/dist/vite.js +0 -4
- package/dist/webpack.d.ts +0 -8
- package/dist/webpack.js +0 -4
package/README.md
CHANGED
|
@@ -1,23 +1,7 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Unlugin Relay
|
|
2
2
|
|
|
3
|
-
[.
|
|
6
|
-
|
|
7
|
-
## Template Usage
|
|
8
|
-
|
|
9
|
-
To use this template, clone it down using:
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
npx degit unplugin/unplugin-relay my-unplugin
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
And do a global replacement of `unplugin-relay` with your plugin name.
|
|
16
|
-
|
|
17
|
-
Then you can start developing your unplugin 🔥
|
|
18
|
-
|
|
19
|
-
To test your plugin, run: `pnpm run dev`
|
|
20
|
-
To release a new version, run: `pnpm run release`
|
|
3
|
+
[](https://npmx.dev/package/unplugin-relay)
|
|
4
|
+
[](https://pkg.pr.new/~/PatrykWalach/unplugin-relay)
|
|
21
5
|
|
|
22
6
|
## Install
|
|
23
7
|
|
|
@@ -25,15 +9,22 @@ To release a new version, run: `pnpm run release`
|
|
|
25
9
|
npm i unplugin-relay
|
|
26
10
|
```
|
|
27
11
|
|
|
12
|
+
|
|
28
13
|
<details>
|
|
29
14
|
<summary>Vite</summary><br>
|
|
30
15
|
|
|
31
16
|
```ts
|
|
32
17
|
// vite.config.ts
|
|
33
|
-
import
|
|
18
|
+
import relay from "unplugin-relay/vite";
|
|
19
|
+
import relayConfig from "./relay.config.json" with { type: "json" };
|
|
20
|
+
import path from "path";
|
|
34
21
|
|
|
35
22
|
export default defineConfig({
|
|
36
|
-
plugins: [
|
|
23
|
+
plugins: [relay({
|
|
24
|
+
language: relayConfig.language,
|
|
25
|
+
eagerEsModules: relayConfig.eagerEsModules,
|
|
26
|
+
artifactDirectory: path.resolve(relayConfig.artifactDirectory),
|
|
27
|
+
})],
|
|
37
28
|
});
|
|
38
29
|
```
|
|
39
30
|
|
|
@@ -46,10 +37,16 @@ Example: [`playground/`](./playground/)
|
|
|
46
37
|
|
|
47
38
|
```ts
|
|
48
39
|
// rollup.config.js
|
|
49
|
-
import
|
|
40
|
+
import relay from "unplugin-relay/rollup";
|
|
41
|
+
import relayConfig from "./relay.config.json" with { type: "json" };
|
|
42
|
+
import path from "path";
|
|
50
43
|
|
|
51
44
|
export default {
|
|
52
|
-
plugins: [
|
|
45
|
+
plugins: [relay({
|
|
46
|
+
language: relayConfig.language,
|
|
47
|
+
eagerEsModules: relayConfig.eagerEsModules,
|
|
48
|
+
artifactDirectory: path.resolve(relayConfig.artifactDirectory),
|
|
49
|
+
})],
|
|
53
50
|
};
|
|
54
51
|
```
|
|
55
52
|
|
|
@@ -60,10 +57,16 @@ export default {
|
|
|
60
57
|
|
|
61
58
|
```ts
|
|
62
59
|
// rolldown.config.js
|
|
63
|
-
import
|
|
60
|
+
import relay from "unplugin-relay/rolldown";
|
|
61
|
+
import relayConfig from "./relay.config.json" with { type: "json" };
|
|
62
|
+
import path from "path";
|
|
64
63
|
|
|
65
64
|
export default {
|
|
66
|
-
plugins: [
|
|
65
|
+
plugins: [relay({
|
|
66
|
+
language: relayConfig.language,
|
|
67
|
+
eagerEsModules: relayConfig.eagerEsModules,
|
|
68
|
+
artifactDirectory: path.resolve(relayConfig.artifactDirectory),
|
|
69
|
+
})],
|
|
67
70
|
};
|
|
68
71
|
```
|
|
69
72
|
|
|
@@ -76,7 +79,11 @@ export default {
|
|
|
76
79
|
// webpack.config.js
|
|
77
80
|
module.exports = {
|
|
78
81
|
/* ... */
|
|
79
|
-
plugins: [require("unplugin-relay/webpack")({
|
|
82
|
+
plugins: [require("unplugin-relay/webpack")({
|
|
83
|
+
language: relayConfig.language,
|
|
84
|
+
eagerEsModules: relayConfig.eagerEsModules,
|
|
85
|
+
artifactDirectory: path.resolve(relayConfig.artifactDirectory),
|
|
86
|
+
})],
|
|
80
87
|
};
|
|
81
88
|
```
|
|
82
89
|
|
|
@@ -88,7 +95,11 @@ module.exports = {
|
|
|
88
95
|
```ts
|
|
89
96
|
// nuxt.config.js
|
|
90
97
|
export default defineNuxtConfig({
|
|
91
|
-
modules: [["unplugin-relay/nuxt", {
|
|
98
|
+
modules: [["unplugin-relay/nuxt", {
|
|
99
|
+
language: relayConfig.language,
|
|
100
|
+
eagerEsModules: relayConfig.eagerEsModules,
|
|
101
|
+
artifactDirectory: path.resolve(relayConfig.artifactDirectory),
|
|
102
|
+
}]],
|
|
92
103
|
});
|
|
93
104
|
```
|
|
94
105
|
|
|
@@ -103,7 +114,11 @@ export default defineNuxtConfig({
|
|
|
103
114
|
// vue.config.js
|
|
104
115
|
module.exports = {
|
|
105
116
|
configureWebpack: {
|
|
106
|
-
plugins: [require("unplugin-relay/webpack")({
|
|
117
|
+
plugins: [require("unplugin-relay/webpack")({
|
|
118
|
+
language: relayConfig.language,
|
|
119
|
+
eagerEsModules: relayConfig.eagerEsModules,
|
|
120
|
+
artifactDirectory: path.resolve(relayConfig.artifactDirectory),
|
|
121
|
+
})],
|
|
107
122
|
},
|
|
108
123
|
};
|
|
109
124
|
```
|
|
@@ -116,10 +131,12 @@ module.exports = {
|
|
|
116
131
|
```ts
|
|
117
132
|
// esbuild.config.js
|
|
118
133
|
import { build } from "esbuild";
|
|
119
|
-
import
|
|
134
|
+
import relay from "unplugin-relay/esbuild";
|
|
135
|
+
import relayConfig from "./relay.config.json" with { type: "json" };
|
|
136
|
+
import path from "path";
|
|
120
137
|
|
|
121
138
|
build({
|
|
122
|
-
plugins: [
|
|
139
|
+
plugins: [relay()],
|
|
123
140
|
});
|
|
124
141
|
```
|
|
125
142
|
|
package/dist/astro.d.mts
ADDED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import unplugin from "./index.mjs";
|
|
3
2
|
//#region src/astro.ts
|
|
4
3
|
var astro_default = (options) => ({
|
|
5
4
|
name: "unplugin-relay",
|
|
6
5
|
hooks: { "astro:config:setup": async (astro) => {
|
|
7
6
|
astro.config.vite.plugins ||= [];
|
|
8
|
-
astro.config.vite.plugins.push(
|
|
7
|
+
astro.config.vite.plugins.push(unplugin.vite(options));
|
|
9
8
|
} }
|
|
10
9
|
});
|
|
11
|
-
|
|
12
10
|
//#endregion
|
|
13
|
-
export { astro_default as default };
|
|
11
|
+
export { astro_default as default };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { unpluginFactory } from "./
|
|
1
|
+
import { unpluginFactory } from "./index.mjs";
|
|
2
2
|
import { createEsbuildPlugin } from "unplugin";
|
|
3
|
-
|
|
4
3
|
//#region src/esbuild.ts
|
|
5
4
|
var esbuild_default = createEsbuildPlugin(unpluginFactory);
|
|
6
|
-
|
|
7
5
|
//#endregion
|
|
8
|
-
export { esbuild_default as default };
|
|
6
|
+
export { esbuild_default as default };
|
package/dist/farm.d.mts
ADDED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { unpluginFactory } from "./
|
|
1
|
+
import { unpluginFactory } from "./index.mjs";
|
|
2
2
|
import { createFarmPlugin } from "unplugin";
|
|
3
|
-
|
|
4
3
|
//#region src/farm.ts
|
|
5
4
|
var farm_default = createFarmPlugin(unpluginFactory);
|
|
6
|
-
|
|
7
5
|
//#endregion
|
|
8
|
-
export { farm_default as default };
|
|
6
|
+
export { farm_default as default };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Options } from "./types.mjs";
|
|
2
|
+
import { UnpluginFactory } from "unplugin";
|
|
3
|
+
//#region src/index.d.ts
|
|
4
|
+
declare const unpluginFactory: UnpluginFactory<Options | undefined>;
|
|
5
|
+
declare const unplugin: import("unplugin").UnpluginInstance<any, boolean>;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { unplugin as default, unplugin, unpluginFactory };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { createUnplugin } from "unplugin";
|
|
2
|
+
import { transform } from "oxc-transform-relay";
|
|
3
|
+
//#region src/index.ts
|
|
4
|
+
const unpluginFactory = (options) => ({
|
|
5
|
+
name: "unplugin-relay",
|
|
6
|
+
transformInclude(id) {
|
|
7
|
+
return /.(t|j)sx?/.test(id);
|
|
8
|
+
},
|
|
9
|
+
async transform(code, id) {
|
|
10
|
+
if (code.includes("graphql`")) {
|
|
11
|
+
const result = await transform(id.split("?")[0], code, {
|
|
12
|
+
sourcemap: true,
|
|
13
|
+
...options
|
|
14
|
+
});
|
|
15
|
+
const diagnostics = result.errors.map((error) => `${error.message}${error.codeframe ? `\n${error.codeframe}` : ""}`);
|
|
16
|
+
for (const diagnostic of diagnostics) this.warn(diagnostic);
|
|
17
|
+
return {
|
|
18
|
+
code: result.code,
|
|
19
|
+
map: result.map
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
const unplugin = /* #__PURE__ */ createUnplugin(unpluginFactory);
|
|
25
|
+
//#endregion
|
|
26
|
+
export { unplugin as default, unplugin, unpluginFactory };
|
package/dist/nuxt.d.mts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Options } from "./types.mjs";
|
|
2
|
+
//#region src/nuxt.d.ts
|
|
3
|
+
interface ModuleOptions extends Options {}
|
|
4
|
+
declare const _default: import("@nuxt/schema").NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { ModuleOptions, _default as default };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import { webpack_default } from "./webpack-B0bSjJna.js";
|
|
1
|
+
import vite_default from "./vite.mjs";
|
|
2
|
+
import webpack_default from "./webpack.mjs";
|
|
4
3
|
import { addVitePlugin, addWebpackPlugin, defineNuxtModule } from "@nuxt/kit";
|
|
5
|
-
|
|
6
4
|
//#region src/nuxt.ts
|
|
7
5
|
var nuxt_default = defineNuxtModule({
|
|
8
6
|
meta: {
|
|
@@ -15,6 +13,5 @@ var nuxt_default = defineNuxtModule({
|
|
|
15
13
|
addWebpackPlugin(() => webpack_default(options));
|
|
16
14
|
}
|
|
17
15
|
});
|
|
18
|
-
|
|
19
16
|
//#endregion
|
|
20
|
-
export { nuxt_default as default };
|
|
17
|
+
export { nuxt_default as default };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { unpluginFactory } from "./
|
|
1
|
+
import { unpluginFactory } from "./index.mjs";
|
|
2
2
|
import { createRolldownPlugin } from "unplugin";
|
|
3
|
-
|
|
4
3
|
//#region src/rolldown.ts
|
|
5
4
|
var rolldown_default = createRolldownPlugin(unpluginFactory);
|
|
6
|
-
|
|
7
5
|
//#endregion
|
|
8
|
-
export { rolldown_default as default };
|
|
6
|
+
export { rolldown_default as default };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { unpluginFactory } from "./
|
|
1
|
+
import { unpluginFactory } from "./index.mjs";
|
|
2
2
|
import { createRollupPlugin } from "unplugin";
|
|
3
|
-
|
|
4
3
|
//#region src/rollup.ts
|
|
5
4
|
var rollup_default = createRollupPlugin(unpluginFactory);
|
|
6
|
-
|
|
7
5
|
//#endregion
|
|
8
|
-
export { rollup_default as default };
|
|
6
|
+
export { rollup_default as default };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { unpluginFactory } from "./
|
|
1
|
+
import { unpluginFactory } from "./index.mjs";
|
|
2
2
|
import { createRspackPlugin } from "unplugin";
|
|
3
|
-
|
|
4
3
|
//#region src/rspack.ts
|
|
5
4
|
var rspack_default = createRspackPlugin(unpluginFactory);
|
|
6
|
-
|
|
7
5
|
//#endregion
|
|
8
|
-
export { rspack_default as default };
|
|
6
|
+
export { rspack_default as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { TransformOptions as Options } from "oxc-transform-relay";
|
|
2
|
-
export { Options };
|
|
2
|
+
export type { Options };
|
package/dist/types.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/vite.d.mts
ADDED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { unpluginFactory } from "./
|
|
1
|
+
import { unpluginFactory } from "./index.mjs";
|
|
2
2
|
import { createVitePlugin } from "unplugin";
|
|
3
|
-
|
|
4
3
|
//#region src/vite.ts
|
|
5
4
|
var vite_default = createVitePlugin(unpluginFactory);
|
|
6
|
-
|
|
7
5
|
//#endregion
|
|
8
|
-
export { vite_default };
|
|
6
|
+
export { vite_default as default };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { unpluginFactory } from "./
|
|
1
|
+
import { unpluginFactory } from "./index.mjs";
|
|
2
2
|
import { createWebpackPlugin } from "unplugin";
|
|
3
|
-
|
|
4
3
|
//#region src/webpack.ts
|
|
5
4
|
var webpack_default = createWebpackPlugin(unpluginFactory);
|
|
6
|
-
|
|
7
5
|
//#endregion
|
|
8
|
-
export { webpack_default };
|
|
6
|
+
export { webpack_default as default };
|
package/package.json
CHANGED
|
@@ -1,71 +1,82 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unplugin-relay",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "A plugin for relay",
|
|
5
5
|
"keywords": [
|
|
6
|
+
"astro",
|
|
7
|
+
"astro-plugin",
|
|
8
|
+
"astro-plugin-relay",
|
|
9
|
+
"esbuild",
|
|
10
|
+
"esbuild-plugin",
|
|
11
|
+
"esbuild-plugin-relay",
|
|
12
|
+
"farm",
|
|
13
|
+
"farm-plugin",
|
|
14
|
+
"farm-plugin-relay",
|
|
15
|
+
"graphql",
|
|
16
|
+
"graphql-relay",
|
|
17
|
+
"nuxt",
|
|
18
|
+
"nuxt-plugin",
|
|
19
|
+
"nuxt-plugin-relay",
|
|
20
|
+
"relay",
|
|
21
|
+
"rolldown",
|
|
22
|
+
"rolldown-plugin",
|
|
23
|
+
"rolldown-plugin-relay",
|
|
6
24
|
"rollup",
|
|
7
|
-
"
|
|
8
|
-
"
|
|
25
|
+
"rollup-plugin",
|
|
26
|
+
"rollup-plugin-relay",
|
|
27
|
+
"rspack",
|
|
28
|
+
"rspack-plugin",
|
|
29
|
+
"rspack-plugin-relay",
|
|
30
|
+
"typescript",
|
|
9
31
|
"vite",
|
|
10
|
-
"
|
|
32
|
+
"vite-plugin",
|
|
33
|
+
"vite-plugin-relay",
|
|
34
|
+
"webpack",
|
|
35
|
+
"webpack-plugin",
|
|
36
|
+
"webpack-plugin-relay"
|
|
11
37
|
],
|
|
12
|
-
"homepage": "https://github.com/
|
|
38
|
+
"homepage": "https://github.com/PatrykWalach/unplugin-relay#readme",
|
|
13
39
|
"bugs": {
|
|
14
|
-
"url": "https://github.com/
|
|
40
|
+
"url": "https://github.com/PatrykWalach/unplugin-relay/issues"
|
|
15
41
|
},
|
|
16
42
|
"license": "MIT",
|
|
43
|
+
"author": "Patryk Wałach <author.name@mail.com>",
|
|
17
44
|
"repository": {
|
|
18
45
|
"type": "git",
|
|
19
|
-
"url": "git+https://github.com/
|
|
46
|
+
"url": "git+https://github.com/PatrykWalach/unplugin-relay.git"
|
|
20
47
|
},
|
|
21
48
|
"files": [
|
|
22
49
|
"dist"
|
|
23
50
|
],
|
|
24
51
|
"type": "module",
|
|
25
|
-
"main": "./dist/index.js",
|
|
26
|
-
"module": "./dist/index.js",
|
|
27
|
-
"types": "./dist/index.d.ts",
|
|
28
|
-
"typesVersions": {
|
|
29
|
-
"*": {
|
|
30
|
-
"*": [
|
|
31
|
-
"./dist/*",
|
|
32
|
-
"./*"
|
|
33
|
-
]
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
52
|
"exports": {
|
|
37
|
-
".": "./dist/index.
|
|
38
|
-
"./astro": "./dist/astro.
|
|
39
|
-
"./esbuild": "./dist/esbuild.
|
|
40
|
-
"./farm": "./dist/farm.
|
|
41
|
-
"./nuxt": "./dist/nuxt.
|
|
42
|
-
"./rolldown": "./dist/rolldown.
|
|
43
|
-
"./rollup": "./dist/rollup.
|
|
44
|
-
"./rspack": "./dist/rspack.
|
|
45
|
-
"./types": "./dist/types.
|
|
46
|
-
"./vite": "./dist/vite.
|
|
47
|
-
"./webpack": "./dist/webpack.
|
|
53
|
+
".": "./dist/index.mjs",
|
|
54
|
+
"./astro": "./dist/astro.mjs",
|
|
55
|
+
"./esbuild": "./dist/esbuild.mjs",
|
|
56
|
+
"./farm": "./dist/farm.mjs",
|
|
57
|
+
"./nuxt": "./dist/nuxt.mjs",
|
|
58
|
+
"./rolldown": "./dist/rolldown.mjs",
|
|
59
|
+
"./rollup": "./dist/rollup.mjs",
|
|
60
|
+
"./rspack": "./dist/rspack.mjs",
|
|
61
|
+
"./types": "./dist/types.mjs",
|
|
62
|
+
"./vite": "./dist/vite.mjs",
|
|
63
|
+
"./webpack": "./dist/webpack.mjs",
|
|
48
64
|
"./package.json": "./package.json"
|
|
49
65
|
},
|
|
66
|
+
"publishConfig": {
|
|
67
|
+
"access": "public"
|
|
68
|
+
},
|
|
50
69
|
"dependencies": {
|
|
51
|
-
"oxc-transform-relay": "^0.
|
|
52
|
-
"unplugin": "^
|
|
70
|
+
"oxc-transform-relay": "^0.147.0",
|
|
71
|
+
"unplugin": "^3.3.0"
|
|
53
72
|
},
|
|
54
73
|
"devDependencies": {
|
|
55
|
-
"@
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"nodemon": "^3.1.10",
|
|
62
|
-
"rollup": "^4.41.0",
|
|
63
|
-
"tsdown": "^0.12.0",
|
|
64
|
-
"tsx": "^4.19.4",
|
|
65
|
-
"typescript": "^5.8.3",
|
|
66
|
-
"vite": "^6.3.5",
|
|
67
|
-
"vitest": "^3.1.4",
|
|
68
|
-
"webpack": "^5.99.9"
|
|
74
|
+
"@types/node": "26.2.0",
|
|
75
|
+
"bumpp": "12.2.1",
|
|
76
|
+
"pkg-pr-new": "0.0.88",
|
|
77
|
+
"typescript": "7.0.2",
|
|
78
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@0.2.9",
|
|
79
|
+
"vite-plus": "0.2.9"
|
|
69
80
|
},
|
|
70
81
|
"peerDependencies": {
|
|
71
82
|
"@farmfe/core": ">=1",
|
|
@@ -99,13 +110,18 @@
|
|
|
99
110
|
"optional": true
|
|
100
111
|
}
|
|
101
112
|
},
|
|
113
|
+
"devEngines": {
|
|
114
|
+
"packageManager": {
|
|
115
|
+
"name": "pnpm",
|
|
116
|
+
"version": "11.22.0",
|
|
117
|
+
"onFail": "download"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
102
120
|
"scripts": {
|
|
103
|
-
"build": "
|
|
104
|
-
"dev": "
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"release": "bumpp
|
|
108
|
-
"start": "tsx src/index.ts",
|
|
109
|
-
"test": "vitest"
|
|
121
|
+
"build": "vp pack",
|
|
122
|
+
"dev": "vp pack --watch",
|
|
123
|
+
"test": "vp test",
|
|
124
|
+
"check": "vp check",
|
|
125
|
+
"release": "bumpp --pr"
|
|
110
126
|
}
|
|
111
127
|
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2021 Anthony Fu <https://github.com/antfu>
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
package/dist/astro.d.ts
DELETED
package/dist/esbuild.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as oxc_transform_relay3 from "oxc-transform-relay";
|
|
2
|
-
import * as esbuild4 from "esbuild";
|
|
3
|
-
|
|
4
|
-
//#region src/esbuild.d.ts
|
|
5
|
-
declare const _default: (options?: oxc_transform_relay3.TransformOptions | undefined) => esbuild4.Plugin;
|
|
6
|
-
|
|
7
|
-
//#endregion
|
|
8
|
-
export { _default as default };
|
package/dist/farm.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as oxc_transform_relay11 from "oxc-transform-relay";
|
|
2
|
-
import * as _farmfe_core12 from "@farmfe/core";
|
|
3
|
-
|
|
4
|
-
//#region src/farm.d.ts
|
|
5
|
-
declare const _default: (options?: oxc_transform_relay11.TransformOptions | undefined) => _farmfe_core12.JsPlugin;
|
|
6
|
-
|
|
7
|
-
//#endregion
|
|
8
|
-
export { _default as default };
|
package/dist/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Options } from "./types-C903-00Z.js";
|
|
2
|
-
import * as unplugin13 from "unplugin";
|
|
3
|
-
import { UnpluginFactory } from "unplugin";
|
|
4
|
-
|
|
5
|
-
//#region src/index.d.ts
|
|
6
|
-
declare const unpluginFactory: UnpluginFactory<Options | undefined>;
|
|
7
|
-
declare const unplugin: unplugin13.UnpluginInstance<Options | undefined, boolean>;
|
|
8
|
-
|
|
9
|
-
//#endregion
|
|
10
|
-
export { unplugin as default, unplugin, unpluginFactory };
|
package/dist/index.js
DELETED
package/dist/nuxt.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Options } from "./types-C903-00Z.js";
|
|
2
|
-
import * as _nuxt_schema5 from "@nuxt/schema";
|
|
3
|
-
|
|
4
|
-
//#region src/nuxt.d.ts
|
|
5
|
-
interface ModuleOptions extends Options {}
|
|
6
|
-
declare const _default: _nuxt_schema5.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
7
|
-
|
|
8
|
-
//#endregion
|
|
9
|
-
export { ModuleOptions, _default as default };
|
package/dist/rolldown.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as unplugin9 from "unplugin";
|
|
2
|
-
import * as oxc_transform_relay8 from "oxc-transform-relay";
|
|
3
|
-
|
|
4
|
-
//#region src/rolldown.d.ts
|
|
5
|
-
declare const _default: (options?: oxc_transform_relay8.TransformOptions | undefined) => unplugin9.RolldownPlugin<any> | unplugin9.RolldownPlugin<any>[];
|
|
6
|
-
|
|
7
|
-
//#endregion
|
|
8
|
-
export { _default as default };
|
package/dist/rollup.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as oxc_transform_relay0 from "oxc-transform-relay";
|
|
2
|
-
import * as rollup1 from "rollup";
|
|
3
|
-
|
|
4
|
-
//#region src/rollup.d.ts
|
|
5
|
-
declare const _default: (options?: oxc_transform_relay0.TransformOptions | undefined) => rollup1.Plugin<any> | rollup1.Plugin<any>[];
|
|
6
|
-
|
|
7
|
-
//#endregion
|
|
8
|
-
export { _default as default };
|
package/dist/rspack.d.ts
DELETED
package/dist/src-BsgyTMzn.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { createUnplugin } from "unplugin";
|
|
2
|
-
import { transform } from "oxc-transform-relay";
|
|
3
|
-
|
|
4
|
-
//#region src/index.ts
|
|
5
|
-
const unpluginFactory = (options) => ({
|
|
6
|
-
name: "unplugin-relay",
|
|
7
|
-
transformInclude(id) {
|
|
8
|
-
return /.(t|j)sx?/.test(id);
|
|
9
|
-
},
|
|
10
|
-
async transform(code, id) {
|
|
11
|
-
const result = await transform(id.split("?")[0], code, {
|
|
12
|
-
sourcemap: true,
|
|
13
|
-
...options
|
|
14
|
-
});
|
|
15
|
-
const diagnostics = result.errors.map((error) => `${error.message}${error.codeframe ? `\n${error.codeframe}` : ""}`);
|
|
16
|
-
for (const diagnostic of diagnostics) this.warn(diagnostic);
|
|
17
|
-
return {
|
|
18
|
-
code: result.code,
|
|
19
|
-
map: result.map
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
const unplugin = /* @__PURE__ */ createUnplugin(unpluginFactory);
|
|
24
|
-
var src_default = unplugin;
|
|
25
|
-
|
|
26
|
-
//#endregion
|
|
27
|
-
export { src_default, unplugin, unpluginFactory };
|
package/dist/types.d.ts
DELETED
package/dist/types.js
DELETED
|
File without changes
|
package/dist/vite.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as oxc_transform_relay15 from "oxc-transform-relay";
|
|
2
|
-
import * as vite16 from "vite";
|
|
3
|
-
|
|
4
|
-
//#region src/vite.d.ts
|
|
5
|
-
declare const _default: (options?: oxc_transform_relay15.TransformOptions | undefined) => vite16.Plugin<any> | vite16.Plugin<any>[];
|
|
6
|
-
|
|
7
|
-
//#endregion
|
|
8
|
-
export { _default as default };
|
package/dist/vite.js
DELETED
package/dist/webpack.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as oxc_transform_relay6 from "oxc-transform-relay";
|
|
2
|
-
import * as webpack7 from "webpack";
|
|
3
|
-
|
|
4
|
-
//#region src/webpack.d.ts
|
|
5
|
-
declare const _default: (options?: oxc_transform_relay6.TransformOptions | undefined) => webpack7.WebpackPluginInstance;
|
|
6
|
-
|
|
7
|
-
//#endregion
|
|
8
|
-
export { _default as default };
|
package/dist/webpack.js
DELETED