@cedarjs/testing 0.6.1-next.0 → 0.6.1-next.51
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/RedwoodApiJestEnv.d.ts +11 -0
- package/config/jest/api/RedwoodApiJestEnv.d.ts.map +1 -0
- package/config/jest/api/RedwoodApiJestEnv.js +33 -16
- package/config/jest/api/apiBabelConfig.d.ts +5 -0
- package/config/jest/api/apiBabelConfig.d.ts.map +1 -0
- package/config/jest/api/apiBabelConfig.js +33 -17
- package/config/jest/api/globalSetup.d.ts +3 -0
- package/config/jest/api/globalSetup.d.ts.map +1 -0
- package/config/jest/api/globalSetup.js +59 -44
- package/config/jest/api/index.d.ts +3 -0
- package/config/jest/api/index.d.ts.map +1 -0
- package/config/jest/api/index.js +25 -2
- package/config/jest/api/jest-preset.d.ts +4 -0
- package/config/jest/api/jest-preset.d.ts.map +1 -0
- package/config/jest/api/jest-preset.js +69 -39
- package/config/jest/api/jest.setup.d.ts +2 -0
- package/config/jest/api/jest.setup.d.ts.map +1 -0
- package/config/jest/api/jest.setup.js +189 -248
- package/config/jest/babelPlugins/babel-plugin-redwood-cell.d.ts +11 -0
- package/config/jest/babelPlugins/babel-plugin-redwood-cell.d.ts.map +1 -0
- package/config/jest/babelPlugins/babel-plugin-redwood-cell.js +103 -124
- package/config/jest/jest-serial-runner.d.ts +8 -0
- package/config/jest/jest-serial-runner.d.ts.map +1 -0
- package/config/jest/jest-serial-runner.js +33 -9
- package/config/jest/web/RedwoodWebJestEnv.d.ts +6 -0
- package/config/jest/web/RedwoodWebJestEnv.d.ts.map +1 -0
- package/config/jest/web/RedwoodWebJestEnv.js +33 -12
- package/config/jest/web/index.d.ts +3 -0
- package/config/jest/web/index.d.ts.map +1 -0
- package/config/jest/web/index.js +25 -2
- package/config/jest/web/jest-preset.d.ts +4 -0
- package/config/jest/web/jest-preset.d.ts.map +1 -0
- package/config/jest/web/jest-preset.js +78 -50
- package/config/jest/web/jest.setup.d.ts +8 -0
- package/config/jest/web/jest.setup.d.ts.map +1 -0
- package/config/jest/web/jest.setup.js +17 -36
- package/config/jest/web/resolver.d.ts +4 -0
- package/config/jest/web/resolver.d.ts.map +1 -0
- package/config/jest/web/resolver.js +24 -31
- package/config/jest/web/webBabelConfig.d.ts +10 -0
- package/config/jest/web/webBabelConfig.d.ts.map +1 -0
- package/config/jest/web/webBabelConfig.js +43 -13
- package/config/package.json +1 -0
- package/dist/api/directUrlHelpers.d.ts.map +1 -1
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +1 -0
- package/dist/cjs/api/directUrlHelpers.d.ts.map +1 -1
- package/dist/cjs/api/index.d.ts +1 -0
- package/dist/cjs/api/index.d.ts.map +1 -1
- package/dist/cjs/api/index.js +3 -1
- package/dist/cjs/config/jest/api/RedwoodApiJestEnv.d.ts +11 -0
- package/dist/cjs/config/jest/api/RedwoodApiJestEnv.d.ts.map +1 -0
- package/dist/cjs/config/jest/api/RedwoodApiJestEnv.js +48 -0
- package/dist/cjs/config/jest/api/apiBabelConfig.d.ts +5 -0
- package/dist/cjs/config/jest/api/apiBabelConfig.d.ts.map +1 -0
- package/dist/cjs/config/jest/api/apiBabelConfig.js +34 -0
- package/dist/cjs/config/jest/api/globalSetup.d.ts +3 -0
- package/dist/cjs/config/jest/api/globalSetup.d.ts.map +1 -0
- package/dist/cjs/config/jest/api/globalSetup.js +61 -0
- package/dist/cjs/config/jest/api/index.d.ts +3 -0
- package/dist/cjs/config/jest/api/index.d.ts.map +1 -0
- package/dist/cjs/config/jest/api/index.js +25 -0
- package/dist/cjs/config/jest/api/jest-preset.d.ts +4 -0
- package/dist/cjs/config/jest/api/jest-preset.d.ts.map +1 -0
- package/dist/cjs/config/jest/api/jest-preset.js +97 -0
- package/dist/cjs/config/jest/api/jest.setup.d.ts +2 -0
- package/dist/cjs/config/jest/api/jest.setup.d.ts.map +1 -0
- package/dist/cjs/config/jest/api/jest.setup.js +267 -0
- package/dist/cjs/config/jest/babelPlugins/babel-plugin-redwood-cell.d.ts +11 -0
- package/dist/cjs/config/jest/babelPlugins/babel-plugin-redwood-cell.d.ts.map +1 -0
- package/dist/cjs/config/jest/babelPlugins/babel-plugin-redwood-cell.js +121 -0
- package/dist/cjs/config/jest/jest-serial-runner.d.ts +8 -0
- package/dist/cjs/config/jest/jest-serial-runner.d.ts.map +1 -0
- package/dist/cjs/config/jest/jest-serial-runner.js +37 -0
- package/dist/cjs/config/jest/web/RedwoodWebJestEnv.d.ts +6 -0
- package/dist/cjs/config/jest/web/RedwoodWebJestEnv.d.ts.map +1 -0
- package/dist/cjs/config/jest/web/RedwoodWebJestEnv.js +38 -0
- package/dist/cjs/config/jest/web/index.d.ts +3 -0
- package/dist/cjs/config/jest/web/index.d.ts.map +1 -0
- package/dist/cjs/config/jest/web/index.js +25 -0
- package/dist/cjs/config/jest/web/jest-preset.d.ts +4 -0
- package/dist/cjs/config/jest/web/jest-preset.d.ts.map +1 -0
- package/dist/cjs/config/jest/web/jest-preset.js +117 -0
- package/dist/cjs/config/jest/web/jest.setup.d.ts +8 -0
- package/dist/cjs/config/jest/web/jest.setup.d.ts.map +1 -0
- package/dist/cjs/config/jest/web/jest.setup.js +22 -0
- package/dist/cjs/config/jest/web/resolver.d.ts +4 -0
- package/dist/cjs/config/jest/web/resolver.d.ts.map +1 -0
- package/dist/cjs/config/jest/web/resolver.js +30 -0
- package/dist/cjs/config/jest/web/webBabelConfig.d.ts +10 -0
- package/dist/cjs/config/jest/web/webBabelConfig.d.ts.map +1 -0
- package/dist/cjs/config/jest/web/webBabelConfig.js +48 -0
- package/dist/cjs/web/global.d.ts +2 -2
- package/dist/cjs/web/global.d.ts.map +1 -1
- package/dist/config/jest/api/RedwoodApiJestEnv.d.ts +11 -0
- package/dist/config/jest/api/RedwoodApiJestEnv.d.ts.map +1 -0
- package/dist/config/jest/api/RedwoodApiJestEnv.js +28 -0
- package/dist/config/jest/api/apiBabelConfig.d.ts +5 -0
- package/dist/config/jest/api/apiBabelConfig.d.ts.map +1 -0
- package/dist/config/jest/api/apiBabelConfig.js +18 -0
- package/dist/config/jest/api/globalSetup.d.ts +3 -0
- package/dist/config/jest/api/globalSetup.d.ts.map +1 -0
- package/dist/config/jest/api/globalSetup.js +34 -0
- package/dist/config/jest/api/index.d.ts +3 -0
- package/dist/config/jest/api/index.d.ts.map +1 -0
- package/dist/config/jest/api/index.js +11 -0
- package/dist/config/jest/api/jest-preset.d.ts +4 -0
- package/dist/config/jest/api/jest-preset.d.ts.map +1 -0
- package/dist/config/jest/api/jest-preset.js +67 -0
- package/dist/config/jest/api/jest.setup.d.ts +2 -0
- package/dist/config/jest/api/jest.setup.d.ts.map +1 -0
- package/dist/config/jest/api/jest.setup.js +244 -0
- package/dist/config/jest/babelPlugins/babel-plugin-redwood-cell.d.ts +11 -0
- package/dist/config/jest/babelPlugins/babel-plugin-redwood-cell.d.ts.map +1 -0
- package/dist/config/jest/babelPlugins/babel-plugin-redwood-cell.js +101 -0
- package/dist/config/jest/jest-serial-runner.d.ts +8 -0
- package/dist/config/jest/jest-serial-runner.d.ts.map +1 -0
- package/dist/config/jest/jest-serial-runner.js +23 -0
- package/dist/config/jest/web/RedwoodWebJestEnv.d.ts +6 -0
- package/dist/config/jest/web/RedwoodWebJestEnv.d.ts.map +1 -0
- package/dist/config/jest/web/RedwoodWebJestEnv.js +18 -0
- package/dist/config/jest/web/index.d.ts +3 -0
- package/dist/config/jest/web/index.d.ts.map +1 -0
- package/dist/config/jest/web/index.js +11 -0
- package/dist/config/jest/web/jest-preset.d.ts +4 -0
- package/dist/config/jest/web/jest-preset.d.ts.map +1 -0
- package/dist/config/jest/web/jest-preset.js +87 -0
- package/dist/config/jest/web/jest.setup.d.ts +8 -0
- package/dist/config/jest/web/jest.setup.d.ts.map +1 -0
- package/dist/config/jest/web/jest.setup.js +28 -0
- package/dist/config/jest/web/resolver.d.ts +4 -0
- package/dist/config/jest/web/resolver.d.ts.map +1 -0
- package/dist/config/jest/web/resolver.js +38 -0
- package/dist/config/jest/web/webBabelConfig.d.ts +10 -0
- package/dist/config/jest/web/webBabelConfig.d.ts.map +1 -0
- package/dist/config/jest/web/webBabelConfig.js +18 -0
- package/dist/web/global.d.ts +2 -2
- package/dist/web/global.d.ts.map +1 -1
- package/package.json +20 -11
- package/config/jest/babelPlugins/__tests__/__fixtures__/cell/cell-with-commented-exports/code.js +0 -28
- package/config/jest/babelPlugins/__tests__/__fixtures__/cell/cell-with-commented-exports/output.js +0 -35
- package/config/jest/babelPlugins/__tests__/__fixtures__/cell/cell-with-default-and-other-named-export/code.js +0 -7
- package/config/jest/babelPlugins/__tests__/__fixtures__/cell/cell-with-default-and-other-named-export/output.js +0 -6
- package/config/jest/babelPlugins/__tests__/__fixtures__/cell/cell-with-default-export/code.js +0 -3
- package/config/jest/babelPlugins/__tests__/__fixtures__/cell/cell-with-default-export/output.js +0 -3
- package/config/jest/babelPlugins/__tests__/__fixtures__/cell/cell-with-required-exports/code.js +0 -28
- package/config/jest/babelPlugins/__tests__/__fixtures__/cell/cell-with-required-exports/output.js +0 -34
- package/config/jest/babelPlugins/__tests__/__fixtures__/viteDistDir/client-build-manifest.json +0 -59
- package/config/jest/babelPlugins/__tests__/babel-plugin-redwood-cell.test.ts +0 -11
- package/config/jest/package.json +0 -3
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var import_jest_dom = require("@testing-library/jest-dom");
|
|
3
|
+
var import_whatwg_fetch = require("whatwg-fetch");
|
|
4
|
+
var import_findCellMocks = require("../../../web/findCellMocks.js");
|
|
5
|
+
var import_mockRequests = require("../../../web/mockRequests.js");
|
|
6
|
+
global.mockGraphQLQuery = import_mockRequests.mockGraphQLQuery;
|
|
7
|
+
global.mockGraphQLMutation = import_mockRequests.mockGraphQLMutation;
|
|
8
|
+
global.mockCurrentUser = import_mockRequests.mockCurrentUser;
|
|
9
|
+
const cellMocks = (0, import_findCellMocks.findCellMocks)(global.__RWJS_TESTROOT_DIR);
|
|
10
|
+
beforeAll(async () => {
|
|
11
|
+
for (const m of cellMocks) {
|
|
12
|
+
await import(m);
|
|
13
|
+
}
|
|
14
|
+
await (0, import_mockRequests.startMSW)("node");
|
|
15
|
+
(0, import_mockRequests.setupRequestHandlers)();
|
|
16
|
+
});
|
|
17
|
+
afterEach(() => {
|
|
18
|
+
(0, import_mockRequests.setupRequestHandlers)();
|
|
19
|
+
});
|
|
20
|
+
afterAll(() => {
|
|
21
|
+
(0, import_mockRequests.closeServer)();
|
|
22
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../../../../src/config/jest/web/resolver.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAEnD,iBAAS,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,UAYvD;AAMD,SAAS,QAAQ,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function resolver(path, options) {
|
|
3
|
+
return options.defaultResolver(path, {
|
|
4
|
+
...options,
|
|
5
|
+
packageFilter: (pkg) => {
|
|
6
|
+
if (OVERRIDE_EXPORTS_LIST.has(pkg.name)) {
|
|
7
|
+
delete pkg["exports"];
|
|
8
|
+
delete pkg["module"];
|
|
9
|
+
}
|
|
10
|
+
return pkg;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
const OVERRIDE_EXPORTS_LIST = /* @__PURE__ */ new Set([
|
|
15
|
+
"@firebase/analytics",
|
|
16
|
+
"@firebase/app",
|
|
17
|
+
"@firebase/app-check",
|
|
18
|
+
"@firebase/auth",
|
|
19
|
+
"@firebase/database",
|
|
20
|
+
"@firebase/firestore",
|
|
21
|
+
"@firebase/functions",
|
|
22
|
+
"@firebase/installations",
|
|
23
|
+
"@firebase/messaging",
|
|
24
|
+
"@firebase/performance",
|
|
25
|
+
"@firebase/remote-config",
|
|
26
|
+
"@firebase/storage",
|
|
27
|
+
"@firebase/util",
|
|
28
|
+
"firebase"
|
|
29
|
+
]);
|
|
30
|
+
module.exports = resolver;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
overrides: import("@babel/core").TransformOptions[];
|
|
3
|
+
presets: ((string | undefined)[] | (string | object)[])[];
|
|
4
|
+
plugins: import("@babel/core").TransformOptions[];
|
|
5
|
+
extends: string | undefined;
|
|
6
|
+
babelrc: boolean;
|
|
7
|
+
ignore: string[];
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
//# sourceMappingURL=webBabelConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webBabelConfig.d.ts","sourceRoot":"","sources":["../../../../../src/config/jest/web/webBabelConfig.ts"],"names":[],"mappings":";;;;;;;;AAQA,wBASC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
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
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var webBabelConfig_exports = {};
|
|
30
|
+
__export(webBabelConfig_exports, {
|
|
31
|
+
default: () => webBabelConfig_default
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(webBabelConfig_exports);
|
|
34
|
+
var import_babel_config = require("@cedarjs/babel-config");
|
|
35
|
+
var import_babel_plugin_redwood_cell = __toESM(require("../babelPlugins/babel-plugin-redwood-cell.js"), 1);
|
|
36
|
+
const defaultWebSideBabelConfig = (0, import_babel_config.getWebSideDefaultBabelConfig)({
|
|
37
|
+
forJest: true
|
|
38
|
+
});
|
|
39
|
+
var webBabelConfig_default = {
|
|
40
|
+
...defaultWebSideBabelConfig,
|
|
41
|
+
overrides: [
|
|
42
|
+
...defaultWebSideBabelConfig.overrides,
|
|
43
|
+
{
|
|
44
|
+
test: /.+Cell.(js|tsx|jsx)$/,
|
|
45
|
+
plugins: [import_babel_plugin_redwood_cell.default]
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
};
|
package/dist/cjs/web/global.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { mockGraphQLQuery as _mockGraphQLQuery, mockGraphQLMutation as _mockGraphQLMutation } from './mockRequests.js';
|
|
2
2
|
declare global {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
var mockGraphQLQuery: typeof _mockGraphQLQuery;
|
|
4
|
+
var mockGraphQLMutation: typeof _mockGraphQLMutation;
|
|
5
5
|
}
|
|
6
6
|
//# sourceMappingURL=global.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../../src/web/global.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,IAAI,iBAAiB,EACrC,mBAAmB,IAAI,oBAAoB,EAC5C,MAAM,mBAAmB,CAAA;AAE1B,OAAO,CAAC,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../../src/web/global.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,IAAI,iBAAiB,EACrC,mBAAmB,IAAI,oBAAoB,EAC5C,MAAM,mBAAmB,CAAA;AAE1B,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,gBAAgB,EAAE,OAAO,iBAAiB,CAAA;IAE9C,IAAI,mBAAmB,EAAE,OAAO,oBAAoB,CAAA;CAGrD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { EnvironmentContext, JestEnvironmentConfig } from '@jest/environment';
|
|
2
|
+
import { TestEnvironment } from 'jest-environment-node';
|
|
3
|
+
declare class RedwoodApiJestEnvironment extends TestEnvironment {
|
|
4
|
+
private testPath;
|
|
5
|
+
constructor(config: JestEnvironmentConfig, context: EnvironmentContext);
|
|
6
|
+
setup(): Promise<void>;
|
|
7
|
+
teardown(): Promise<void>;
|
|
8
|
+
getVmContext(): import("vm").Context | null;
|
|
9
|
+
}
|
|
10
|
+
export default RedwoodApiJestEnvironment;
|
|
11
|
+
//# sourceMappingURL=RedwoodApiJestEnv.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RedwoodApiJestEnv.d.ts","sourceRoot":"","sources":["../../../../src/config/jest/api/RedwoodApiJestEnv.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEvD,cAAM,yBAA0B,SAAQ,eAAe;IACrD,OAAO,CAAC,QAAQ,CAAQ;gBAEZ,MAAM,EAAE,qBAAqB,EAAE,OAAO,EAAE,kBAAkB;IAKhE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAMtB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAI/B,YAAY;CAUb;AAED,eAAe,yBAAyB,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { TestEnvironment } from "jest-environment-node";
|
|
2
|
+
class RedwoodApiJestEnvironment extends TestEnvironment {
|
|
3
|
+
testPath;
|
|
4
|
+
constructor(config, context) {
|
|
5
|
+
super(config, context);
|
|
6
|
+
this.testPath = context.testPath;
|
|
7
|
+
}
|
|
8
|
+
async setup() {
|
|
9
|
+
await super.setup();
|
|
10
|
+
this.global.testPath = this.testPath;
|
|
11
|
+
}
|
|
12
|
+
async teardown() {
|
|
13
|
+
await super.teardown();
|
|
14
|
+
}
|
|
15
|
+
getVmContext() {
|
|
16
|
+
return super.getVmContext();
|
|
17
|
+
}
|
|
18
|
+
// async handleTestEvent(event, state) {
|
|
19
|
+
// if (event.name === 'test_start') {
|
|
20
|
+
// // Link to event docs:
|
|
21
|
+
// // https://github.com/facebook/jest/blob/master/packages/jest-types/src/Circus.ts
|
|
22
|
+
// }
|
|
23
|
+
// }
|
|
24
|
+
}
|
|
25
|
+
var RedwoodApiJestEnv_default = RedwoodApiJestEnvironment;
|
|
26
|
+
export {
|
|
27
|
+
RedwoodApiJestEnv_default as default
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apiBabelConfig.d.ts","sourceRoot":"","sources":["../../../../src/config/jest/api/apiBabelConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAG7B,MAAM,uBAAuB,CAAA;AAO9B,KAAK,UAAU,GAAG,IAAI,CACpB,UAAU,CAAC,OAAO,4BAA4B,CAAC,EAC/C,SAAS,CACV,CAAA;AAED,QAAA,MAAM,MAAM,EAAE,UAMb,CAAA;AAED,eAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getApiSideDefaultBabelConfig,
|
|
3
|
+
getApiSideBabelPresets,
|
|
4
|
+
getApiSideBabelPlugins
|
|
5
|
+
} from "@cedarjs/babel-config";
|
|
6
|
+
const { babelrc: _b, ...defaultBabelConfig } = getApiSideDefaultBabelConfig();
|
|
7
|
+
const config = {
|
|
8
|
+
...defaultBabelConfig,
|
|
9
|
+
plugins: getApiSideBabelPlugins(),
|
|
10
|
+
presets: getApiSideBabelPresets({
|
|
11
|
+
presetEnv: true
|
|
12
|
+
// jest needs code transpiled
|
|
13
|
+
})
|
|
14
|
+
};
|
|
15
|
+
var apiBabelConfig_default = config;
|
|
16
|
+
export {
|
|
17
|
+
apiBabelConfig_default as default
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globalSetup.d.ts","sourceRoot":"","sources":["../../../../src/config/jest/api/globalSetup.ts"],"names":[],"mappings":"AACA,OAAO,wBAAwB,CAAA;AAY/B,0CAoCC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { getSchema } from "@prisma/internals";
|
|
2
|
+
import "dotenv-defaults/config";
|
|
3
|
+
import execa from "execa";
|
|
4
|
+
import { getPaths } from "@cedarjs/project-config";
|
|
5
|
+
import {
|
|
6
|
+
getDefaultDb,
|
|
7
|
+
checkAndReplaceDirectUrl
|
|
8
|
+
} from "../../../api/directUrlHelpers.js";
|
|
9
|
+
const rwjsPaths = getPaths();
|
|
10
|
+
async function globalSetup_default() {
|
|
11
|
+
if (process.env.SKIP_DB_PUSH === "1") {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
const defaultDb = getDefaultDb(rwjsPaths.base);
|
|
15
|
+
process.env.DATABASE_URL = process.env.TEST_DATABASE_URL || defaultDb;
|
|
16
|
+
const prismaSchema = (await getSchema(rwjsPaths.api.dbSchema)).toString();
|
|
17
|
+
const directUrlEnvVar = checkAndReplaceDirectUrl(prismaSchema, defaultDb);
|
|
18
|
+
const command = process.env.TEST_DATABASE_STRATEGY === "reset" ? ["prisma", "migrate", "reset", "--force", "--skip-seed"] : ["prisma", "db", "push", "--force-reset", "--accept-data-loss"];
|
|
19
|
+
const env = {
|
|
20
|
+
DATABASE_URL: process.env.DATABASE_URL
|
|
21
|
+
};
|
|
22
|
+
if (directUrlEnvVar) {
|
|
23
|
+
env[directUrlEnvVar] = process.env[directUrlEnvVar];
|
|
24
|
+
}
|
|
25
|
+
execa.sync("yarn rw", command, {
|
|
26
|
+
cwd: rwjsPaths.api.base,
|
|
27
|
+
stdio: "inherit",
|
|
28
|
+
shell: true,
|
|
29
|
+
env
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
globalSetup_default as default
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/config/jest/api/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAA;AAK9C,SAAS,UAAU,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
2
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
3
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
4
|
+
};
|
|
5
|
+
import * as jestPreset from "./jest-preset.js";
|
|
6
|
+
var require_api = __commonJS({
|
|
7
|
+
"src/config/jest/api/index.ts"(exports, module) {
|
|
8
|
+
module.exports = jestPreset;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
export default require_api();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jest-preset.d.ts","sourceRoot":"","sources":["../../../../src/config/jest/api/jest-preset.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AASlC,QAAA,MAAM,MAAM,EAAE,MAuDb,CAAA;AAED,eAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { getApiSideDefaultBabelConfig } from "@cedarjs/babel-config";
|
|
3
|
+
import { getPaths } from "@cedarjs/project-config";
|
|
4
|
+
const rwjsPaths = getPaths();
|
|
5
|
+
const NODE_MODULES_PATH = path.join(rwjsPaths.base, "node_modules");
|
|
6
|
+
const { babelrc } = getApiSideDefaultBabelConfig();
|
|
7
|
+
const config = {
|
|
8
|
+
// To make sure other config option which depends on rootDir use
|
|
9
|
+
// correct path, for example, coverageDirectory
|
|
10
|
+
rootDir: rwjsPaths.base,
|
|
11
|
+
roots: [path.join(rwjsPaths.api.src)],
|
|
12
|
+
runner: path.join(__dirname, "../jest-serial-runner.js"),
|
|
13
|
+
testEnvironment: path.join(__dirname, "./RedwoodApiJestEnv.js"),
|
|
14
|
+
globals: {
|
|
15
|
+
__RWJS__TEST_IMPORTS: {
|
|
16
|
+
apiSrcPath: rwjsPaths.api.src,
|
|
17
|
+
tearDownCachePath: path.join(
|
|
18
|
+
rwjsPaths.generated.base,
|
|
19
|
+
"scenarioTeardown.json"
|
|
20
|
+
),
|
|
21
|
+
dbSchemaPath: rwjsPaths.api.dbSchema
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
sandboxInjectedGlobals: ["__RWJS__TEST_IMPORTS"],
|
|
25
|
+
displayName: {
|
|
26
|
+
color: "redBright",
|
|
27
|
+
name: "api"
|
|
28
|
+
},
|
|
29
|
+
collectCoverageFrom: [
|
|
30
|
+
"**/*.{js,jsx,ts,tsx}",
|
|
31
|
+
"!**/node_modules/**",
|
|
32
|
+
"!**/dist/**"
|
|
33
|
+
],
|
|
34
|
+
coverageDirectory: path.join(rwjsPaths.base, "coverage"),
|
|
35
|
+
watchPlugins: [
|
|
36
|
+
"jest-watch-typeahead/filename",
|
|
37
|
+
"jest-watch-typeahead/testname"
|
|
38
|
+
],
|
|
39
|
+
// This runs once before all tests
|
|
40
|
+
globalSetup: path.join(__dirname, "./globalSetup.js"),
|
|
41
|
+
// Note this setup runs for each test file!
|
|
42
|
+
setupFilesAfterEnv: [path.join(__dirname, "./jest.setup.js")],
|
|
43
|
+
moduleNameMapper: {
|
|
44
|
+
// @NOTE: Import @cedarjs/testing in api tests, and it automatically remaps to the api side only
|
|
45
|
+
// This is to prevent web stuff leaking into api, and vice versa
|
|
46
|
+
"^@cedarjs/testing$": path.join(NODE_MODULES_PATH, "@cedarjs/testing/api")
|
|
47
|
+
},
|
|
48
|
+
transform: {
|
|
49
|
+
"\\.[jt]sx?$": [
|
|
50
|
+
"babel-jest",
|
|
51
|
+
// When jest runs tests in parallel, it serializes the config before passing down options to babel
|
|
52
|
+
// that's why these must be serializable. So ideally, we should just pass reference to a
|
|
53
|
+
// configFile or "extends" a config. But we need a few other option only at root level, so we'll pass
|
|
54
|
+
// here and remove those keys inside "extend"ed config.
|
|
55
|
+
{
|
|
56
|
+
babelrc,
|
|
57
|
+
// babelrc can not reside inside "extend"ed config, that's why we have it here
|
|
58
|
+
configFile: path.resolve(__dirname, "./apiBabelConfig.js")
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
testPathIgnorePatterns: [".scenarios.[jt]s$"]
|
|
63
|
+
};
|
|
64
|
+
var jest_preset_default = config;
|
|
65
|
+
export {
|
|
66
|
+
jest_preset_default as default
|
|
67
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jest.setup.d.ts","sourceRoot":"","sources":["../../../../src/config/jest/api/jest.setup.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { defineScenario } from "../../../api/scenario.js";
|
|
4
|
+
const { apiSrcPath, tearDownCachePath, dbSchemaPath } = global.__RWJS__TEST_IMPORTS;
|
|
5
|
+
global.defineScenario = defineScenario;
|
|
6
|
+
const mockContextStore = /* @__PURE__ */ new Map();
|
|
7
|
+
const mockContext = new Proxy(
|
|
8
|
+
{},
|
|
9
|
+
{
|
|
10
|
+
get: (_target, prop) => {
|
|
11
|
+
if (prop === "toJSON") {
|
|
12
|
+
return () => mockContextStore.get("context");
|
|
13
|
+
}
|
|
14
|
+
return mockContextStore.get("context")[prop];
|
|
15
|
+
},
|
|
16
|
+
set: (_target, prop, value) => {
|
|
17
|
+
const ctx = mockContextStore.get("context");
|
|
18
|
+
ctx[prop] = value;
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
global.mockCurrentUser = (currentUser) => {
|
|
24
|
+
mockContextStore.set("context", { currentUser });
|
|
25
|
+
};
|
|
26
|
+
const FOREIGN_KEY_ERRORS = [1451, 1811, 23503];
|
|
27
|
+
const TEARDOWN_CACHE_PATH = tearDownCachePath;
|
|
28
|
+
const DEFAULT_SCENARIO = "standard";
|
|
29
|
+
let teardownOrder = [];
|
|
30
|
+
let originalTeardownOrder = [];
|
|
31
|
+
const deepCopy = (obj) => {
|
|
32
|
+
return JSON.parse(JSON.stringify(obj));
|
|
33
|
+
};
|
|
34
|
+
const isIdenticalArray = (a, b) => {
|
|
35
|
+
return JSON.stringify(a) === JSON.stringify(b);
|
|
36
|
+
};
|
|
37
|
+
const configureTeardown = async () => {
|
|
38
|
+
const { getDMMF, getSchema } = await import("@prisma/internals");
|
|
39
|
+
const datamodel = await getSchema(dbSchemaPath);
|
|
40
|
+
const schema = await getDMMF({ datamodel });
|
|
41
|
+
const schemaModels = schema.datamodel.models.map(
|
|
42
|
+
(m) => m.dbName || m.name
|
|
43
|
+
);
|
|
44
|
+
if (fs.existsSync(TEARDOWN_CACHE_PATH)) {
|
|
45
|
+
teardownOrder = JSON.parse(fs.readFileSync(TEARDOWN_CACHE_PATH).toString());
|
|
46
|
+
}
|
|
47
|
+
if (teardownOrder.length !== schemaModels.length) {
|
|
48
|
+
teardownOrder = schemaModels;
|
|
49
|
+
}
|
|
50
|
+
originalTeardownOrder = deepCopy(teardownOrder);
|
|
51
|
+
};
|
|
52
|
+
let quoteStyle;
|
|
53
|
+
const getQuoteStyle = async () => {
|
|
54
|
+
const { getConfig: getPrismaConfig, getSchema } = await import("@prisma/internals");
|
|
55
|
+
const datamodel = await getSchema(dbSchemaPath);
|
|
56
|
+
if (!quoteStyle) {
|
|
57
|
+
const config = await getPrismaConfig({
|
|
58
|
+
datamodel
|
|
59
|
+
});
|
|
60
|
+
switch (config.datasources?.[0]?.provider) {
|
|
61
|
+
case "mysql":
|
|
62
|
+
quoteStyle = "`";
|
|
63
|
+
break;
|
|
64
|
+
default:
|
|
65
|
+
quoteStyle = '"';
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return quoteStyle;
|
|
69
|
+
};
|
|
70
|
+
const getProjectDb = async () => {
|
|
71
|
+
const { db } = await import(`${apiSrcPath}/lib/db`);
|
|
72
|
+
return db;
|
|
73
|
+
};
|
|
74
|
+
function buildScenario(itFunc, testPath) {
|
|
75
|
+
const scenarioFunc = (...args) => {
|
|
76
|
+
let scenarioName, testName, testFunc;
|
|
77
|
+
if (args.length === 3) {
|
|
78
|
+
;
|
|
79
|
+
[scenarioName, testName, testFunc] = args;
|
|
80
|
+
} else if (args.length === 2) {
|
|
81
|
+
scenarioName = DEFAULT_SCENARIO;
|
|
82
|
+
[testName, testFunc] = args;
|
|
83
|
+
} else {
|
|
84
|
+
throw new Error("scenario() requires 2 or 3 arguments");
|
|
85
|
+
}
|
|
86
|
+
return itFunc(testName, async () => {
|
|
87
|
+
const { scenario } = await loadScenarios(testPath, scenarioName);
|
|
88
|
+
const scenarioData = await seedScenario(scenario);
|
|
89
|
+
try {
|
|
90
|
+
const result = await testFunc(scenarioData);
|
|
91
|
+
return result;
|
|
92
|
+
} finally {
|
|
93
|
+
if (wasDbUsed()) {
|
|
94
|
+
await teardown();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
return Object.assign(scenarioFunc, { only: scenarioFunc });
|
|
100
|
+
}
|
|
101
|
+
function buildDescribeScenario(describeFunc, testPath) {
|
|
102
|
+
const describeScenarioFunc = (...args) => {
|
|
103
|
+
let scenarioName, describeBlockName, describeBlock;
|
|
104
|
+
if (args.length === 3) {
|
|
105
|
+
;
|
|
106
|
+
[scenarioName, describeBlockName, describeBlock] = args;
|
|
107
|
+
} else if (args.length === 2) {
|
|
108
|
+
scenarioName = DEFAULT_SCENARIO;
|
|
109
|
+
[describeBlockName, describeBlock] = args;
|
|
110
|
+
} else {
|
|
111
|
+
throw new Error("describeScenario() requires 2 or 3 arguments");
|
|
112
|
+
}
|
|
113
|
+
return describeFunc(describeBlockName, () => {
|
|
114
|
+
let scenarioData;
|
|
115
|
+
beforeAll(async () => {
|
|
116
|
+
const { scenario } = await loadScenarios(testPath, scenarioName);
|
|
117
|
+
scenarioData = await seedScenario(scenario);
|
|
118
|
+
});
|
|
119
|
+
afterAll(async () => {
|
|
120
|
+
if (wasDbUsed()) {
|
|
121
|
+
await teardown();
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
const getScenario = () => scenarioData;
|
|
125
|
+
describeBlock(getScenario);
|
|
126
|
+
});
|
|
127
|
+
};
|
|
128
|
+
return Object.assign(describeScenarioFunc, { only: describeScenarioFunc });
|
|
129
|
+
}
|
|
130
|
+
const teardown = async () => {
|
|
131
|
+
const quoteStyle2 = await getQuoteStyle();
|
|
132
|
+
for (let i = 0; i < teardownOrder.length; i++) {
|
|
133
|
+
const modelName = teardownOrder[i];
|
|
134
|
+
if (!modelName) {
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
try {
|
|
138
|
+
const db = await getProjectDb();
|
|
139
|
+
await db.$executeRawUnsafe(
|
|
140
|
+
`DELETE FROM ${quoteStyle2}${modelName}${quoteStyle2}`
|
|
141
|
+
);
|
|
142
|
+
} catch (e) {
|
|
143
|
+
const message = isErrorWithMessage(e) ? e.message : "";
|
|
144
|
+
const match = message.match(/Code: `(\d+)`/);
|
|
145
|
+
if (match && FOREIGN_KEY_ERRORS.includes(parseInt(match[1]))) {
|
|
146
|
+
teardownOrder.splice(i, 1);
|
|
147
|
+
teardownOrder.push(modelName);
|
|
148
|
+
i--;
|
|
149
|
+
} else {
|
|
150
|
+
throw e;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
if (!isIdenticalArray(teardownOrder, originalTeardownOrder)) {
|
|
155
|
+
originalTeardownOrder = deepCopy(teardownOrder);
|
|
156
|
+
fs.writeFileSync(TEARDOWN_CACHE_PATH, JSON.stringify(teardownOrder));
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
const seedScenario = async (scenario) => {
|
|
160
|
+
if (scenario) {
|
|
161
|
+
const scenarios = {};
|
|
162
|
+
const db = await getProjectDb();
|
|
163
|
+
for (const [model, namedFixtures] of Object.entries(scenario)) {
|
|
164
|
+
scenarios[model] = {};
|
|
165
|
+
for (const [name, createArgs] of Object.entries(namedFixtures)) {
|
|
166
|
+
if (typeof createArgs === "function") {
|
|
167
|
+
scenarios[model][name] = await db[model].create(createArgs(scenarios));
|
|
168
|
+
} else {
|
|
169
|
+
scenarios[model][name] = await db[model].create(createArgs);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return scenarios;
|
|
174
|
+
} else {
|
|
175
|
+
return {};
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
global.scenario = buildScenario(global.it, global.testPath);
|
|
179
|
+
global.describeScenario = buildDescribeScenario(
|
|
180
|
+
global.describe,
|
|
181
|
+
global.testPath
|
|
182
|
+
);
|
|
183
|
+
const wasDbUsed = () => {
|
|
184
|
+
try {
|
|
185
|
+
const libDbPath = require.resolve(`${apiSrcPath}/lib/db`);
|
|
186
|
+
return Object.keys(require.cache).some((module) => {
|
|
187
|
+
return module === libDbPath;
|
|
188
|
+
});
|
|
189
|
+
} catch {
|
|
190
|
+
return false;
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
jest.mock("@cedarjs/context", () => {
|
|
194
|
+
return {
|
|
195
|
+
context: mockContext,
|
|
196
|
+
setContext: (newContext) => {
|
|
197
|
+
mockContextStore.set("context", newContext);
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
});
|
|
201
|
+
beforeEach(() => {
|
|
202
|
+
mockContextStore.set("context", {});
|
|
203
|
+
});
|
|
204
|
+
beforeAll(async () => {
|
|
205
|
+
if (wasDbUsed()) {
|
|
206
|
+
await configureTeardown();
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
afterAll(async () => {
|
|
210
|
+
if (wasDbUsed()) {
|
|
211
|
+
const db = await getProjectDb();
|
|
212
|
+
db.$disconnect();
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
async function loadScenarios(testPath, scenarioName) {
|
|
216
|
+
const testFileDir = path.parse(testPath);
|
|
217
|
+
const testFileNameParts = testFileDir.name.split(".");
|
|
218
|
+
const testFilePath = `${testFileDir.dir}/${testFileNameParts.slice(0, testFileNameParts.length - 1).join(".")}.scenarios`;
|
|
219
|
+
let allScenarios;
|
|
220
|
+
let scenario;
|
|
221
|
+
try {
|
|
222
|
+
allScenarios = await import(testFilePath);
|
|
223
|
+
} catch (e) {
|
|
224
|
+
if (isErrorWithCode(e) && e.code !== "MODULE_NOT_FOUND") {
|
|
225
|
+
throw new Error(`Failed to load scenario: ${e}`);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
if (allScenarios) {
|
|
229
|
+
if (allScenarios[scenarioName]) {
|
|
230
|
+
scenario = allScenarios[scenarioName];
|
|
231
|
+
} else {
|
|
232
|
+
throw new Error(
|
|
233
|
+
`UndefinedScenario: There is no scenario named "${scenarioName}" in ${testFilePath}.{js,ts}`
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return { scenario };
|
|
238
|
+
}
|
|
239
|
+
function isErrorWithCode(error) {
|
|
240
|
+
return !!error && typeof error === "object" && "code" in error && typeof error.code === "string";
|
|
241
|
+
}
|
|
242
|
+
function isErrorWithMessage(error) {
|
|
243
|
+
return !!error && typeof error === "object" && "message" in error && typeof error.message === "string";
|
|
244
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PluginObj, PluginPass } from '@babel/core';
|
|
2
|
+
import type * as t from '@babel/types';
|
|
3
|
+
interface PluginState extends PluginPass {
|
|
4
|
+
exportNames: string[];
|
|
5
|
+
hasDefaultExport: boolean;
|
|
6
|
+
}
|
|
7
|
+
export default function ({ types, }: {
|
|
8
|
+
types: typeof t;
|
|
9
|
+
}): PluginObj<PluginState>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=babel-plugin-redwood-cell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"babel-plugin-redwood-cell.d.ts","sourceRoot":"","sources":["../../../../src/config/jest/babelPlugins/babel-plugin-redwood-cell.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,KAAK,KAAK,CAAC,MAAM,cAAc,CAAA;AAqCtC,UAAU,WAAY,SAAQ,UAAU;IAKtC,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,gBAAgB,EAAE,OAAO,CAAA;CAC1B;AAED,MAAM,CAAC,OAAO,WAAW,EACvB,KAAK,GACN,EAAE;IACD,KAAK,EAAE,OAAO,CAAC,CAAA;CAChB,GAAG,SAAS,CAAC,WAAW,CAAC,CAkHzB"}
|