@cedarjs/testing 5.0.4-next.167 → 5.0.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.
- package/config/jest/api/apiBabelConfig.d.ts.map +1 -1
- package/config/jest/api/apiBabelConfig.js +3 -1
- package/config/jest/api/jest-preset.d.ts.map +1 -1
- package/config/jest/api/jest-preset.js +3 -38
- package/config/jest/babelPlugins/babel-plugin-redwood-cell.d.ts.map +1 -1
- package/config/jest/babelPlugins/babel-plugin-redwood-cell.js +1 -2
- package/config/jest/web/RedwoodWebJestEnv.d.ts +2 -2
- package/config/jest/web/RedwoodWebJestEnv.d.ts.map +1 -1
- package/config/jest/web/RedwoodWebJestEnv.js +7 -12
- package/config/jest/web/jest-preset.d.ts.map +1 -1
- package/config/jest/web/jest-preset.js +30 -135
- package/config/jest/web/jest.setup.d.ts +1 -0
- package/config/jest/web/jest.setup.d.ts.map +1 -1
- package/config/jest/web/jest.setup.js +1 -0
- package/dist/api/vitest/CedarApiVitestEnv.js +1 -1
- package/dist/api/vitest/vite-plugin-cedar-vitest-api-config.js +7 -7
- package/dist/api/vitest/vitest-api.setup.js +4 -4
- package/dist/cjs/api/vitest/CedarApiVitestEnv.js +1 -1
- package/dist/cjs/api/vitest/vite-plugin-cedar-vitest-api-config.js +7 -7
- package/dist/cjs/api/vitest/vitest-api.setup.js +4 -4
- package/dist/cjs/config/jest/api/apiBabelConfig.d.ts.map +1 -1
- package/dist/cjs/config/jest/api/apiBabelConfig.js +3 -1
- package/dist/cjs/config/jest/api/jest-preset.d.ts.map +1 -1
- package/dist/cjs/config/jest/api/jest-preset.js +3 -38
- package/dist/cjs/config/jest/babelPlugins/babel-plugin-redwood-cell.d.ts.map +1 -1
- package/dist/cjs/config/jest/babelPlugins/babel-plugin-redwood-cell.js +1 -2
- package/dist/cjs/config/jest/web/RedwoodWebJestEnv.d.ts +2 -2
- package/dist/cjs/config/jest/web/RedwoodWebJestEnv.d.ts.map +1 -1
- package/dist/cjs/config/jest/web/RedwoodWebJestEnv.js +7 -12
- package/dist/cjs/config/jest/web/jest-preset.d.ts.map +1 -1
- package/dist/cjs/config/jest/web/jest-preset.js +30 -135
- package/dist/cjs/config/jest/web/jest.setup.d.ts +1 -0
- package/dist/cjs/config/jest/web/jest.setup.d.ts.map +1 -1
- package/dist/cjs/config/jest/web/jest.setup.js +1 -0
- package/dist/cjs/web/MockProviders.js +3 -9
- package/dist/cjs/web/mockRequests.d.ts +18 -60
- package/dist/cjs/web/mockRequests.d.ts.map +1 -1
- package/dist/cjs/web/mockRequests.js +36 -107
- package/dist/cjs/web/vitest/index.d.ts +4 -0
- package/dist/cjs/web/vitest/index.d.ts.map +1 -0
- package/dist/cjs/web/vitest/index.js +0 -3
- package/dist/cjs/web/vitest/vite-plugin-auto-import.d.ts +2 -0
- package/dist/cjs/web/vitest/vite-plugin-auto-import.d.ts.map +1 -0
- package/dist/cjs/web/vitest/vite-plugin-cedarjs-router-import-transform.d.ts +7 -0
- package/dist/cjs/web/vitest/vite-plugin-cedarjs-router-import-transform.d.ts.map +1 -0
- package/dist/cjs/web/vitest/vite-plugin-create-auth-import-transform.d.ts +3 -0
- package/dist/cjs/web/vitest/vite-plugin-create-auth-import-transform.d.ts.map +1 -0
- package/dist/config/jest/api/apiBabelConfig.d.ts.map +1 -1
- package/dist/config/jest/api/apiBabelConfig.js +3 -1
- package/dist/config/jest/api/index.js +1 -5
- package/dist/config/jest/api/jest-preset.d.ts.map +1 -1
- package/dist/config/jest/api/jest-preset.js +3 -38
- package/dist/config/jest/babelPlugins/babel-plugin-redwood-cell.d.ts.map +1 -1
- package/dist/config/jest/babelPlugins/babel-plugin-redwood-cell.js +1 -2
- package/dist/config/jest/jest-serial-runner.js +1 -5
- package/dist/config/jest/web/RedwoodWebJestEnv.d.ts +2 -2
- package/dist/config/jest/web/RedwoodWebJestEnv.d.ts.map +1 -1
- package/dist/config/jest/web/RedwoodWebJestEnv.js +7 -2
- package/dist/config/jest/web/index.js +1 -5
- package/dist/config/jest/web/jest-preset.d.ts.map +1 -1
- package/dist/config/jest/web/jest-preset.js +30 -135
- package/dist/config/jest/web/jest.setup.d.ts +1 -0
- package/dist/config/jest/web/jest.setup.d.ts.map +1 -1
- package/dist/config/jest/web/jest.setup.js +1 -0
- package/dist/config/jest/web/resolver.js +1 -5
- package/dist/web/MockProviders.js +3 -9
- package/dist/web/mockRequests.d.ts +18 -60
- package/dist/web/mockRequests.d.ts.map +1 -1
- package/dist/web/mockRequests.js +37 -108
- package/dist/web/vitest/index.d.ts +0 -1
- package/dist/web/vitest/index.d.ts.map +1 -1
- package/dist/web/vitest/index.js +0 -2
- package/package.json +21 -23
- package/config/jest/web/jest-fixed-jsdom.d.js +0 -1
- package/dist/cjs/config/jest/web/jest-fixed-jsdom.d.js +0 -1
- package/dist/cjs/web/vitest/vite-plugin-cedar-vitest-web-config.js +0 -51
- package/dist/cjs/web/vitest/vitest-web.setup.js +0 -19
- package/dist/config/jest/web/jest-fixed-jsdom.d.js +0 -0
- package/dist/web/vitest/vite-plugin-cedar-vitest-web-config.d.ts +0 -12
- package/dist/web/vitest/vite-plugin-cedar-vitest-web-config.d.ts.map +0 -1
- package/dist/web/vitest/vite-plugin-cedar-vitest-web-config.js +0 -16
- package/dist/web/vitest/vitest-web.setup.d.ts +0 -2
- package/dist/web/vitest/vitest-web.setup.d.ts.map +0 -1
- package/dist/web/vitest/vitest-web.setup.js +0 -18
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
declare class RedwoodWebJestEnvironment extends
|
|
1
|
+
import { TestEnvironment } from 'jest-environment-jsdom';
|
|
2
|
+
declare class RedwoodWebJestEnvironment extends TestEnvironment {
|
|
3
3
|
setup(): Promise<void>;
|
|
4
4
|
}
|
|
5
5
|
export default RedwoodWebJestEnvironment;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RedwoodWebJestEnv.d.ts","sourceRoot":"","sources":["../../../../../src/config/jest/web/RedwoodWebJestEnv.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RedwoodWebJestEnv.d.ts","sourceRoot":"","sources":["../../../../../src/config/jest/web/RedwoodWebJestEnv.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAIxD,cAAM,yBAA0B,SAAQ,eAAe;IAC/C,KAAK;CAaZ;AAED,eAAe,yBAAyB,CAAA"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
@@ -17,24 +15,21 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
15
|
}
|
|
18
16
|
return to;
|
|
19
17
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
19
|
var RedwoodWebJestEnv_exports = {};
|
|
30
20
|
__export(RedwoodWebJestEnv_exports, {
|
|
31
21
|
default: () => RedwoodWebJestEnv_default
|
|
32
22
|
});
|
|
33
23
|
module.exports = __toCommonJS(RedwoodWebJestEnv_exports);
|
|
34
|
-
var
|
|
35
|
-
|
|
24
|
+
var import_node_util = require("node:util");
|
|
25
|
+
var import_jest_environment_jsdom = require("jest-environment-jsdom");
|
|
26
|
+
class RedwoodWebJestEnvironment extends import_jest_environment_jsdom.TestEnvironment {
|
|
36
27
|
async setup() {
|
|
37
28
|
await super.setup();
|
|
29
|
+
if (typeof this.global.TextEncoder === "undefined") {
|
|
30
|
+
this.global.TextEncoder = import_node_util.TextEncoder;
|
|
31
|
+
this.global.TextDecoder = import_node_util.TextDecoder;
|
|
32
|
+
}
|
|
38
33
|
if (typeof this.global.crypto.subtle === "undefined") {
|
|
39
34
|
this.global.crypto.subtle = {};
|
|
40
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jest-preset.d.ts","sourceRoot":"","sources":["../../../../../src/config/jest/web/jest-preset.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"jest-preset.d.ts","sourceRoot":"","sources":["../../../../../src/config/jest/web/jest-preset.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAOlC,QAAA,MAAM,MAAM,EAAE,MAkFb,CAAA;AAED,eAAe,MAAM,CAAA"}
|
|
@@ -31,68 +31,15 @@ __export(jest_preset_exports, {
|
|
|
31
31
|
default: () => jest_preset_default
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(jest_preset_exports);
|
|
34
|
-
var import_node_fs = __toESM(require("node:fs"), 1);
|
|
35
34
|
var import_node_path = __toESM(require("node:path"), 1);
|
|
36
35
|
var import_project_config = require("@cedarjs/project-config");
|
|
37
36
|
const cedarPaths = (0, import_project_config.getPaths)();
|
|
38
|
-
const
|
|
39
|
-
function resolvePackageDir(packageName, resolveFrom = RESOLVE_FROM) {
|
|
40
|
-
try {
|
|
41
|
-
return import_node_path.default.dirname(
|
|
42
|
-
require.resolve(`${packageName}/package.json`, { paths: resolveFrom })
|
|
43
|
-
);
|
|
44
|
-
} catch {
|
|
45
|
-
}
|
|
46
|
-
try {
|
|
47
|
-
let dir = import_node_path.default.dirname(require.resolve(packageName, { paths: resolveFrom }));
|
|
48
|
-
for (; ; ) {
|
|
49
|
-
const manifestPath = import_node_path.default.join(dir, "package.json");
|
|
50
|
-
if (import_node_fs.default.existsSync(manifestPath)) {
|
|
51
|
-
const manifest = JSON.parse(
|
|
52
|
-
import_node_fs.default.readFileSync(manifestPath, "utf-8")
|
|
53
|
-
);
|
|
54
|
-
if (manifest && typeof manifest === "object" && "name" in manifest && manifest.name === packageName) {
|
|
55
|
-
return dir;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
const parent = import_node_path.default.dirname(dir);
|
|
59
|
-
if (parent === dir) {
|
|
60
|
-
return void 0;
|
|
61
|
-
}
|
|
62
|
-
dir = parent;
|
|
63
|
-
}
|
|
64
|
-
} catch {
|
|
65
|
-
return void 0;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
function packagePath(packageName, relativePath = "", resolveFrom = RESOLVE_FROM) {
|
|
69
|
-
const packageDir = resolvePackageDir(packageName, resolveFrom);
|
|
70
|
-
return packageDir && import_node_path.default.join(packageDir, relativePath);
|
|
71
|
-
}
|
|
72
|
-
function resolveSubpath(specifier, resolveFrom = RESOLVE_FROM) {
|
|
73
|
-
try {
|
|
74
|
-
return require.resolve(specifier, { paths: resolveFrom });
|
|
75
|
-
} catch {
|
|
76
|
-
return void 0;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
const cedarWebDir = resolvePackageDir("@cedarjs/web");
|
|
80
|
-
const cedarWebResolveFrom = cedarWebDir ? [cedarWebDir, ...RESOLVE_FROM] : RESOLVE_FROM;
|
|
81
|
-
function definedEntries(mappings) {
|
|
82
|
-
return Object.fromEntries(
|
|
83
|
-
Object.entries(mappings).filter(
|
|
84
|
-
(entry) => entry[1] !== void 0
|
|
85
|
-
)
|
|
86
|
-
);
|
|
87
|
-
}
|
|
37
|
+
const NODE_MODULES_PATH = import_node_path.default.join(cedarPaths.base, "node_modules");
|
|
88
38
|
const config = {
|
|
89
39
|
// To make sure other config option which depends on rootDir always
|
|
90
40
|
// use correct path, for example, coverageDirectory
|
|
91
41
|
rootDir: cedarPaths.base,
|
|
92
42
|
roots: [import_node_path.default.join(cedarPaths.web.src)],
|
|
93
|
-
// Opting out of jsdom's browser-style export condition resolution (needed to
|
|
94
|
-
// resolve `msw/node`) is handled by the environment itself, via
|
|
95
|
-
// jest-fixed-jsdom
|
|
96
43
|
testEnvironment: import_node_path.default.join(__dirname, "./RedwoodWebJestEnv.js"),
|
|
97
44
|
displayName: {
|
|
98
45
|
color: "blueBright",
|
|
@@ -122,78 +69,41 @@ const config = {
|
|
|
122
69
|
],
|
|
123
70
|
setupFilesAfterEnv: [import_node_path.default.resolve(__dirname, "./jest.setup.js")],
|
|
124
71
|
moduleNameMapper: {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
"
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
// @NOTE: Import @cedarjs/testing in web tests, and it automatically remaps to the web side only
|
|
151
|
-
// This is to prevent web stuff leaking into api, and vice versa
|
|
152
|
-
"^@cedarjs/testing$": resolveSubpath("@cedarjs/testing/web"),
|
|
153
|
-
/**
|
|
154
|
-
* Mock out files that aren't particularly useful in tests. See fileMock.js for more info.
|
|
155
|
-
*/
|
|
156
|
-
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|css)$": resolveSubpath("@cedarjs/testing/dist/cjs/web/fileMock.js")
|
|
157
|
-
}),
|
|
72
|
+
/**
|
|
73
|
+
* Make sure modules that require different versions of these
|
|
74
|
+
* dependencies end up using the same one.
|
|
75
|
+
*/
|
|
76
|
+
"^react$": import_node_path.default.join(NODE_MODULES_PATH, "react"),
|
|
77
|
+
"^react-dom$": import_node_path.default.join(NODE_MODULES_PATH, "react-dom"),
|
|
78
|
+
"^@apollo/client/react$": import_node_path.default.join(
|
|
79
|
+
NODE_MODULES_PATH,
|
|
80
|
+
"@apollo/client/react"
|
|
81
|
+
),
|
|
82
|
+
// We replace imports to "@cedarjs/router" with our own "mock" implementation.
|
|
83
|
+
"^@cedarjs/router$": import_node_path.default.join(
|
|
84
|
+
NODE_MODULES_PATH,
|
|
85
|
+
"@cedarjs/testing/dist/cjs/web/MockRouter.js"
|
|
86
|
+
),
|
|
87
|
+
"^@cedarjs/web$": import_node_path.default.join(NODE_MODULES_PATH, "@cedarjs/web/dist/cjs"),
|
|
88
|
+
// This allows us to mock `createAuthentication` which is used by auth
|
|
89
|
+
// clients, which in turn lets us mock `useAuth` in tests
|
|
90
|
+
"^@cedarjs/auth$": import_node_path.default.join(
|
|
91
|
+
NODE_MODULES_PATH,
|
|
92
|
+
"@cedarjs/testing/dist/cjs/web/mockAuth.js"
|
|
93
|
+
),
|
|
94
|
+
// @NOTE: Import @cedarjs/testing in web tests, and it automatically remaps to the web side only
|
|
95
|
+
// This is to prevent web stuff leaking into api, and vice versa
|
|
96
|
+
"^@cedarjs/testing$": import_node_path.default.join(NODE_MODULES_PATH, "@cedarjs/testing/web"),
|
|
158
97
|
"~__CEDAR__USER_ROUTES_FOR_MOCK": cedarPaths.web.routes,
|
|
159
98
|
"~__CEDAR__USER_AUTH_FOR_MOCK": import_node_path.default.join(cedarPaths.web.src, "auth"),
|
|
99
|
+
/**
|
|
100
|
+
* Mock out files that aren't particularly useful in tests. See fileMock.js for more info.
|
|
101
|
+
*/
|
|
102
|
+
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|css)$": "@cedarjs/testing/dist/cjs/web/fileMock.js",
|
|
160
103
|
// Support for importing files with extensions (like you'd do in ESM projects)
|
|
161
104
|
"^(\\.{1,2}/.*)\\.js$": "$1"
|
|
162
105
|
},
|
|
163
106
|
transform: {
|
|
164
|
-
// MSW's CommonJS build `require`s ESM-only packages (`rettime`,
|
|
165
|
-
// `@open-draft/deferred-promise` and `until-async`, which ships ESM in
|
|
166
|
-
// plain `.js` files). Node supports require(esm), but Jest's runtime
|
|
167
|
-
// doesn't, so compile any `.mjs` file that gets pulled in from
|
|
168
|
-
// node_modules (plus until-async) to CommonJS. This needs its own
|
|
169
|
-
// transform entry (with the config inlined) because the web babel config
|
|
170
|
-
// ignores node_modules
|
|
171
|
-
//
|
|
172
|
-
// The `@cedarjs/auth-*-web` packages are ESM-only too, and (like
|
|
173
|
-
// until-async) ship plain `.js` files rather than `.mjs` since their
|
|
174
|
-
// package.json already declares `"type": "module"`. A generated
|
|
175
|
-
// project's `web/src/auth.ts` imports one of these, so they need the
|
|
176
|
-
// same carve-out. `@cedarjs/forms` is ESM-only for the same reason, and
|
|
177
|
-
// gets pulled into virtually every generated project's web-side tests
|
|
178
|
-
// via `web/src/pages/**` scaffolds and dbAuth login/signup forms.
|
|
179
|
-
// `@cedarjs/web`, `@cedarjs/auth`, and `@cedarjs/router` are ESM-only
|
|
180
|
-
// too. `web` and `router` are imported directly by virtually every
|
|
181
|
-
// generated project's web-side test (`Routes.tsx`, page/component
|
|
182
|
-
// scaffolds), and `auth` gets pulled in transitively through `web`.
|
|
183
|
-
// Jest's own module loader re-applies this carve-out to every file it
|
|
184
|
-
// loads, including ones reached transitively through an
|
|
185
|
-
// already-transformed require() call, so all of them need to be listed
|
|
186
|
-
// even though only `web`/`router` are usually imported directly.
|
|
187
|
-
"[/\\\\]node_modules[/\\\\](?:.+\\.mjs|(?:until-async|@cedarjs[/\\\\](?:auth-[a-z-]+-web|forms|web|auth|router))[/\\\\].+\\.js)$": [
|
|
188
|
-
"babel-jest",
|
|
189
|
-
{
|
|
190
|
-
babelrc: false,
|
|
191
|
-
configFile: false,
|
|
192
|
-
presets: [
|
|
193
|
-
[require.resolve("@babel/preset-env"), { targets: { node: "20" } }]
|
|
194
|
-
]
|
|
195
|
-
}
|
|
196
|
-
],
|
|
197
107
|
"\\.[jt]sx?$": [
|
|
198
108
|
"babel-jest",
|
|
199
109
|
// When jest runs tests in parallel, it serializes the config before passing down options to babel
|
|
@@ -203,21 +113,6 @@ const config = {
|
|
|
203
113
|
}
|
|
204
114
|
]
|
|
205
115
|
},
|
|
206
|
-
// Jest's default is to not transform anything in node_modules, but `.mjs`
|
|
207
|
-
// files (and until-async, @cedarjs/auth-*-web, @cedarjs/forms,
|
|
208
|
-
// @cedarjs/web, @cedarjs/auth, and @cedarjs/router) have to be compiled to
|
|
209
|
-
// CommonJS (see the transform above).
|
|
210
|
-
// The `.pnpm` lookahead is what makes this work with pnpm: its virtual store
|
|
211
|
-
// puts packages at `node_modules/.pnpm/<pkg>@<version>/node_modules/<pkg>`,
|
|
212
|
-
// so without it the pattern matches (and thereby ignores) at the *first*
|
|
213
|
-
// `node_modules` segment, where the following path starts with `.pnpm/`
|
|
214
|
-
// instead of `until-async/` and the exception never gets a chance to apply.
|
|
215
|
-
// Skipping that segment forces the match onto the inner `node_modules`,
|
|
216
|
-
// which looks the same as a hoisted npm/yarn layout
|
|
217
|
-
transformIgnorePatterns: [
|
|
218
|
-
"[/\\\\]node_modules[/\\\\](?!\\.pnpm[/\\\\])(?!.*\\.mjs$)(?!until-async[/\\\\])(?!@cedarjs[/\\\\]auth-[a-z-]+-web[/\\\\])(?!@cedarjs[/\\\\]forms[/\\\\])(?!@cedarjs[/\\\\]web[/\\\\])(?!@cedarjs[/\\\\]auth[/\\\\])(?!@cedarjs[/\\\\]router[/\\\\])",
|
|
219
|
-
"\\.pnp\\.[^\\\\/]+$"
|
|
220
|
-
],
|
|
221
116
|
resolver: import_node_path.default.resolve(__dirname, "./resolver.js"),
|
|
222
117
|
testPathIgnorePatterns: [".(stories|mock).[jt]sx?$"]
|
|
223
118
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jest.setup.d.ts","sourceRoot":"","sources":["../../../../../src/config/jest/web/jest.setup.ts"],"names":[],"mappings":"AAEA,OAAO,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"jest.setup.d.ts","sourceRoot":"","sources":["../../../../../src/config/jest/web/jest.setup.ts"],"names":[],"mappings":"AAEA,OAAO,2BAA2B,CAAA;AAClC,OAAO,cAAc,CAAA;AAGrB,OAAO,EAML,eAAe,IAAI,gBAAgB,EACpC,MAAM,8BAA8B,CAAA;AAErC,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,mBAAmB,EAAE,MAAM,CAAA;IAE/B,IAAI,eAAe,EAAE,OAAO,gBAAgB,CAAA;CAC7C"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var import_jest_dom = require("@testing-library/jest-dom");
|
|
3
|
+
var import_whatwg_fetch = require("whatwg-fetch");
|
|
3
4
|
var import_findCellMocks = require("../../../web/findCellMocks.js");
|
|
4
5
|
var import_mockRequests = require("../../../web/mockRequests.js");
|
|
5
6
|
global.mockGraphQLQuery = import_mockRequests.mockGraphQLQuery;
|
|
@@ -34,7 +34,7 @@ module.exports = __toCommonJS(MockProviders_exports);
|
|
|
34
34
|
var import_react = __toESM(require("react"), 1);
|
|
35
35
|
var import_router = require("@cedarjs/router");
|
|
36
36
|
var import_web = require("@cedarjs/web");
|
|
37
|
-
var
|
|
37
|
+
var import_apollo = require("@cedarjs/web/apollo");
|
|
38
38
|
var import_globRoutesImporter = require("./globRoutesImporter.js");
|
|
39
39
|
var import_mockAuth = require("./mockAuth.js");
|
|
40
40
|
var import_MockParamsProvider = require("./MockParamsProvider.js");
|
|
@@ -49,16 +49,10 @@ try {
|
|
|
49
49
|
UserRoutes = () => /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null);
|
|
50
50
|
}
|
|
51
51
|
const MockProviders = ({ children }) => {
|
|
52
|
-
return /* @__PURE__ */ import_react.default.createElement(import_web.RedwoodProvider, { titleTemplate: "%PageTitle | %AppTitle" }, /* @__PURE__ */ import_react.default.createElement(
|
|
52
|
+
return /* @__PURE__ */ import_react.default.createElement(import_web.RedwoodProvider, { titleTemplate: "%PageTitle | %AppTitle" }, /* @__PURE__ */ import_react.default.createElement(import_apollo.RedwoodApolloProvider, { useAuth: import_mockAuth.useAuth }, /* @__PURE__ */ import_react.default.createElement(UserRoutes, null), /* @__PURE__ */ import_react.default.createElement(import_globRoutesImporter.UserRoutes, null), /* @__PURE__ */ import_react.default.createElement(import_router.LocationProvider, null, /* @__PURE__ */ import_react.default.createElement(import_MockParamsProvider.MockParamsProvider, null, children))));
|
|
53
53
|
};
|
|
54
54
|
function isModuleNotFoundError(error, module2) {
|
|
55
|
-
|
|
56
|
-
return false;
|
|
57
|
-
}
|
|
58
|
-
if ("moduleName" in error) {
|
|
59
|
-
return error.moduleName === module2;
|
|
60
|
-
}
|
|
61
|
-
return "message" in error && typeof error.message === "string" && (error.message.includes(`'${module2}'`) || error.message.includes(`"${module2}"`));
|
|
55
|
+
return !!error && typeof error === "object" && "code" in error && error.code === "MODULE_NOT_FOUND" && "moduleName" in error && error.moduleName === module2;
|
|
62
56
|
}
|
|
63
57
|
// Annotate the CommonJS export names for ESM import in node:
|
|
64
58
|
0 && (module.exports = {
|
|
@@ -1,67 +1,25 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
type MockServerInstance = MockServerCommonApi & {
|
|
11
|
-
listen(options?: Partial<SharedOptions>): void;
|
|
12
|
-
close(): void;
|
|
13
|
-
};
|
|
14
|
-
type StartOptions<Target> = Target extends 'browsers' ? StartMSWWorkerOptions : Partial<SharedOptions>;
|
|
15
|
-
export declare const startMSW: <Target extends "node" | "browsers">(target: Target, options?: StartOptions<Target>) => Promise<MockWorkerInstance | MockServerInstance>;
|
|
1
|
+
import type { StartOptions as StartMSWWorkerOptions, SharedOptions as SharedMSWOptions, MockedResponse, DefaultBodyType, RequestHandler, GraphQLContext, GraphQLRequest, ResponseTransformer } from 'msw';
|
|
2
|
+
/**
|
|
3
|
+
* Plugs fetch for the correct target in order to capture requests.
|
|
4
|
+
*
|
|
5
|
+
* Request handlers can be registered lazily (via `mockGraphQL<Query|Mutation>`),
|
|
6
|
+
* the queue will be drained and used.
|
|
7
|
+
*/
|
|
8
|
+
type StartOptions<Target> = Target extends 'browsers' ? StartMSWWorkerOptions : SharedMSWOptions;
|
|
9
|
+
export declare const startMSW: <Target extends "node" | "browsers">(target: Target, options?: StartOptions<Target>) => Promise<any>;
|
|
16
10
|
export declare const setupRequestHandlers: () => void;
|
|
17
11
|
export declare const closeServer: () => void;
|
|
18
12
|
export declare const registerHandler: (handler: RequestHandler) => void;
|
|
19
|
-
/**
|
|
20
|
-
* The `ctx` object passed to mock-data functions. It mirrors the API of MSW
|
|
21
|
-
* v1's GraphQL context so that existing Cedar mocks keep working with MSW v2,
|
|
22
|
-
* where the `(req, res, ctx)` resolver signature no longer exists.
|
|
23
|
-
*/
|
|
24
|
-
export interface MockGraphQLContext {
|
|
25
|
-
/** Set the http response status code (and optionally status text) */
|
|
26
|
-
status(code: number, text?: string): void;
|
|
27
|
-
/** Delay the response by the given number of milliseconds */
|
|
28
|
-
delay(durationMs: number): void;
|
|
29
|
-
/** Return GraphQL errors in the response */
|
|
30
|
-
errors(errorList: Record<string, unknown>[]): void;
|
|
31
|
-
/** Set a response header. Accepts a name/value pair or an object */
|
|
32
|
-
set(name: string | Record<string, string>, value?: string): void;
|
|
33
|
-
/** Set a response cookie */
|
|
34
|
-
cookie(name: string, value: string): void;
|
|
35
|
-
/** Set the `extensions` field of the GraphQL response */
|
|
36
|
-
extensions(extensions: Record<string, unknown>): void;
|
|
37
|
-
/** Set an arbitrary field on the GraphQL response body */
|
|
38
|
-
field(fieldName: string, value: unknown): void;
|
|
39
|
-
/** Set the `data` field of the response. Overrides the returned mock-data */
|
|
40
|
-
data(data: Record<string, unknown>): void;
|
|
41
|
-
/** Perform a request that bypasses any mock handlers */
|
|
42
|
-
fetch(input: string | URL | Request, init?: RequestInit): Promise<Response>;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Information about the intercepted GraphQL request, passed to mock-data
|
|
46
|
-
* functions as `req`
|
|
47
|
-
*/
|
|
48
|
-
export interface MockGraphQLRequest {
|
|
49
|
-
/** The intercepted Fetch API `Request` */
|
|
50
|
-
request: Request;
|
|
51
|
-
/** The GraphQL query document string */
|
|
52
|
-
query: string;
|
|
53
|
-
operationName: string;
|
|
54
|
-
variables: Record<string, any>;
|
|
55
|
-
cookies: Record<string, string>;
|
|
56
|
-
url: URL;
|
|
57
|
-
headers: Headers;
|
|
58
|
-
method: string;
|
|
59
|
-
}
|
|
60
13
|
export type DataFunction<Query extends Record<string, unknown> = Record<string, unknown>, QueryVariables = Record<string, any>> = (variables: QueryVariables, { req, ctx, }: {
|
|
61
|
-
req:
|
|
62
|
-
ctx:
|
|
63
|
-
}) => Query | void
|
|
64
|
-
type
|
|
14
|
+
req: GraphQLRequest<any>;
|
|
15
|
+
ctx: GraphQLContext<Record<string, any>>;
|
|
16
|
+
}) => Query | void;
|
|
17
|
+
type ResponseFunction<BodyType extends DefaultBodyType = any> = (...transformers: ResponseTransformer<BodyType>[]) => MockedResponse<BodyType>;
|
|
18
|
+
type ResponseEnhancers = {
|
|
19
|
+
once: ResponseFunction<any>;
|
|
20
|
+
networkError: (message: string) => void;
|
|
21
|
+
};
|
|
22
|
+
type ResponseEnhancer = keyof ResponseEnhancers;
|
|
65
23
|
export declare const mockGraphQLQuery: <Query extends Record<string, unknown> = Record<string, unknown>, QueryVariables = Record<string, any>>(operation: string, data: DataFunction<Query, QueryVariables> | Query, responseEnhancer?: ResponseEnhancer) => Record<string, any> | DataFunction<Record<string, unknown>, Record<string, any>>;
|
|
66
24
|
export declare const mockGraphQLMutation: <Query extends Record<string, unknown> = Record<string, unknown>, QueryVariables = Record<string, any>>(operation: string, data: DataFunction<Query, QueryVariables> | Query, responseEnhancer?: ResponseEnhancer) => Record<string, any> | DataFunction<Record<string, unknown>, Record<string, any>>;
|
|
67
25
|
export declare const mockedUserMeta: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mockRequests.d.ts","sourceRoot":"","sources":["../../../src/web/mockRequests.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"mockRequests.d.ts","sourceRoot":"","sources":["../../../src/web/mockRequests.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,YAAY,IAAI,qBAAqB,EACrC,aAAa,IAAI,gBAAgB,EACjC,cAAc,EACd,eAAe,EACf,cAAc,EACd,cAAc,EACd,cAAc,EACd,mBAAmB,EAGpB,MAAM,KAAK,CAAA;AAQZ;;;;;GAKG;AAEH,KAAK,YAAY,CAAC,MAAM,IAAI,MAAM,SAAS,UAAU,GACjD,qBAAqB,GACrB,gBAAgB,CAAA;AACpB,eAAO,MAAM,QAAQ,GAAU,MAAM,SAAS,MAAM,GAAG,UAAU,EAC/D,QAAQ,MAAM,EACd,UAAU,YAAY,CAAC,MAAM,CAAC,iBAgB/B,CAAA;AAED,eAAO,MAAM,oBAAoB,YAMhC,CAAA;AAED,eAAO,MAAM,WAAW,YAEvB,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,SAAS,cAAc,SAQtD,CAAA;AAED,MAAM,MAAM,YAAY,CACtB,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/D,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAClC,CACF,SAAS,EAAE,cAAc,EACzB,EACE,GAAG,EACH,GAAG,GACJ,EAAE;IACD,GAAG,EAAE,cAAc,CAAC,GAAG,CAAC,CAAA;IACxB,GAAG,EAAE,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAA;CACzC,KACE,KAAK,GAAG,IAAI,CAAA;AAGjB,KAAK,gBAAgB,CAAC,QAAQ,SAAS,eAAe,GAAG,GAAG,IAAI,CAC9D,GAAG,YAAY,EAAE,mBAAmB,CAAC,QAAQ,CAAC,EAAE,KAC7C,cAAc,CAAC,QAAQ,CAAC,CAAA;AAE7B,KAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,gBAAgB,CAAC,GAAG,CAAC,CAAA;IAC3B,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CACxC,CAAA;AACD,KAAK,gBAAgB,GAAG,MAAM,iBAAiB,CAAA;AAuD/C,eAAO,MAAM,gBAAgB,GAC3B,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/D,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAEpC,WAAW,MAAM,EACjB,MAAM,YAAY,CAAC,KAAK,EAAE,cAAc,CAAC,GAAG,KAAK,EACjD,mBAAmB,gBAAgB,qFAGpC,CAAA;AAED,eAAO,MAAM,mBAAmB,GAC9B,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/D,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAEpC,WAAW,MAAM,EACjB,MAAM,YAAY,CAAC,KAAK,EAAE,cAAc,CAAC,GAAG,KAAK,EACjD,mBAAmB,gBAAgB,qFAGpC,CAAA;AAED,eAAO,MAAM,cAAc,EAAE;IAAE,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;CAEzE,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,SASnE,CAAA"}
|
|
@@ -41,43 +41,28 @@ module.exports = __toCommonJS(mockRequests_exports);
|
|
|
41
41
|
var import_msw = require("msw");
|
|
42
42
|
let REQUEST_HANDLER_QUEUE = [];
|
|
43
43
|
let SERVER_INSTANCE;
|
|
44
|
-
const MSW_NODE_SPECIFIER = "msw/node";
|
|
45
44
|
const startMSW = async (target, options) => {
|
|
46
45
|
if (SERVER_INSTANCE) {
|
|
47
46
|
return SERVER_INSTANCE;
|
|
48
47
|
}
|
|
49
48
|
if (target === "browsers") {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
SERVER_INSTANCE = worker;
|
|
53
|
-
await worker.start(options);
|
|
49
|
+
SERVER_INSTANCE = (0, import_msw.setupWorker)();
|
|
50
|
+
await SERVER_INSTANCE.start(options);
|
|
54
51
|
} else {
|
|
55
|
-
const { setupServer } = require(
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
);
|
|
59
|
-
const server = setupServer();
|
|
60
|
-
SERVER_INSTANCE = server;
|
|
61
|
-
server.listen(options);
|
|
52
|
+
const { setupServer } = require("msw/node");
|
|
53
|
+
SERVER_INSTANCE = setupServer();
|
|
54
|
+
await SERVER_INSTANCE.listen(options);
|
|
62
55
|
}
|
|
63
56
|
return SERVER_INSTANCE;
|
|
64
57
|
};
|
|
65
58
|
const setupRequestHandlers = () => {
|
|
66
|
-
SERVER_INSTANCE
|
|
59
|
+
SERVER_INSTANCE.resetHandlers();
|
|
67
60
|
for (const handler of REQUEST_HANDLER_QUEUE) {
|
|
68
|
-
SERVER_INSTANCE
|
|
61
|
+
SERVER_INSTANCE.use(handler);
|
|
69
62
|
}
|
|
70
63
|
};
|
|
71
64
|
const closeServer = () => {
|
|
72
|
-
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
if ("close" in SERVER_INSTANCE) {
|
|
76
|
-
SERVER_INSTANCE.close();
|
|
77
|
-
} else {
|
|
78
|
-
SERVER_INSTANCE.stop();
|
|
79
|
-
}
|
|
80
|
-
SERVER_INSTANCE = void 0;
|
|
65
|
+
SERVER_INSTANCE.close();
|
|
81
66
|
};
|
|
82
67
|
const registerHandler = (handler) => {
|
|
83
68
|
if (!SERVER_INSTANCE) {
|
|
@@ -87,95 +72,39 @@ const registerHandler = (handler) => {
|
|
|
87
72
|
}
|
|
88
73
|
};
|
|
89
74
|
const mockGraphQL = (type, operation, data, responseEnhancer) => {
|
|
90
|
-
const resolver =
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
operationName,
|
|
94
|
-
variables,
|
|
95
|
-
cookies
|
|
96
|
-
}) => {
|
|
97
|
-
let d = void 0;
|
|
98
|
-
let status = 200;
|
|
99
|
-
let statusText;
|
|
100
|
-
let delayDurationMs;
|
|
101
|
-
let errorList;
|
|
102
|
-
let extensions;
|
|
103
|
-
let explicitData;
|
|
104
|
-
const extraFields = {};
|
|
105
|
-
const headers = new Headers();
|
|
75
|
+
const resolver = (req, res, ctx) => {
|
|
76
|
+
let d = data;
|
|
77
|
+
let responseTransforms = [];
|
|
106
78
|
if (typeof data === "function") {
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
delayDurationMs = durationMs;
|
|
114
|
-
},
|
|
115
|
-
errors: (errors) => {
|
|
116
|
-
errorList = errors;
|
|
117
|
-
},
|
|
118
|
-
set: (name, value) => {
|
|
119
|
-
if (typeof name === "object") {
|
|
120
|
-
for (const [headerName, headerValue] of Object.entries(name)) {
|
|
121
|
-
headers.set(headerName, headerValue);
|
|
122
|
-
}
|
|
123
|
-
} else if (typeof value !== "undefined") {
|
|
124
|
-
headers.set(name, value);
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
|
-
cookie: (name, value) => {
|
|
128
|
-
headers.append("Set-Cookie", `${name}=${value}`);
|
|
129
|
-
},
|
|
130
|
-
extensions: (ext) => {
|
|
131
|
-
extensions = ext;
|
|
132
|
-
},
|
|
133
|
-
field: (fieldName, value) => {
|
|
134
|
-
extraFields[fieldName] = value;
|
|
135
|
-
},
|
|
136
|
-
data: (dataValue) => {
|
|
137
|
-
explicitData = dataValue;
|
|
138
|
-
},
|
|
139
|
-
fetch: (input, init) => fetch((0, import_msw.bypass)(input, init))
|
|
79
|
+
const captureTransform = (fn) => {
|
|
80
|
+
return (...args) => {
|
|
81
|
+
const resTransform = fn(...args);
|
|
82
|
+
responseTransforms = [...responseTransforms, resTransform];
|
|
83
|
+
return resTransform;
|
|
84
|
+
};
|
|
140
85
|
};
|
|
141
|
-
const
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
86
|
+
const newCtx = {
|
|
87
|
+
status: captureTransform(ctx.status),
|
|
88
|
+
delay: captureTransform(ctx.delay),
|
|
89
|
+
errors: captureTransform(ctx.errors),
|
|
90
|
+
set: captureTransform(ctx.set),
|
|
91
|
+
fetch: captureTransform(ctx.fetch),
|
|
92
|
+
data: captureTransform(ctx.data),
|
|
93
|
+
extensions: captureTransform(ctx.extensions),
|
|
94
|
+
cookie: captureTransform(ctx.cookie),
|
|
95
|
+
field: captureTransform(ctx.field)
|
|
150
96
|
};
|
|
151
|
-
d =
|
|
152
|
-
|
|
153
|
-
|
|
97
|
+
d = data(req.variables, {
|
|
98
|
+
req,
|
|
99
|
+
ctx: newCtx
|
|
100
|
+
});
|
|
154
101
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
await (0, import_msw.delay)(delayDurationMs);
|
|
160
|
-
}
|
|
161
|
-
const body = { ...extraFields };
|
|
162
|
-
const bodyData = explicitData ?? d;
|
|
163
|
-
if (typeof bodyData !== "undefined") {
|
|
164
|
-
body.data = bodyData;
|
|
165
|
-
}
|
|
166
|
-
if (typeof errorList !== "undefined") {
|
|
167
|
-
body.errors = errorList;
|
|
168
|
-
}
|
|
169
|
-
if (typeof extensions !== "undefined") {
|
|
170
|
-
body.extensions = extensions;
|
|
171
|
-
}
|
|
172
|
-
return import_msw.HttpResponse.json(body, { status, statusText, headers });
|
|
102
|
+
return (responseEnhancer ? res[responseEnhancer] : res)(
|
|
103
|
+
ctx.data(d),
|
|
104
|
+
...responseTransforms
|
|
105
|
+
);
|
|
173
106
|
};
|
|
174
|
-
registerHandler(
|
|
175
|
-
import_msw.graphql[type](operation, resolver, {
|
|
176
|
-
once: responseEnhancer === "once"
|
|
177
|
-
})
|
|
178
|
-
);
|
|
107
|
+
registerHandler(import_msw.graphql[type](operation, resolver));
|
|
179
108
|
return data;
|
|
180
109
|
};
|
|
181
110
|
const mockGraphQLQuery = (operation, data, responseEnhancer) => {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { cedarJsRouterImportTransformPlugin } from './vite-plugin-cedarjs-router-import-transform.js';
|
|
2
|
+
export { createAuthImportTransformPlugin } from './vite-plugin-create-auth-import-transform.js';
|
|
3
|
+
export { autoImportsPlugin } from './vite-plugin-auto-import.js';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/web/vitest/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,MAAM,kDAAkD,CAAA;AACrG,OAAO,EAAE,+BAA+B,EAAE,MAAM,+CAA+C,CAAA;AAC/F,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA"}
|
|
@@ -20,18 +20,15 @@ var vitest_exports = {};
|
|
|
20
20
|
__export(vitest_exports, {
|
|
21
21
|
autoImportsPlugin: () => import_vite_plugin_auto_import.autoImportsPlugin,
|
|
22
22
|
cedarJsRouterImportTransformPlugin: () => import_vite_plugin_cedarjs_router_import_transform.cedarJsRouterImportTransformPlugin,
|
|
23
|
-
cedarVitestWebConfigPlugin: () => import_vite_plugin_cedar_vitest_web_config.cedarVitestWebConfigPlugin,
|
|
24
23
|
createAuthImportTransformPlugin: () => import_vite_plugin_create_auth_import_transform.createAuthImportTransformPlugin
|
|
25
24
|
});
|
|
26
25
|
module.exports = __toCommonJS(vitest_exports);
|
|
27
26
|
var import_vite_plugin_cedarjs_router_import_transform = require("./vite-plugin-cedarjs-router-import-transform.js");
|
|
28
|
-
var import_vite_plugin_cedar_vitest_web_config = require("./vite-plugin-cedar-vitest-web-config.js");
|
|
29
27
|
var import_vite_plugin_create_auth_import_transform = require("./vite-plugin-create-auth-import-transform.js");
|
|
30
28
|
var import_vite_plugin_auto_import = require("./vite-plugin-auto-import.js");
|
|
31
29
|
// Annotate the CommonJS export names for ESM import in node:
|
|
32
30
|
0 && (module.exports = {
|
|
33
31
|
autoImportsPlugin,
|
|
34
32
|
cedarJsRouterImportTransformPlugin,
|
|
35
|
-
cedarVitestWebConfigPlugin,
|
|
36
33
|
createAuthImportTransformPlugin
|
|
37
34
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vite-plugin-auto-import.d.ts","sourceRoot":"","sources":["../../../../src/web/vitest/vite-plugin-auto-import.ts"],"names":[],"mappings":"AAEA,wBAAgB,iBAAiB,oJAsBhC"}
|