@teleporthq/teleport-project-plugin-i18n-files 0.37.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 teleporthq
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.
@@ -0,0 +1,16 @@
1
+ import { ProjectPlugin, ProjectPluginStructure, ProjectType, UIDLElementNode } from '@teleporthq/teleport-types';
2
+ import { Resolver } from '@teleporthq/teleport-uidl-resolver';
3
+ export declare class ProjectPlugini18nFiles implements ProjectPlugin {
4
+ projectType: ProjectType;
5
+ resolver: Resolver;
6
+ constructor(params: {
7
+ projectType: ProjectType;
8
+ });
9
+ generateJSX(node: UIDLElementNode): Promise<{
10
+ html: string;
11
+ css?: string;
12
+ }>;
13
+ runBefore(structure: ProjectPluginStructure): Promise<ProjectPluginStructure>;
14
+ runAfter(structure: ProjectPluginStructure): Promise<ProjectPluginStructure>;
15
+ }
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,aAAa,EACb,sBAAsB,EACtB,WAAW,EACX,eAAe,EAChB,MAAM,4BAA4B,CAAA;AAQnC,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAA;AAI7D,qBAAa,sBAAuB,YAAW,aAAa;IAC1D,WAAW,EAAE,WAAW,CAAA;IACxB,QAAQ,EAAE,QAAQ,CAAA;gBAEN,MAAM,EAAE;QAAE,WAAW,EAAE,WAAW,CAAA;KAAE;IAK1C,WAAW,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAmE3E,SAAS,CAAC,SAAS,EAAE,sBAAsB;IAI3C,QAAQ,CAAC,SAAS,EAAE,sBAAsB;CAmDjD"}
@@ -0,0 +1,212 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
14
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
15
+ return new (P || (P = Promise))(function (resolve, reject) {
16
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
17
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
18
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
19
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
20
+ });
21
+ };
22
+ var __generator = (this && this.__generator) || function (thisArg, body) {
23
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
24
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
25
+ function verb(n) { return function (v) { return step([n, v]); }; }
26
+ function step(op) {
27
+ if (f) throw new TypeError("Generator is already executing.");
28
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
29
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
30
+ if (y = 0, t) op = [op[0] & 2, t.value];
31
+ switch (op[0]) {
32
+ case 0: case 1: t = op; break;
33
+ case 4: _.label++; return { value: op[1], done: false };
34
+ case 5: _.label++; y = op[1]; op = [0]; continue;
35
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
36
+ default:
37
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
38
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
39
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
40
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
41
+ if (t[2]) _.ops.pop();
42
+ _.trys.pop(); continue;
43
+ }
44
+ op = body.call(thisArg, _);
45
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
46
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
47
+ }
48
+ };
49
+ Object.defineProperty(exports, "__esModule", { value: true });
50
+ exports.ProjectPlugini18nFiles = void 0;
51
+ var teleport_types_1 = require("@teleporthq/teleport-types");
52
+ var teleport_plugin_common_1 = require("@teleporthq/teleport-plugin-common");
53
+ var generator_1 = require("@babel/generator");
54
+ var teleport_uidl_resolver_1 = require("@teleporthq/teleport-uidl-resolver");
55
+ var teleport_component_generator_react_1 = require("@teleporthq/teleport-component-generator-react");
56
+ var teleport_plugin_css_1 = require("@teleporthq/teleport-plugin-css");
57
+ var ProjectPlugini18nFiles = /** @class */ (function () {
58
+ function ProjectPlugini18nFiles(params) {
59
+ this.projectType = params.projectType;
60
+ this.resolver = new teleport_uidl_resolver_1.Resolver(teleport_component_generator_react_1.ReactMapping);
61
+ }
62
+ ProjectPlugini18nFiles.prototype.generateJSX = function (node) {
63
+ return __awaiter(this, void 0, void 0, function () {
64
+ var proxyUIDL, resolvedUIDL, jsxParams, jsxNodeAst, initialStructure, result, resultJSXChunk, resultCSSChunk, jsx;
65
+ return __generator(this, function (_a) {
66
+ switch (_a.label) {
67
+ case 0:
68
+ proxyUIDL = {
69
+ name: 'locale-node',
70
+ node: node,
71
+ };
72
+ resolvedUIDL = this.resolver.resolveUIDL(proxyUIDL);
73
+ jsxParams = {
74
+ stateDefinitions: {},
75
+ propDefinitions: {},
76
+ windowImports: {},
77
+ dependencies: {},
78
+ nodesLookup: {},
79
+ localeReferences: [],
80
+ globalReferences: [],
81
+ };
82
+ jsxNodeAst = (0, teleport_plugin_common_1.createJSXSyntax)(resolvedUIDL.node, jsxParams, {
83
+ dynamicReferencePrefixMap: {
84
+ prop: 'props',
85
+ state: '',
86
+ local: '',
87
+ },
88
+ dependencyHandling: 'import',
89
+ stateHandling: 'hooks',
90
+ slotHandling: 'props',
91
+ domHTMLInjection: function (content) { return teleport_plugin_common_1.ASTBuilders.createDOMInjectionNode(content); },
92
+ });
93
+ initialStructure = {
94
+ uidl: resolvedUIDL,
95
+ chunks: [
96
+ {
97
+ type: teleport_types_1.ChunkType.AST,
98
+ name: 'jsx-component',
99
+ fileType: teleport_types_1.FileType.JS,
100
+ meta: {
101
+ nodesLookup: jsxParams.nodesLookup,
102
+ dynamicRefPrefix: {},
103
+ },
104
+ content: jsxNodeAst,
105
+ linkAfter: [],
106
+ },
107
+ ],
108
+ dependencies: {},
109
+ options: {},
110
+ };
111
+ return [4 /*yield*/, (0, teleport_plugin_css_1.createCSSPlugin)({
112
+ templateChunkName: 'jsx-component',
113
+ templateStyle: 'jsx',
114
+ })(initialStructure)];
115
+ case 1:
116
+ result = _a.sent();
117
+ resultJSXChunk = result.chunks.find(function (chunk) { return chunk.type === teleport_types_1.ChunkType.AST; });
118
+ resultCSSChunk = result.chunks.find(function (chunk) { return chunk.type === teleport_types_1.ChunkType.STRING && chunk.fileType === teleport_types_1.FileType.CSS; });
119
+ jsx = new generator_1.CodeGenerator(resultJSXChunk.content, {
120
+ jsescOption: { minimal: true },
121
+ }).generate();
122
+ return [2 /*return*/, {
123
+ html: jsx.code,
124
+ css: typeof (resultCSSChunk === null || resultCSSChunk === void 0 ? void 0 : resultCSSChunk.content) === 'string' ? resultCSSChunk === null || resultCSSChunk === void 0 ? void 0 : resultCSSChunk.content : undefined,
125
+ }];
126
+ }
127
+ });
128
+ });
129
+ };
130
+ ProjectPlugini18nFiles.prototype.runBefore = function (structure) {
131
+ return __awaiter(this, void 0, void 0, function () {
132
+ return __generator(this, function (_a) {
133
+ return [2 /*return*/, structure];
134
+ });
135
+ });
136
+ };
137
+ ProjectPlugini18nFiles.prototype.runAfter = function (structure) {
138
+ return __awaiter(this, void 0, void 0, function () {
139
+ var uidl, files, translations, promises, _i, _a, locale, translation, _loop_1, _b, _c, id, result, content, error_1;
140
+ var _this = this;
141
+ return __generator(this, function (_d) {
142
+ switch (_d.label) {
143
+ case 0:
144
+ uidl = structure.uidl, files = structure.files;
145
+ if (uidl.internationalization === undefined) {
146
+ return [2 /*return*/, structure];
147
+ }
148
+ translations = uidl.internationalization.translations;
149
+ promises = [];
150
+ _i = 0, _a = Object.keys(translations);
151
+ _d.label = 1;
152
+ case 1:
153
+ if (!(_i < _a.length)) return [3 /*break*/, 6];
154
+ locale = _a[_i];
155
+ translation = translations[locale];
156
+ _loop_1 = function (id) {
157
+ var item = translation[id];
158
+ if ((item === null || item === void 0 ? void 0 : item.type) === 'element') {
159
+ promises.push(new Promise(function (resolve) {
160
+ _this.generateJSX(item).then(function (_a) {
161
+ var _b;
162
+ var html = _a.html, css = _a.css;
163
+ resolve((_b = {}, _b[id] = css ? "".concat(html, " \n <style>").concat(css, "</style>") : html, _b));
164
+ });
165
+ }));
166
+ }
167
+ if ((item === null || item === void 0 ? void 0 : item.type) === 'static') {
168
+ promises.push(new Promise(function (resolve) {
169
+ var _a;
170
+ return resolve((_a = {}, _a[id] = String(item.content), _a));
171
+ }));
172
+ }
173
+ };
174
+ for (_b = 0, _c = Object.keys(translation); _b < _c.length; _b++) {
175
+ id = _c[_b];
176
+ _loop_1(id);
177
+ }
178
+ _d.label = 2;
179
+ case 2:
180
+ _d.trys.push([2, 4, , 5]);
181
+ return [4 /*yield*/, Promise.all(promises)];
182
+ case 3:
183
+ result = _d.sent();
184
+ content = result.reduce(function (acc, item) { return (__assign(__assign({}, acc), item)); }, {});
185
+ files.set(locale, {
186
+ path: ['locales'],
187
+ files: [
188
+ {
189
+ name: locale,
190
+ content: JSON.stringify(content, null, 2),
191
+ fileType: teleport_types_1.FileType.JSON,
192
+ },
193
+ ],
194
+ });
195
+ return [3 /*break*/, 5];
196
+ case 4:
197
+ error_1 = _d.sent();
198
+ /* tslint:disable no-console */
199
+ console.error('Error generating i18n files', error_1);
200
+ return [3 /*break*/, 5];
201
+ case 5:
202
+ _i++;
203
+ return [3 /*break*/, 1];
204
+ case 6: return [2 /*return*/, structure];
205
+ }
206
+ });
207
+ });
208
+ };
209
+ return ProjectPlugini18nFiles;
210
+ }());
211
+ exports.ProjectPlugini18nFiles = ProjectPlugini18nFiles;
212
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6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AC,EAAxB,cAAwB,EAAxB,IAAwB;4BAA9B,EAAE;oCAAF,EAAE;yBAgBZ;;;;wBAGgB,qBAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAA;;wBAApC,MAAM,GAAG,SAA2B;wBACpC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,UAAC,GAAG,EAAE,IAAI,IAAK,OAAA,uBAAM,GAAG,GAAK,IAAI,EAAG,EAArB,CAAqB,EAAE,EAAE,CAAC,CAAA;wBAEvE,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE;4BAChB,IAAI,EAAE,CAAC,SAAS,CAAC;4BACjB,KAAK,EAAE;gCACL;oCACE,IAAI,EAAE,MAAM;oCACZ,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;oCACzC,QAAQ,EAAE,yBAAQ,CAAC,IAAI;iCACxB;6BACF;yBACF,CAAC,CAAA;;;;wBAEF,+BAA+B;wBAC/B,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,OAAK,CAAC,CAAA;;;wBApClC,IAAyB,CAAA;;4BAwC9C,sBAAO,SAAS,EAAA;;;;KACjB;IACH,6BAAC;AAAD,CAAC,AAnID,IAmIC;AAnIY,wDAAsB"}
@@ -0,0 +1 @@
1
+ {"program":{"fileNames":["../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../../node_modules/typescript/lib/lib.dom.d.ts","../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../teleport-types/dist/cjs/helper.d.ts","../../../teleport-types/dist/cjs/uidl.d.ts","../../../../node_modules/@babel/types/lib/index.d.ts","../../../teleport-types/dist/cjs/generators.d.ts","../../../teleport-types/dist/cjs/errors.d.ts","../../../teleport-types/dist/cjs/vuidl.d.ts","../../../teleport-types/dist/cjs/index.d.ts","../../../teleport-plugin-common/dist/cjs/builders/ast-builders.d.ts","../../../teleport-plugin-common/dist/cjs/utils/parsed-ast.d.ts","../../../teleport-plugin-common/dist/cjs/builders/style-builders.d.ts","../../../teleport-plugin-common/dist/cjs/builders/hast-builders.d.ts","../../../teleport-plugin-common/dist/cjs/utils/types.d.ts","../../../teleport-plugin-common/dist/cjs/utils/ast-utils.d.ts","../../../teleport-plugin-common/dist/cjs/utils/style-utils.d.ts","../../../teleport-plugin-common/dist/cjs/utils/hast-utils.d.ts","../../../teleport-plugin-common/dist/cjs/node-handlers/node-to-html/types.d.ts","../../../teleport-plugin-common/dist/cjs/node-handlers/node-to-html/index.d.ts","../../../teleport-plugin-common/dist/cjs/node-handlers/node-to-jsx/types.d.ts","../../../teleport-plugin-common/dist/cjs/node-handlers/node-to-jsx/index.d.ts","../../../teleport-plugin-common/dist/cjs/index.d.ts","../../../../node_modules/@types/babel__generator/index.d.ts","../../../teleport-uidl-resolver/dist/cjs/resolver.d.ts","../../../teleport-uidl-resolver/dist/cjs/html-mapping.d.ts","../../../teleport-uidl-resolver/dist/cjs/resolvers/style-set-definitions/index.d.ts","../../../teleport-uidl-resolver/dist/cjs/utils.d.ts","../../../teleport-uidl-resolver/dist/cjs/index.d.ts","../../../teleport-component-generator-react/dist/cjs/react-mapping.d.ts","../../../teleport-component-generator-react/dist/cjs/index.d.ts","../../../teleport-plugin-css/dist/cjs/style-sheet.d.ts","../../../teleport-plugin-css/dist/cjs/index.d.ts","../../src/index.ts","../../../../node_modules/@types/node/assert.d.ts","../../../../node_modules/@types/node/assert/strict.d.ts","../../../../node_modules/buffer/index.d.ts","../../../../node_modules/undici-types/header.d.ts","../../../../node_modules/undici-types/readable.d.ts","../../../../node_modules/undici-types/file.d.ts","../../../../node_modules/undici-types/fetch.d.ts","../../../../node_modules/undici-types/formdata.d.ts","../../../../node_modules/undici-types/connector.d.ts","../../../../node_modules/undici-types/client.d.ts","../../../../node_modules/undici-types/errors.d.ts","../../../../node_modules/undici-types/dispatcher.d.ts","../../../../node_modules/undici-types/global-dispatcher.d.ts","../../../../node_modules/undici-types/global-origin.d.ts","../../../../node_modules/undici-types/pool-stats.d.ts","../../../../node_modules/undici-types/pool.d.ts","../../../../node_modules/undici-types/handlers.d.ts","../../../../node_modules/undici-types/balanced-pool.d.ts","../../../../node_modules/undici-types/agent.d.ts","../../../../node_modules/undici-types/mock-interceptor.d.ts","../../../../node_modules/undici-types/mock-agent.d.ts","../../../../node_modules/undici-types/mock-client.d.ts","../../../../node_modules/undici-types/mock-pool.d.ts","../../../../node_modules/undici-types/mock-errors.d.ts","../../../../node_modules/undici-types/proxy-agent.d.ts","../../../../node_modules/undici-types/api.d.ts","../../../../node_modules/undici-types/cookies.d.ts","../../../../node_modules/undici-types/patch.d.ts","../../../../node_modules/undici-types/filereader.d.ts","../../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../../node_modules/undici-types/websocket.d.ts","../../../../node_modules/undici-types/content-type.d.ts","../../../../node_modules/undici-types/cache.d.ts","../../../../node_modules/undici-types/interceptors.d.ts","../../../../node_modules/undici-types/index.d.ts","../../../../node_modules/@types/node/globals.d.ts","../../../../node_modules/@types/node/async_hooks.d.ts","../../../../node_modules/@types/node/buffer.d.ts","../../../../node_modules/@types/node/child_process.d.ts","../../../../node_modules/@types/node/cluster.d.ts","../../../../node_modules/@types/node/console.d.ts","../../../../node_modules/@types/node/constants.d.ts","../../../../node_modules/@types/node/crypto.d.ts","../../../../node_modules/@types/node/dgram.d.ts","../../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../../node_modules/@types/node/dns.d.ts","../../../../node_modules/@types/node/dns/promises.d.ts","../../../../node_modules/@types/node/domain.d.ts","../../../../node_modules/@types/node/dom-events.d.ts","../../../../node_modules/@types/node/events.d.ts","../../../../node_modules/@types/node/fs.d.ts","../../../../node_modules/@types/node/fs/promises.d.ts","../../../../node_modules/@types/node/http.d.ts","../../../../node_modules/@types/node/http2.d.ts","../../../../node_modules/@types/node/https.d.ts","../../../../node_modules/@types/node/inspector.d.ts","../../../../node_modules/@types/node/module.d.ts","../../../../node_modules/@types/node/net.d.ts","../../../../node_modules/@types/node/os.d.ts","../../../../node_modules/@types/node/path.d.ts","../../../../node_modules/@types/node/perf_hooks.d.ts","../../../../node_modules/@types/node/process.d.ts","../../../../node_modules/@types/node/punycode.d.ts","../../../../node_modules/@types/node/querystring.d.ts","../../../../node_modules/@types/node/readline.d.ts","../../../../node_modules/@types/node/readline/promises.d.ts","../../../../node_modules/@types/node/repl.d.ts","../../../../node_modules/@types/node/stream.d.ts","../../../../node_modules/@types/node/stream/promises.d.ts","../../../../node_modules/@types/node/stream/consumers.d.ts","../../../../node_modules/@types/node/stream/web.d.ts","../../../../node_modules/@types/node/string_decoder.d.ts","../../../../node_modules/@types/node/test.d.ts","../../../../node_modules/@types/node/timers.d.ts","../../../../node_modules/@types/node/timers/promises.d.ts","../../../../node_modules/@types/node/tls.d.ts","../../../../node_modules/@types/node/trace_events.d.ts","../../../../node_modules/@types/node/tty.d.ts","../../../../node_modules/@types/node/url.d.ts","../../../../node_modules/@types/node/util.d.ts","../../../../node_modules/@types/node/v8.d.ts","../../../../node_modules/@types/node/vm.d.ts","../../../../node_modules/@types/node/wasi.d.ts","../../../../node_modules/@types/node/worker_threads.d.ts","../../../../node_modules/@types/node/zlib.d.ts","../../../../node_modules/@types/node/globals.global.d.ts","../../../../node_modules/@types/node/index.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/cleanupSemantic.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/types.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/diffLines.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/printDiffs.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/index.d.ts","../../../../node_modules/@types/jest/node_modules/pretty-format/build/types.d.ts","../../../../node_modules/@types/jest/node_modules/pretty-format/build/index.d.ts","../../../../node_modules/@types/jest/index.d.ts","../../../../node_modules/@types/jest/ts3.2/index.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},"14fc7efae8b184b18019a5906c6f6de752823b44ff1acf7924bbdc8877ded21b","5f78f7e29d7e5d56b544c7a48595ba9433e3466ba26643b8973638fed93723d1","55584873eae27c5607725f0a9b2123cdea9100fd47cd4bfd582b567a7c363877","dff2c83d88067791b25fd1c3126a753311ddb954c0ce6dd9c968faef32e84117","71a689048584cde03cb508408ae7c3b04ad8f10af887865e8b65c27ed9d91488","f29399e10ced2ff9ecbe07448806c44dfcb87dcf281cb7ccac3061174c3cae37","6ba1631f84ef4507073189c4ada06d6de8bac89375ea3b49e34e49006cc44a3f","61fe981de167fe34caf4bd80a3c120747844dddb519eaf8a79549d5f78081fb7","7d69ac79c9de7620a1bdd926fd4b20b8e968d6467a220eac2a836988ab47c933","f2ad963e74d849aa62c16f4cae23b7f8f6e26844c0d61f42943086ee7e0cd896","51df45d44f1a2052bd14063736f385bfbdcfee3759fa5597c89f62b3bbdb02e5","10b2bb0a74b12ecbab5003ff91aa8b3da674f81a5d72fdd6f998bfaf664948c8","86abd6ddb4cd3f82a3c167d53a47e2adbca6c92c91ebfe2980ded0d9812e0b18","d4f36091f2a7fac55cac2d088d46e68f01cd5cf68e3db5770b3ba62641875e18","dbabf6441a0629843274eefb8bfce76265c0dfd5c37b0a440d67e5c785ac1abc","48533e135178c91d9abe0789d1c09802696a42985217396ccfcfd1034a099a0e","dcaef7f7c1f0cb2dba19a1a70cc8d5276faa68e50bc69d6a006d3aaaaa9f7aa7","954d24a996cb9a7af6dfb50f99e56cd0abfcc132dc425ea2c43a9d23a3470682","ffd67adf9464cf9bcddc3954fcd27d59b60e85acb02101fefe8b0eb642a2be2f","59b8c7576043b12356b13745811130ae5fa9c37cbd7ec5e49ecac8e88b8c9992","2c8e55457aaf4902941dfdba4061935922e8ee6e120539c9801cd7b400fae050","5c82488594ec942923705b93a1e87bf48064486afd51f8b7697f8bdd87b33e7f","d61ebfdbabb80997daa32b0b8af8e38264f8f4e8a8c1668fc9ade91c607507b1","342bd3b0ed123072c6fd6f5d5fe937e9aa3f553e2b99347334b6c186de0f1757","ce2179d8c5de11f48a75741f4d44f15e3e08fab0b45a616d920ded7a7010325d","f9fd946925b7c2ac04f573e1250274a60c05aa9296e19609f101d5111ed0ca8f","b0916259cd69aaac474c7e4dfbbd709dd77495040017ecb3a17f00712c51791a","30707b1ca9645c595199de2e8a14c20730857923e6707b743886de5e634ab2f8","d9073e5cceff020600ceb1d43e1df68fcaee78d21ab2dd79e19746a68c9064c6","d5dc69e730cae3d85fe6cc9c62202777fdf808601ea1f5cb73d77d8494d1a818",{"version":"e1caa1e48fdafaea5fa4b87c6f28fe4256e7c2dc52ec3e9f4aeccf964d28da0e","signature":"328a90ff608d83cd0e1c374be7e75a1d075bc7d35a33fb42a9a05e0174d20fe6"},"0b4bc32128fda7bb0752cf284730dd3a817aae04a3d7f92e3b2d54bd61362fe1","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","7180c03fd3cb6e22f911ce9ba0f8a7008b1a6ddbe88ccf16a9c8140ef9ac1686","25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","54cb85a47d760da1c13c00add10d26b5118280d44d58e6908d8e89abbd9d7725","3e4825171442666d31c845aeb47fcd34b62e14041bb353ae2b874285d78482aa","c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","a967bfe3ad4e62243eb604bf956101e4c740f5921277c60debaf325c1320bf88","e9775e97ac4877aebf963a0289c81abe76d1ec9a2a7778dbe637e5151f25c5f3","471e1da5a78350bc55ef8cef24eb3aca6174143c281b8b214ca2beda51f5e04a","cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","db3435f3525cd785bf21ec6769bf8da7e8a776be1a99e2e7efb5f244a2ef5fee","c3b170c45fc031db31f782e612adf7314b167e60439d304b49e704010e7bafe5","40383ebef22b943d503c6ce2cb2e060282936b952a01bea5f9f493d5fb487cc7","4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","3a84b7cb891141824bd00ef8a50b6a44596aded4075da937f180c90e362fe5f6","13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","33203609eba548914dc83ddf6cadbc0bcb6e8ef89f6d648ca0908ae887f9fcc5","0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","9f0a92164925aa37d4a5d9dd3e0134cff8177208dba55fd2310cd74beea40ee2","8bfdb79bf1a9d435ec48d9372dc93291161f152c0865b81fc0b2694aedb4578d","2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","d32275be3546f252e3ad33976caf8c5e842c09cb87d468cb40d5f4cf092d1acc","4a0c3504813a3289f7fb1115db13967c8e004aa8e4f8a9021b95285502221bd1",{"version":"5f290ea7efbe9d8431e10df12c0d5672b67988e7c171c2d356749fac70347a55","affectsGlobalScope":true},"39b1a50d543770780b0409a4caacb87f3ff1d510aedfeb7dc06ed44188256f89",{"version":"49c89f8fa09d21c161e6a367448639e032f42d77cc2ec8ab54ecb8fa9a3ad59f","affectsGlobalScope":true},"e4b50850c2a62c7750428e452ee24b167180104d514d5e5c0ca691753365f610","304504c854c47a55ab4a89111a27a2daf8a3614740bd787cc1f2c51e5574239c",{"version":"95f9129a37dcace36e17b061a8484952586ecfe928c9c8ce526de1a2f4aaefa7","affectsGlobalScope":true},"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","0f9061846236850a872cb44097d071631e93c8749a8b16c191fe3c2a48faede4","e46fa644658c2d6e5c85e954ea76b92c97d63f0851d3ccdab8c2a80d5962aaa9","1c611ff373ce1958aafc40b328048ac2540ba5c7f373cf2897e0d9aeaabe90a0","a307d22a0130ac94c1a17fffa6d57ac272deb5838cb966a9420911d259cdf1be","d2e415abf6cb81ac9e2700b4db5ea7be76b997e812285b8e5e1e414eb2750b6e","09d6cebdced6aa1181ac1523c8f22a133f5ed80589678b64051f0602f0518374",{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true},{"version":"7c35691dc3972ff1507d8dd279d833f540973d0917bde22e191cf7a8feaac29f","affectsGlobalScope":true},"62662d7a886e5cfa870685720fd27b763743ca4d2cf29326f75d76606a64eadd","b8c670688bd228d3cc9c169690b09b687188c50ff263a94df63b207701105ad9","d8e16905907111390d5a943816306ae997dfe56476f14142166f8b13ee322eea","8068c911a1c40bc6c5ffc58c625b21d807778f6aa6d63a73e6f04f88bcac5b79","a1dbce56ad5f3a37caafb9033c9d190a199217d673f5fa099c8968d471a2fdaa","c6f77efcc19f51c8759779b6b6ee0d88046c15c15dadac8ffed729a6620daf39",{"version":"089867511b37a534ae71f3d9bc97acc0b925b7f5dbec113f98c4b49224c694eb","affectsGlobalScope":true},"269d0ea3202820c29a32c1f2a357837a4f1918426844f7e7c90af15ec40d1dc1","66432f885e30cf471573de22a5af5eca9ab46b37b122aec98beadf77e9b7df24","323506ce173f7f865f42f493885ee3dacd18db6359ea1141d57676d3781ce10c",{"version":"034e635df3c014df1d6b1110b724ca0c4d2d324b45a84974c7d6931f9cf95ea7","affectsGlobalScope":true},{"version":"87f9456115554cb0f78f098ddbd585096871c19d2d05274c1b1b4ade3151da78","affectsGlobalScope":true},"ea3ab3727cd6c222d94003ecafa30e8550c61eadcdabbf59514aee76e86211a5","d3cdd41693c5ed6bec4f1a1c399d9501372b14bd341bc46eedacf2854c5df5a7","2de7a21c92226fb8abbeed7a0a9bd8aa6d37e4c68a8c7ff7938c644267e9fcc1","6d6070c5c81ba0bfe58988c69e3ba3149fc86421fd383f253aeb071cbf29cd41","da618f0ea09d95c3b51514de43bf97dab008c85bede58aa57cf95e4984c7c957","48a35b181ecf47dbbc0a7ab4b5ba778d91eaa838ba42bf4aaaead42be77ef39a","269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","5195aeb0de306d1c5ca8033457fbcab5987657112fa6d4971cfeb7644493a369","c5dbf0003bc9f0f643e54cd00a3868d1afe85497fecb56be6f2373dc85102924",{"version":"ce73eb199c4bf96c015f069aac161488ed73ebeaea3d87b6d5aa9a968a7b38d4","affectsGlobalScope":true},{"version":"300f8e9de0b0c3482be3e749462b6ebc3dab8a316801f1da0def94aed0cd2018","affectsGlobalScope":true},"4e228e78c1e9b0a75c70588d59288f63a6258e8b1fe4a67b0c53fe03461421d9","962f105729d5b888c8b70e193f6020ee92c6c8144c827de40f80d65dd188ad7f","ac74e2b754fba690036f8221d978f6debb867462b87af254f24e924b677395d0","80858f6de9af22e53aff221fe3590215ea544c2aeb2cc60cf8e08a9c785c8fef",{"version":"068b8ee5c2cd90d7a50f2efadbbe353cb10196a41189a48bf4b2a867363012b4","affectsGlobalScope":true},{"version":"340659b96782f5813aad6c1f89ea1b83b2f3fa993115c7b30366375d9bae5a4e","affectsGlobalScope":true},"6f44a190351ab5e1811abebe007cf60518044772ccc08244f9f241706afa767f","fecdf44bec4ee9c5188e5f2f58c292c9689c02520900dceaaa6e76594de6da90","cf45d0510b661f1da461479851ff902f188edb111777c37055eff12fa986a23a",{"version":"895ca532c15c77cbb6a871af1870b57bcd0ca4f38a1bd69669dd0e95bb58565a","affectsGlobalScope":true},"f2b9440f98d6f94c8105883a2b65aee2fce0248f71f41beafd0a80636f3a565d",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"b510d0a18e3db42ac9765d26711083ec1e8b4e21caaca6dc4d25ae6e8623f447","e222104af6cb9415238ad358488b74d76eceeff238c1268ec6e85655b05341da","69da61a7b5093dac77fa3bec8be95dcf9a74c95a0e9161edb98bb24e30e439d2","eba230221317c985ab1953ccc3edc517f248b37db4fef7875cb2c8d08aff7be7","b83e796810e475da3564c6515bc0ae9577070596a33d89299b7d99f94ecfd921","b4439890c168d646357928431100daac5cbdee1d345a34e6bf6eca9f3abe22bc","5d72971a459517c44c1379dab9ed248e87a61ba0a1e0f25c9d67e1e640cd9a09","02d734976af36f4273d930bea88b3e62adf6b078cf120c1c63d49aa8d8427c5c",{"version":"f624e578325b8c58e55b30c998b1f4c3ec1b61a9fa66373da4250c89b7880d44","affectsGlobalScope":true},{"version":"d3002f620eab4bf6476c9da5c0efb2041d46f7df8b3032a5631bd206abef2c75","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"declarationMap":true,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"module":1,"noImplicitAny":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","sourceMap":true,"target":1},"fileIdsList":[[45],[165,167],[161,162],[161,162,163,164],[166],[168],[74],[110],[111,116,144],[112,123,124,131,141,152],[112,113,123,131],[114,153],[115,116,124,132],[116,141,149],[117,119,123,131],[110,118],[119,120],[123],[121,123],[110,123],[123,124,125,141,152],[123,124,125,138,141,144],[108,157],[119,123,126,131,141,152],[123,124,126,127,131,141,149,152],[126,128,141,149,152],[74,75,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,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,151,152,153,154,155,156,157,158,159],[123,129],[130,152,157],[119,123,131,141],[132],[133],[110,134],[135,151,157],[136],[137],[123,138,139],[138,140,153,155],[111,123,141,142,143,144],[111,141,143],[141,142],[144],[145],[110,141],[123,147,148],[147,148],[116,131,141,149],[150],[131,151],[111,126,137,152],[116,153],[141,154],[130,155],[156],[111,116,123,125,134,141,152,155,157],[141,158],[85,89,152],[85,141,152],[80],[82,85,149,152],[131,149],[160],[80,160],[82,85,131,152],[77,78,81,84,111,123,141,152],[77,83],[81,85,111,144,152,160],[111,160],[101,111,160],[79,80,160],[85],[79,80,81,82,83,84,85,86,87,89,90,91,92,93,94,95,96,97,98,99,100,102,103,104,105,106,107],[85,92,93],[83,85,93,94],[84],[77,80,85],[85,89,93,94],[89],[83,85,88,152],[77,82,83,85,89,92],[111,141],[80,85,101,111,157,160],[49,69],[49],[45,49],[45,49,51],[50,51,52,53,55,56,57,58,59,60,61],[49,58],[45,49,60],[45,49,51,54],[49,71],[45,49,62,63,68,70,72],[44,45],[44,46,47,48],[43],[43,44],[49,64,65,66,67],[49,68]],"referencedMap":[[63,1],[168,2],[163,3],[165,4],[164,3],[167,5],[169,6],[74,7],[75,7],[110,8],[111,9],[112,10],[113,11],[114,12],[115,13],[116,14],[117,15],[118,16],[119,17],[120,17],[122,18],[121,19],[123,20],[124,21],[125,22],[109,23],[126,24],[127,25],[128,26],[160,27],[129,28],[130,29],[131,30],[132,31],[133,32],[134,33],[135,34],[136,35],[137,36],[138,37],[139,37],[140,38],[141,39],[143,40],[142,41],[144,42],[145,43],[146,44],[147,45],[148,46],[149,47],[150,48],[151,49],[152,50],[153,51],[154,52],[155,53],[156,54],[157,55],[158,56],[92,57],[99,58],[91,57],[106,59],[83,60],[82,61],[105,62],[100,63],[103,64],[85,65],[84,66],[80,67],[79,68],[102,69],[81,70],[86,71],[90,71],[108,72],[107,71],[94,73],[95,74],[97,75],[93,76],[96,77],[101,62],[88,78],[89,79],[98,80],[78,81],[104,82],[70,83],[69,84],[50,85],[53,84],[52,86],[62,87],[59,88],[58,84],[61,89],[60,85],[55,90],[57,85],[56,84],[72,91],[71,84],[73,92],[46,93],[49,94],[44,95],[48,96],[65,84],[68,97],[64,84],[66,84],[67,84]],"exportedModulesMap":[[63,1],[168,2],[163,3],[165,4],[164,3],[167,5],[169,6],[74,7],[75,7],[110,8],[111,9],[112,10],[113,11],[114,12],[115,13],[116,14],[117,15],[118,16],[119,17],[120,17],[122,18],[121,19],[123,20],[124,21],[125,22],[109,23],[126,24],[127,25],[128,26],[160,27],[129,28],[130,29],[131,30],[132,31],[133,32],[134,33],[135,34],[136,35],[137,36],[138,37],[139,37],[140,38],[141,39],[143,40],[142,41],[144,42],[145,43],[146,44],[147,45],[148,46],[149,47],[150,48],[151,49],[152,50],[153,51],[154,52],[155,53],[156,54],[157,55],[158,56],[92,57],[99,58],[91,57],[106,59],[83,60],[82,61],[105,62],[100,63],[103,64],[85,65],[84,66],[80,67],[79,68],[102,69],[81,70],[86,71],[90,71],[108,72],[107,71],[94,73],[95,74],[97,75],[93,76],[96,77],[101,62],[88,78],[89,79],[98,80],[78,81],[104,82],[70,83],[69,84],[50,85],[53,84],[52,86],[62,87],[59,88],[58,84],[61,89],[60,85],[55,90],[57,85],[56,84],[72,91],[71,84],[73,98],[46,93],[49,94],[44,95],[48,96],[65,84],[68,97],[64,84],[66,84],[67,84]],"semanticDiagnosticsPerFile":[45,63,168,161,163,165,164,162,167,166,169,74,75,110,111,112,113,114,115,116,117,118,119,120,122,121,123,124,125,109,159,126,127,128,160,129,130,131,132,133,134,135,136,137,138,139,140,141,143,142,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,76,8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,33,30,31,32,34,7,35,40,41,36,37,38,39,1,42,92,99,91,106,83,82,105,100,103,85,84,80,79,102,81,86,87,90,77,108,107,94,95,97,93,96,101,88,89,98,78,104,70,69,50,53,52,62,59,58,61,60,55,57,51,56,54,72,71,73,47,46,43,49,44,48,65,68,64,66,67]},"version":"4.9.5"}
@@ -0,0 +1,16 @@
1
+ import { ProjectPlugin, ProjectPluginStructure, ProjectType, UIDLElementNode } from '@teleporthq/teleport-types';
2
+ import { Resolver } from '@teleporthq/teleport-uidl-resolver';
3
+ export declare class ProjectPlugini18nFiles implements ProjectPlugin {
4
+ projectType: ProjectType;
5
+ resolver: Resolver;
6
+ constructor(params: {
7
+ projectType: ProjectType;
8
+ });
9
+ generateJSX(node: UIDLElementNode): Promise<{
10
+ html: string;
11
+ css?: string;
12
+ }>;
13
+ runBefore(structure: ProjectPluginStructure): Promise<ProjectPluginStructure>;
14
+ runAfter(structure: ProjectPluginStructure): Promise<ProjectPluginStructure>;
15
+ }
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,aAAa,EACb,sBAAsB,EACtB,WAAW,EACX,eAAe,EAChB,MAAM,4BAA4B,CAAA;AAQnC,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAA;AAI7D,qBAAa,sBAAuB,YAAW,aAAa;IAC1D,WAAW,EAAE,WAAW,CAAA;IACxB,QAAQ,EAAE,QAAQ,CAAA;gBAEN,MAAM,EAAE;QAAE,WAAW,EAAE,WAAW,CAAA;KAAE;IAK1C,WAAW,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAmE3E,SAAS,CAAC,SAAS,EAAE,sBAAsB;IAI3C,QAAQ,CAAC,SAAS,EAAE,sBAAsB;CAmDjD"}
@@ -0,0 +1,209 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
+ return new (P || (P = Promise))(function (resolve, reject) {
15
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
19
+ });
20
+ };
21
+ var __generator = (this && this.__generator) || function (thisArg, body) {
22
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
23
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
+ function verb(n) { return function (v) { return step([n, v]); }; }
25
+ function step(op) {
26
+ if (f) throw new TypeError("Generator is already executing.");
27
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
28
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29
+ if (y = 0, t) op = [op[0] & 2, t.value];
30
+ switch (op[0]) {
31
+ case 0: case 1: t = op; break;
32
+ case 4: _.label++; return { value: op[1], done: false };
33
+ case 5: _.label++; y = op[1]; op = [0]; continue;
34
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
+ default:
36
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
+ if (t[2]) _.ops.pop();
41
+ _.trys.pop(); continue;
42
+ }
43
+ op = body.call(thisArg, _);
44
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
+ }
47
+ };
48
+ import { ChunkType, FileType, } from '@teleporthq/teleport-types';
49
+ import { createJSXSyntax, ASTBuilders, } from '@teleporthq/teleport-plugin-common';
50
+ import { CodeGenerator } from '@babel/generator';
51
+ import { Resolver } from '@teleporthq/teleport-uidl-resolver';
52
+ import { ReactMapping } from '@teleporthq/teleport-component-generator-react';
53
+ import { createCSSPlugin } from '@teleporthq/teleport-plugin-css';
54
+ var ProjectPlugini18nFiles = /** @class */ (function () {
55
+ function ProjectPlugini18nFiles(params) {
56
+ this.projectType = params.projectType;
57
+ this.resolver = new Resolver(ReactMapping);
58
+ }
59
+ ProjectPlugini18nFiles.prototype.generateJSX = function (node) {
60
+ return __awaiter(this, void 0, void 0, function () {
61
+ var proxyUIDL, resolvedUIDL, jsxParams, jsxNodeAst, initialStructure, result, resultJSXChunk, resultCSSChunk, jsx;
62
+ return __generator(this, function (_a) {
63
+ switch (_a.label) {
64
+ case 0:
65
+ proxyUIDL = {
66
+ name: 'locale-node',
67
+ node: node,
68
+ };
69
+ resolvedUIDL = this.resolver.resolveUIDL(proxyUIDL);
70
+ jsxParams = {
71
+ stateDefinitions: {},
72
+ propDefinitions: {},
73
+ windowImports: {},
74
+ dependencies: {},
75
+ nodesLookup: {},
76
+ localeReferences: [],
77
+ globalReferences: [],
78
+ };
79
+ jsxNodeAst = createJSXSyntax(resolvedUIDL.node, jsxParams, {
80
+ dynamicReferencePrefixMap: {
81
+ prop: 'props',
82
+ state: '',
83
+ local: '',
84
+ },
85
+ dependencyHandling: 'import',
86
+ stateHandling: 'hooks',
87
+ slotHandling: 'props',
88
+ domHTMLInjection: function (content) { return ASTBuilders.createDOMInjectionNode(content); },
89
+ });
90
+ initialStructure = {
91
+ uidl: resolvedUIDL,
92
+ chunks: [
93
+ {
94
+ type: ChunkType.AST,
95
+ name: 'jsx-component',
96
+ fileType: FileType.JS,
97
+ meta: {
98
+ nodesLookup: jsxParams.nodesLookup,
99
+ dynamicRefPrefix: {},
100
+ },
101
+ content: jsxNodeAst,
102
+ linkAfter: [],
103
+ },
104
+ ],
105
+ dependencies: {},
106
+ options: {},
107
+ };
108
+ return [4 /*yield*/, createCSSPlugin({
109
+ templateChunkName: 'jsx-component',
110
+ templateStyle: 'jsx',
111
+ })(initialStructure)];
112
+ case 1:
113
+ result = _a.sent();
114
+ resultJSXChunk = result.chunks.find(function (chunk) { return chunk.type === ChunkType.AST; });
115
+ resultCSSChunk = result.chunks.find(function (chunk) { return chunk.type === ChunkType.STRING && chunk.fileType === FileType.CSS; });
116
+ jsx = new CodeGenerator(resultJSXChunk.content, {
117
+ jsescOption: { minimal: true },
118
+ }).generate();
119
+ return [2 /*return*/, {
120
+ html: jsx.code,
121
+ css: typeof (resultCSSChunk === null || resultCSSChunk === void 0 ? void 0 : resultCSSChunk.content) === 'string' ? resultCSSChunk === null || resultCSSChunk === void 0 ? void 0 : resultCSSChunk.content : undefined,
122
+ }];
123
+ }
124
+ });
125
+ });
126
+ };
127
+ ProjectPlugini18nFiles.prototype.runBefore = function (structure) {
128
+ return __awaiter(this, void 0, void 0, function () {
129
+ return __generator(this, function (_a) {
130
+ return [2 /*return*/, structure];
131
+ });
132
+ });
133
+ };
134
+ ProjectPlugini18nFiles.prototype.runAfter = function (structure) {
135
+ return __awaiter(this, void 0, void 0, function () {
136
+ var uidl, files, translations, promises, _i, _a, locale, translation, _loop_1, _b, _c, id, result, content, error_1;
137
+ var _this = this;
138
+ return __generator(this, function (_d) {
139
+ switch (_d.label) {
140
+ case 0:
141
+ uidl = structure.uidl, files = structure.files;
142
+ if (uidl.internationalization === undefined) {
143
+ return [2 /*return*/, structure];
144
+ }
145
+ translations = uidl.internationalization.translations;
146
+ promises = [];
147
+ _i = 0, _a = Object.keys(translations);
148
+ _d.label = 1;
149
+ case 1:
150
+ if (!(_i < _a.length)) return [3 /*break*/, 6];
151
+ locale = _a[_i];
152
+ translation = translations[locale];
153
+ _loop_1 = function (id) {
154
+ var item = translation[id];
155
+ if ((item === null || item === void 0 ? void 0 : item.type) === 'element') {
156
+ promises.push(new Promise(function (resolve) {
157
+ _this.generateJSX(item).then(function (_a) {
158
+ var _b;
159
+ var html = _a.html, css = _a.css;
160
+ resolve((_b = {}, _b[id] = css ? "".concat(html, " \n <style>").concat(css, "</style>") : html, _b));
161
+ });
162
+ }));
163
+ }
164
+ if ((item === null || item === void 0 ? void 0 : item.type) === 'static') {
165
+ promises.push(new Promise(function (resolve) {
166
+ var _a;
167
+ return resolve((_a = {}, _a[id] = String(item.content), _a));
168
+ }));
169
+ }
170
+ };
171
+ for (_b = 0, _c = Object.keys(translation); _b < _c.length; _b++) {
172
+ id = _c[_b];
173
+ _loop_1(id);
174
+ }
175
+ _d.label = 2;
176
+ case 2:
177
+ _d.trys.push([2, 4, , 5]);
178
+ return [4 /*yield*/, Promise.all(promises)];
179
+ case 3:
180
+ result = _d.sent();
181
+ content = result.reduce(function (acc, item) { return (__assign(__assign({}, acc), item)); }, {});
182
+ files.set(locale, {
183
+ path: ['locales'],
184
+ files: [
185
+ {
186
+ name: locale,
187
+ content: JSON.stringify(content, null, 2),
188
+ fileType: FileType.JSON,
189
+ },
190
+ ],
191
+ });
192
+ return [3 /*break*/, 5];
193
+ case 4:
194
+ error_1 = _d.sent();
195
+ /* tslint:disable no-console */
196
+ console.error('Error generating i18n files', error_1);
197
+ return [3 /*break*/, 5];
198
+ case 5:
199
+ _i++;
200
+ return [3 /*break*/, 1];
201
+ case 6: return [2 /*return*/, structure];
202
+ }
203
+ });
204
+ });
205
+ };
206
+ return ProjectPlugini18nFiles;
207
+ }());
208
+ export { ProjectPlugini18nFiles };
209
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EACL,SAAS,EAGT,QAAQ,GAKT,MAAM,4BAA4B,CAAA;AACnC,OAAO,EACL,eAAe,EACf,WAAW,GAEZ,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEhD,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAA;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AAEjE;IAIE,gCAAY,MAAoC;QAC9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MAAM,GAAG,SAA2B;wBACpC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,UAAC,GAAG,EAAE,IAAI,IAAK,OAAA,uBAAM,GAAG,GAAK,IAAI,EAAG,EAArB,CAAqB,EAAE,EAAE,CAAC,CAAA;wBAEvE,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE;4BAChB,IAAI,EAAE,CAAC,SAAS,CAAC;4BACjB,KAAK,EAAE;gCACL;oCACE,IAAI,EAAE,MAAM;oCACZ,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;oCACzC,QAAQ,EAAE,QAAQ,CAAC,IAAI;iCACxB;6BACF;yBACF,CAAC,CAAA;;;;wBAEF,+BAA+B;wBAC/B,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,OAAK,CAAC,CAAA;;;wBApClC,IAAyB,CAAA;;4BAwC9C,sBAAO,SAAS,EAAA;;;;KACjB;IACH,6BAAC;AAAD,CAAC,AAnID,IAmIC"}
@@ -0,0 +1 @@
1
+ {"program":{"fileNames":["../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../../node_modules/typescript/lib/lib.dom.d.ts","../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../teleport-types/dist/cjs/helper.d.ts","../../../teleport-types/dist/cjs/uidl.d.ts","../../../../node_modules/@babel/types/lib/index.d.ts","../../../teleport-types/dist/cjs/generators.d.ts","../../../teleport-types/dist/cjs/errors.d.ts","../../../teleport-types/dist/cjs/vuidl.d.ts","../../../teleport-types/dist/cjs/index.d.ts","../../../teleport-plugin-common/dist/cjs/builders/ast-builders.d.ts","../../../teleport-plugin-common/dist/cjs/utils/parsed-ast.d.ts","../../../teleport-plugin-common/dist/cjs/builders/style-builders.d.ts","../../../teleport-plugin-common/dist/cjs/builders/hast-builders.d.ts","../../../teleport-plugin-common/dist/cjs/utils/types.d.ts","../../../teleport-plugin-common/dist/cjs/utils/ast-utils.d.ts","../../../teleport-plugin-common/dist/cjs/utils/style-utils.d.ts","../../../teleport-plugin-common/dist/cjs/utils/hast-utils.d.ts","../../../teleport-plugin-common/dist/cjs/node-handlers/node-to-html/types.d.ts","../../../teleport-plugin-common/dist/cjs/node-handlers/node-to-html/index.d.ts","../../../teleport-plugin-common/dist/cjs/node-handlers/node-to-jsx/types.d.ts","../../../teleport-plugin-common/dist/cjs/node-handlers/node-to-jsx/index.d.ts","../../../teleport-plugin-common/dist/cjs/index.d.ts","../../../../node_modules/@types/babel__generator/index.d.ts","../../../teleport-uidl-resolver/dist/cjs/resolver.d.ts","../../../teleport-uidl-resolver/dist/cjs/html-mapping.d.ts","../../../teleport-uidl-resolver/dist/cjs/resolvers/style-set-definitions/index.d.ts","../../../teleport-uidl-resolver/dist/cjs/utils.d.ts","../../../teleport-uidl-resolver/dist/cjs/index.d.ts","../../../teleport-component-generator-react/dist/cjs/react-mapping.d.ts","../../../teleport-component-generator-react/dist/cjs/index.d.ts","../../../teleport-plugin-css/dist/cjs/style-sheet.d.ts","../../../teleport-plugin-css/dist/cjs/index.d.ts","../../src/index.ts","../../../../node_modules/@types/node/assert.d.ts","../../../../node_modules/@types/node/assert/strict.d.ts","../../../../node_modules/buffer/index.d.ts","../../../../node_modules/undici-types/header.d.ts","../../../../node_modules/undici-types/readable.d.ts","../../../../node_modules/undici-types/file.d.ts","../../../../node_modules/undici-types/fetch.d.ts","../../../../node_modules/undici-types/formdata.d.ts","../../../../node_modules/undici-types/connector.d.ts","../../../../node_modules/undici-types/client.d.ts","../../../../node_modules/undici-types/errors.d.ts","../../../../node_modules/undici-types/dispatcher.d.ts","../../../../node_modules/undici-types/global-dispatcher.d.ts","../../../../node_modules/undici-types/global-origin.d.ts","../../../../node_modules/undici-types/pool-stats.d.ts","../../../../node_modules/undici-types/pool.d.ts","../../../../node_modules/undici-types/handlers.d.ts","../../../../node_modules/undici-types/balanced-pool.d.ts","../../../../node_modules/undici-types/agent.d.ts","../../../../node_modules/undici-types/mock-interceptor.d.ts","../../../../node_modules/undici-types/mock-agent.d.ts","../../../../node_modules/undici-types/mock-client.d.ts","../../../../node_modules/undici-types/mock-pool.d.ts","../../../../node_modules/undici-types/mock-errors.d.ts","../../../../node_modules/undici-types/proxy-agent.d.ts","../../../../node_modules/undici-types/api.d.ts","../../../../node_modules/undici-types/cookies.d.ts","../../../../node_modules/undici-types/patch.d.ts","../../../../node_modules/undici-types/filereader.d.ts","../../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../../node_modules/undici-types/websocket.d.ts","../../../../node_modules/undici-types/content-type.d.ts","../../../../node_modules/undici-types/cache.d.ts","../../../../node_modules/undici-types/interceptors.d.ts","../../../../node_modules/undici-types/index.d.ts","../../../../node_modules/@types/node/globals.d.ts","../../../../node_modules/@types/node/async_hooks.d.ts","../../../../node_modules/@types/node/buffer.d.ts","../../../../node_modules/@types/node/child_process.d.ts","../../../../node_modules/@types/node/cluster.d.ts","../../../../node_modules/@types/node/console.d.ts","../../../../node_modules/@types/node/constants.d.ts","../../../../node_modules/@types/node/crypto.d.ts","../../../../node_modules/@types/node/dgram.d.ts","../../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../../node_modules/@types/node/dns.d.ts","../../../../node_modules/@types/node/dns/promises.d.ts","../../../../node_modules/@types/node/domain.d.ts","../../../../node_modules/@types/node/dom-events.d.ts","../../../../node_modules/@types/node/events.d.ts","../../../../node_modules/@types/node/fs.d.ts","../../../../node_modules/@types/node/fs/promises.d.ts","../../../../node_modules/@types/node/http.d.ts","../../../../node_modules/@types/node/http2.d.ts","../../../../node_modules/@types/node/https.d.ts","../../../../node_modules/@types/node/inspector.d.ts","../../../../node_modules/@types/node/module.d.ts","../../../../node_modules/@types/node/net.d.ts","../../../../node_modules/@types/node/os.d.ts","../../../../node_modules/@types/node/path.d.ts","../../../../node_modules/@types/node/perf_hooks.d.ts","../../../../node_modules/@types/node/process.d.ts","../../../../node_modules/@types/node/punycode.d.ts","../../../../node_modules/@types/node/querystring.d.ts","../../../../node_modules/@types/node/readline.d.ts","../../../../node_modules/@types/node/readline/promises.d.ts","../../../../node_modules/@types/node/repl.d.ts","../../../../node_modules/@types/node/stream.d.ts","../../../../node_modules/@types/node/stream/promises.d.ts","../../../../node_modules/@types/node/stream/consumers.d.ts","../../../../node_modules/@types/node/stream/web.d.ts","../../../../node_modules/@types/node/string_decoder.d.ts","../../../../node_modules/@types/node/test.d.ts","../../../../node_modules/@types/node/timers.d.ts","../../../../node_modules/@types/node/timers/promises.d.ts","../../../../node_modules/@types/node/tls.d.ts","../../../../node_modules/@types/node/trace_events.d.ts","../../../../node_modules/@types/node/tty.d.ts","../../../../node_modules/@types/node/url.d.ts","../../../../node_modules/@types/node/util.d.ts","../../../../node_modules/@types/node/v8.d.ts","../../../../node_modules/@types/node/vm.d.ts","../../../../node_modules/@types/node/wasi.d.ts","../../../../node_modules/@types/node/worker_threads.d.ts","../../../../node_modules/@types/node/zlib.d.ts","../../../../node_modules/@types/node/globals.global.d.ts","../../../../node_modules/@types/node/index.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/cleanupSemantic.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/types.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/diffLines.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/printDiffs.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/index.d.ts","../../../../node_modules/@types/jest/node_modules/pretty-format/build/types.d.ts","../../../../node_modules/@types/jest/node_modules/pretty-format/build/index.d.ts","../../../../node_modules/@types/jest/index.d.ts","../../../../node_modules/@types/jest/ts3.2/index.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},"14fc7efae8b184b18019a5906c6f6de752823b44ff1acf7924bbdc8877ded21b","5f78f7e29d7e5d56b544c7a48595ba9433e3466ba26643b8973638fed93723d1","55584873eae27c5607725f0a9b2123cdea9100fd47cd4bfd582b567a7c363877","dff2c83d88067791b25fd1c3126a753311ddb954c0ce6dd9c968faef32e84117","71a689048584cde03cb508408ae7c3b04ad8f10af887865e8b65c27ed9d91488","f29399e10ced2ff9ecbe07448806c44dfcb87dcf281cb7ccac3061174c3cae37","6ba1631f84ef4507073189c4ada06d6de8bac89375ea3b49e34e49006cc44a3f","61fe981de167fe34caf4bd80a3c120747844dddb519eaf8a79549d5f78081fb7","7d69ac79c9de7620a1bdd926fd4b20b8e968d6467a220eac2a836988ab47c933","f2ad963e74d849aa62c16f4cae23b7f8f6e26844c0d61f42943086ee7e0cd896","51df45d44f1a2052bd14063736f385bfbdcfee3759fa5597c89f62b3bbdb02e5","10b2bb0a74b12ecbab5003ff91aa8b3da674f81a5d72fdd6f998bfaf664948c8","86abd6ddb4cd3f82a3c167d53a47e2adbca6c92c91ebfe2980ded0d9812e0b18","d4f36091f2a7fac55cac2d088d46e68f01cd5cf68e3db5770b3ba62641875e18","dbabf6441a0629843274eefb8bfce76265c0dfd5c37b0a440d67e5c785ac1abc","48533e135178c91d9abe0789d1c09802696a42985217396ccfcfd1034a099a0e","dcaef7f7c1f0cb2dba19a1a70cc8d5276faa68e50bc69d6a006d3aaaaa9f7aa7","954d24a996cb9a7af6dfb50f99e56cd0abfcc132dc425ea2c43a9d23a3470682","ffd67adf9464cf9bcddc3954fcd27d59b60e85acb02101fefe8b0eb642a2be2f","59b8c7576043b12356b13745811130ae5fa9c37cbd7ec5e49ecac8e88b8c9992","2c8e55457aaf4902941dfdba4061935922e8ee6e120539c9801cd7b400fae050","5c82488594ec942923705b93a1e87bf48064486afd51f8b7697f8bdd87b33e7f","d61ebfdbabb80997daa32b0b8af8e38264f8f4e8a8c1668fc9ade91c607507b1","342bd3b0ed123072c6fd6f5d5fe937e9aa3f553e2b99347334b6c186de0f1757","ce2179d8c5de11f48a75741f4d44f15e3e08fab0b45a616d920ded7a7010325d","f9fd946925b7c2ac04f573e1250274a60c05aa9296e19609f101d5111ed0ca8f","b0916259cd69aaac474c7e4dfbbd709dd77495040017ecb3a17f00712c51791a","30707b1ca9645c595199de2e8a14c20730857923e6707b743886de5e634ab2f8","d9073e5cceff020600ceb1d43e1df68fcaee78d21ab2dd79e19746a68c9064c6","d5dc69e730cae3d85fe6cc9c62202777fdf808601ea1f5cb73d77d8494d1a818",{"version":"e1caa1e48fdafaea5fa4b87c6f28fe4256e7c2dc52ec3e9f4aeccf964d28da0e","signature":"328a90ff608d83cd0e1c374be7e75a1d075bc7d35a33fb42a9a05e0174d20fe6"},"0b4bc32128fda7bb0752cf284730dd3a817aae04a3d7f92e3b2d54bd61362fe1","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","7180c03fd3cb6e22f911ce9ba0f8a7008b1a6ddbe88ccf16a9c8140ef9ac1686","25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","54cb85a47d760da1c13c00add10d26b5118280d44d58e6908d8e89abbd9d7725","3e4825171442666d31c845aeb47fcd34b62e14041bb353ae2b874285d78482aa","c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","a967bfe3ad4e62243eb604bf956101e4c740f5921277c60debaf325c1320bf88","e9775e97ac4877aebf963a0289c81abe76d1ec9a2a7778dbe637e5151f25c5f3","471e1da5a78350bc55ef8cef24eb3aca6174143c281b8b214ca2beda51f5e04a","cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","db3435f3525cd785bf21ec6769bf8da7e8a776be1a99e2e7efb5f244a2ef5fee","c3b170c45fc031db31f782e612adf7314b167e60439d304b49e704010e7bafe5","40383ebef22b943d503c6ce2cb2e060282936b952a01bea5f9f493d5fb487cc7","4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","3a84b7cb891141824bd00ef8a50b6a44596aded4075da937f180c90e362fe5f6","13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","33203609eba548914dc83ddf6cadbc0bcb6e8ef89f6d648ca0908ae887f9fcc5","0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","9f0a92164925aa37d4a5d9dd3e0134cff8177208dba55fd2310cd74beea40ee2","8bfdb79bf1a9d435ec48d9372dc93291161f152c0865b81fc0b2694aedb4578d","2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","d32275be3546f252e3ad33976caf8c5e842c09cb87d468cb40d5f4cf092d1acc","4a0c3504813a3289f7fb1115db13967c8e004aa8e4f8a9021b95285502221bd1",{"version":"5f290ea7efbe9d8431e10df12c0d5672b67988e7c171c2d356749fac70347a55","affectsGlobalScope":true},"39b1a50d543770780b0409a4caacb87f3ff1d510aedfeb7dc06ed44188256f89",{"version":"49c89f8fa09d21c161e6a367448639e032f42d77cc2ec8ab54ecb8fa9a3ad59f","affectsGlobalScope":true},"e4b50850c2a62c7750428e452ee24b167180104d514d5e5c0ca691753365f610","304504c854c47a55ab4a89111a27a2daf8a3614740bd787cc1f2c51e5574239c",{"version":"95f9129a37dcace36e17b061a8484952586ecfe928c9c8ce526de1a2f4aaefa7","affectsGlobalScope":true},"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","0f9061846236850a872cb44097d071631e93c8749a8b16c191fe3c2a48faede4","e46fa644658c2d6e5c85e954ea76b92c97d63f0851d3ccdab8c2a80d5962aaa9","1c611ff373ce1958aafc40b328048ac2540ba5c7f373cf2897e0d9aeaabe90a0","a307d22a0130ac94c1a17fffa6d57ac272deb5838cb966a9420911d259cdf1be","d2e415abf6cb81ac9e2700b4db5ea7be76b997e812285b8e5e1e414eb2750b6e","09d6cebdced6aa1181ac1523c8f22a133f5ed80589678b64051f0602f0518374",{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true},{"version":"7c35691dc3972ff1507d8dd279d833f540973d0917bde22e191cf7a8feaac29f","affectsGlobalScope":true},"62662d7a886e5cfa870685720fd27b763743ca4d2cf29326f75d76606a64eadd","b8c670688bd228d3cc9c169690b09b687188c50ff263a94df63b207701105ad9","d8e16905907111390d5a943816306ae997dfe56476f14142166f8b13ee322eea","8068c911a1c40bc6c5ffc58c625b21d807778f6aa6d63a73e6f04f88bcac5b79","a1dbce56ad5f3a37caafb9033c9d190a199217d673f5fa099c8968d471a2fdaa","c6f77efcc19f51c8759779b6b6ee0d88046c15c15dadac8ffed729a6620daf39",{"version":"089867511b37a534ae71f3d9bc97acc0b925b7f5dbec113f98c4b49224c694eb","affectsGlobalScope":true},"269d0ea3202820c29a32c1f2a357837a4f1918426844f7e7c90af15ec40d1dc1","66432f885e30cf471573de22a5af5eca9ab46b37b122aec98beadf77e9b7df24","323506ce173f7f865f42f493885ee3dacd18db6359ea1141d57676d3781ce10c",{"version":"034e635df3c014df1d6b1110b724ca0c4d2d324b45a84974c7d6931f9cf95ea7","affectsGlobalScope":true},{"version":"87f9456115554cb0f78f098ddbd585096871c19d2d05274c1b1b4ade3151da78","affectsGlobalScope":true},"ea3ab3727cd6c222d94003ecafa30e8550c61eadcdabbf59514aee76e86211a5","d3cdd41693c5ed6bec4f1a1c399d9501372b14bd341bc46eedacf2854c5df5a7","2de7a21c92226fb8abbeed7a0a9bd8aa6d37e4c68a8c7ff7938c644267e9fcc1","6d6070c5c81ba0bfe58988c69e3ba3149fc86421fd383f253aeb071cbf29cd41","da618f0ea09d95c3b51514de43bf97dab008c85bede58aa57cf95e4984c7c957","48a35b181ecf47dbbc0a7ab4b5ba778d91eaa838ba42bf4aaaead42be77ef39a","269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","5195aeb0de306d1c5ca8033457fbcab5987657112fa6d4971cfeb7644493a369","c5dbf0003bc9f0f643e54cd00a3868d1afe85497fecb56be6f2373dc85102924",{"version":"ce73eb199c4bf96c015f069aac161488ed73ebeaea3d87b6d5aa9a968a7b38d4","affectsGlobalScope":true},{"version":"300f8e9de0b0c3482be3e749462b6ebc3dab8a316801f1da0def94aed0cd2018","affectsGlobalScope":true},"4e228e78c1e9b0a75c70588d59288f63a6258e8b1fe4a67b0c53fe03461421d9","962f105729d5b888c8b70e193f6020ee92c6c8144c827de40f80d65dd188ad7f","ac74e2b754fba690036f8221d978f6debb867462b87af254f24e924b677395d0","80858f6de9af22e53aff221fe3590215ea544c2aeb2cc60cf8e08a9c785c8fef",{"version":"068b8ee5c2cd90d7a50f2efadbbe353cb10196a41189a48bf4b2a867363012b4","affectsGlobalScope":true},{"version":"340659b96782f5813aad6c1f89ea1b83b2f3fa993115c7b30366375d9bae5a4e","affectsGlobalScope":true},"6f44a190351ab5e1811abebe007cf60518044772ccc08244f9f241706afa767f","fecdf44bec4ee9c5188e5f2f58c292c9689c02520900dceaaa6e76594de6da90","cf45d0510b661f1da461479851ff902f188edb111777c37055eff12fa986a23a",{"version":"895ca532c15c77cbb6a871af1870b57bcd0ca4f38a1bd69669dd0e95bb58565a","affectsGlobalScope":true},"f2b9440f98d6f94c8105883a2b65aee2fce0248f71f41beafd0a80636f3a565d",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"b510d0a18e3db42ac9765d26711083ec1e8b4e21caaca6dc4d25ae6e8623f447","e222104af6cb9415238ad358488b74d76eceeff238c1268ec6e85655b05341da","69da61a7b5093dac77fa3bec8be95dcf9a74c95a0e9161edb98bb24e30e439d2","eba230221317c985ab1953ccc3edc517f248b37db4fef7875cb2c8d08aff7be7","b83e796810e475da3564c6515bc0ae9577070596a33d89299b7d99f94ecfd921","b4439890c168d646357928431100daac5cbdee1d345a34e6bf6eca9f3abe22bc","5d72971a459517c44c1379dab9ed248e87a61ba0a1e0f25c9d67e1e640cd9a09","02d734976af36f4273d930bea88b3e62adf6b078cf120c1c63d49aa8d8427c5c",{"version":"f624e578325b8c58e55b30c998b1f4c3ec1b61a9fa66373da4250c89b7880d44","affectsGlobalScope":true},{"version":"d3002f620eab4bf6476c9da5c0efb2041d46f7df8b3032a5631bd206abef2c75","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"declarationMap":true,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"module":99,"noImplicitAny":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","sourceMap":true,"target":1},"fileIdsList":[[45],[165,167],[161,162],[161,162,163,164],[166],[168],[74],[110],[111,116,144],[112,123,124,131,141,152],[112,113,123,131],[114,153],[115,116,124,132],[116,141,149],[117,119,123,131],[110,118],[119,120],[123],[121,123],[110,123],[123,124,125,141,152],[123,124,125,138,141,144],[108,157],[119,123,126,131,141,152],[123,124,126,127,131,141,149,152],[126,128,141,149,152],[74,75,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,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,151,152,153,154,155,156,157,158,159],[123,129],[130,152,157],[119,123,131,141],[132],[133],[110,134],[135,151,157],[136],[137],[123,138,139],[138,140,153,155],[111,123,141,142,143,144],[111,141,143],[141,142],[144],[145],[110,141],[123,147,148],[147,148],[116,131,141,149],[150],[131,151],[111,126,137,152],[116,153],[141,154],[130,155],[156],[111,116,123,125,134,141,152,155,157],[141,158],[85,89,152],[85,141,152],[80],[82,85,149,152],[131,149],[160],[80,160],[82,85,131,152],[77,78,81,84,111,123,141,152],[77,83],[81,85,111,144,152,160],[111,160],[101,111,160],[79,80,160],[85],[79,80,81,82,83,84,85,86,87,89,90,91,92,93,94,95,96,97,98,99,100,102,103,104,105,106,107],[85,92,93],[83,85,93,94],[84],[77,80,85],[85,89,93,94],[89],[83,85,88,152],[77,82,83,85,89,92],[111,141],[80,85,101,111,157,160],[49,69],[49],[45,49],[45,49,51],[50,51,52,53,55,56,57,58,59,60,61],[49,58],[45,49,60],[45,49,51,54],[49,71],[45,49,62,63,68,70,72],[44,45],[44,46,47,48],[43],[43,44],[49,64,65,66,67],[49,68]],"referencedMap":[[63,1],[168,2],[163,3],[165,4],[164,3],[167,5],[169,6],[74,7],[75,7],[110,8],[111,9],[112,10],[113,11],[114,12],[115,13],[116,14],[117,15],[118,16],[119,17],[120,17],[122,18],[121,19],[123,20],[124,21],[125,22],[109,23],[126,24],[127,25],[128,26],[160,27],[129,28],[130,29],[131,30],[132,31],[133,32],[134,33],[135,34],[136,35],[137,36],[138,37],[139,37],[140,38],[141,39],[143,40],[142,41],[144,42],[145,43],[146,44],[147,45],[148,46],[149,47],[150,48],[151,49],[152,50],[153,51],[154,52],[155,53],[156,54],[157,55],[158,56],[92,57],[99,58],[91,57],[106,59],[83,60],[82,61],[105,62],[100,63],[103,64],[85,65],[84,66],[80,67],[79,68],[102,69],[81,70],[86,71],[90,71],[108,72],[107,71],[94,73],[95,74],[97,75],[93,76],[96,77],[101,62],[88,78],[89,79],[98,80],[78,81],[104,82],[70,83],[69,84],[50,85],[53,84],[52,86],[62,87],[59,88],[58,84],[61,89],[60,85],[55,90],[57,85],[56,84],[72,91],[71,84],[73,92],[46,93],[49,94],[44,95],[48,96],[65,84],[68,97],[64,84],[66,84],[67,84]],"exportedModulesMap":[[63,1],[168,2],[163,3],[165,4],[164,3],[167,5],[169,6],[74,7],[75,7],[110,8],[111,9],[112,10],[113,11],[114,12],[115,13],[116,14],[117,15],[118,16],[119,17],[120,17],[122,18],[121,19],[123,20],[124,21],[125,22],[109,23],[126,24],[127,25],[128,26],[160,27],[129,28],[130,29],[131,30],[132,31],[133,32],[134,33],[135,34],[136,35],[137,36],[138,37],[139,37],[140,38],[141,39],[143,40],[142,41],[144,42],[145,43],[146,44],[147,45],[148,46],[149,47],[150,48],[151,49],[152,50],[153,51],[154,52],[155,53],[156,54],[157,55],[158,56],[92,57],[99,58],[91,57],[106,59],[83,60],[82,61],[105,62],[100,63],[103,64],[85,65],[84,66],[80,67],[79,68],[102,69],[81,70],[86,71],[90,71],[108,72],[107,71],[94,73],[95,74],[97,75],[93,76],[96,77],[101,62],[88,78],[89,79],[98,80],[78,81],[104,82],[70,83],[69,84],[50,85],[53,84],[52,86],[62,87],[59,88],[58,84],[61,89],[60,85],[55,90],[57,85],[56,84],[72,91],[71,84],[73,98],[46,93],[49,94],[44,95],[48,96],[65,84],[68,97],[64,84],[66,84],[67,84]],"semanticDiagnosticsPerFile":[45,63,168,161,163,165,164,162,167,166,169,74,75,110,111,112,113,114,115,116,117,118,119,120,122,121,123,124,125,109,159,126,127,128,160,129,130,131,132,133,134,135,136,137,138,139,140,141,143,142,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,76,8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,33,30,31,32,34,7,35,40,41,36,37,38,39,1,42,92,99,91,106,83,82,105,100,103,85,84,80,79,102,81,86,87,90,77,108,107,94,95,97,93,96,101,88,89,98,78,104,70,69,50,53,52,62,59,58,61,60,55,57,51,56,54,72,71,73,47,46,43,49,44,48,65,68,64,66,67]},"version":"4.9.5"}
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "@teleporthq/teleport-project-plugin-i18n-files",
3
+ "version": "0.37.2",
4
+ "description": "Project generator for a generating i18n files for all frameworks",
5
+ "author": "teleportHQ",
6
+ "license": "MIT",
7
+ "homepage": "https://teleporthq.io/",
8
+ "main": "dist/cjs/index.js",
9
+ "module": "dist/esm/index.js",
10
+ "types": "dist/cjs/index.d.ts",
11
+ "sideEffects": false,
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+ssh://git@github.com/teleporthq/teleport-code-generators.git"
15
+ },
16
+ "bugs": {
17
+ "url": "https://github.com/teleporthq/teleport-code-generators/issues"
18
+ },
19
+ "publishConfig": {
20
+ "access": "public"
21
+ },
22
+ "scripts": {
23
+ "clean": "rimraf dist",
24
+ "build": "tsc -p tsconfig.json && tsc -p tsconfig.json --module commonjs --outDir dist/cjs"
25
+ },
26
+ "dependencies": {
27
+ "@babel/generator": "^7.5.5",
28
+ "@teleporthq/teleport-component-generator-react": "^0.37.2",
29
+ "@teleporthq/teleport-plugin-common": "^0.37.2",
30
+ "@teleporthq/teleport-types": "^0.37.2",
31
+ "@teleporthq/teleport-uidl-resolver": "^0.37.2"
32
+ },
33
+ "gitHead": "bfc4e6229bcd9b3e5ce4077dbf6fd19666935187"
34
+ }
package/src/index.ts ADDED
@@ -0,0 +1,153 @@
1
+ import {
2
+ ChunkType,
3
+ ComponentStructure,
4
+ ComponentUIDL,
5
+ FileType,
6
+ ProjectPlugin,
7
+ ProjectPluginStructure,
8
+ ProjectType,
9
+ UIDLElementNode,
10
+ } from '@teleporthq/teleport-types'
11
+ import {
12
+ createJSXSyntax,
13
+ ASTBuilders,
14
+ JSXGenerationParams,
15
+ } from '@teleporthq/teleport-plugin-common'
16
+ import { CodeGenerator } from '@babel/generator'
17
+ import * as types from '@babel/types'
18
+ import { Resolver } from '@teleporthq/teleport-uidl-resolver'
19
+ import { ReactMapping } from '@teleporthq/teleport-component-generator-react'
20
+ import { createCSSPlugin } from '@teleporthq/teleport-plugin-css'
21
+
22
+ export class ProjectPlugini18nFiles implements ProjectPlugin {
23
+ projectType: ProjectType
24
+ resolver: Resolver
25
+
26
+ constructor(params: { projectType: ProjectType }) {
27
+ this.projectType = params.projectType
28
+ this.resolver = new Resolver(ReactMapping)
29
+ }
30
+
31
+ async generateJSX(node: UIDLElementNode): Promise<{ html: string; css?: string }> {
32
+ const proxyUIDL: ComponentUIDL = {
33
+ name: 'locale-node',
34
+ node,
35
+ }
36
+ const resolvedUIDL = this.resolver.resolveUIDL(proxyUIDL)
37
+
38
+ const jsxParams: JSXGenerationParams = {
39
+ stateDefinitions: {},
40
+ propDefinitions: {},
41
+ windowImports: {},
42
+ dependencies: {},
43
+ nodesLookup: {},
44
+ localeReferences: [],
45
+ globalReferences: [],
46
+ }
47
+
48
+ const jsxNodeAst = createJSXSyntax(resolvedUIDL.node, jsxParams, {
49
+ dynamicReferencePrefixMap: {
50
+ prop: 'props',
51
+ state: '',
52
+ local: '',
53
+ },
54
+ dependencyHandling: 'import',
55
+ stateHandling: 'hooks',
56
+ slotHandling: 'props',
57
+ domHTMLInjection: (content: string) => ASTBuilders.createDOMInjectionNode(content),
58
+ })
59
+
60
+ const initialStructure: ComponentStructure = {
61
+ uidl: resolvedUIDL,
62
+ chunks: [
63
+ {
64
+ type: ChunkType.AST,
65
+ name: 'jsx-component',
66
+ fileType: FileType.JS,
67
+ meta: {
68
+ nodesLookup: jsxParams.nodesLookup,
69
+ dynamicRefPrefix: {},
70
+ },
71
+ content: jsxNodeAst,
72
+ linkAfter: [],
73
+ },
74
+ ],
75
+ dependencies: {},
76
+ options: {},
77
+ }
78
+
79
+ const result = await createCSSPlugin({
80
+ templateChunkName: 'jsx-component',
81
+ templateStyle: 'jsx',
82
+ })(initialStructure)
83
+
84
+ const resultJSXChunk = result.chunks.find((chunk) => chunk.type === ChunkType.AST)
85
+ const resultCSSChunk = result.chunks.find(
86
+ (chunk) => chunk.type === ChunkType.STRING && chunk.fileType === FileType.CSS
87
+ )
88
+ const jsx = new CodeGenerator(resultJSXChunk.content as types.JSXElement, {
89
+ jsescOption: { minimal: true },
90
+ }).generate()
91
+
92
+ return {
93
+ html: jsx.code,
94
+ css: typeof resultCSSChunk?.content === 'string' ? resultCSSChunk?.content : undefined,
95
+ }
96
+ }
97
+
98
+ async runBefore(structure: ProjectPluginStructure) {
99
+ return structure
100
+ }
101
+
102
+ async runAfter(structure: ProjectPluginStructure) {
103
+ const { uidl, files } = structure
104
+ if (uidl.internationalization === undefined) {
105
+ return structure
106
+ }
107
+
108
+ const { translations } = uidl.internationalization
109
+ const promises: Array<Promise<Record<string, string>>> = []
110
+
111
+ for (const locale of Object.keys(translations)) {
112
+ const translation = translations[locale]
113
+ for (const id of Object.keys(translation)) {
114
+ const item = translation[id]
115
+
116
+ if (item?.type === 'element') {
117
+ promises.push(
118
+ new Promise((resolve) => {
119
+ this.generateJSX(item).then(({ html, css }) => {
120
+ resolve({ [id]: css ? `${html} \n <style>${css}</style>` : html })
121
+ })
122
+ })
123
+ )
124
+ }
125
+
126
+ if (item?.type === 'static') {
127
+ promises.push(new Promise((resolve) => resolve({ [id]: String(item.content) })))
128
+ }
129
+ }
130
+
131
+ try {
132
+ const result = await Promise.all(promises)
133
+ const content = result.reduce((acc, item) => ({ ...acc, ...item }), {})
134
+
135
+ files.set(locale, {
136
+ path: ['locales'],
137
+ files: [
138
+ {
139
+ name: locale,
140
+ content: JSON.stringify(content, null, 2),
141
+ fileType: FileType.JSON,
142
+ },
143
+ ],
144
+ })
145
+ } catch (error) {
146
+ /* tslint:disable no-console */
147
+ console.error('Error generating i18n files', error)
148
+ }
149
+ }
150
+
151
+ return structure
152
+ }
153
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "../../tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "dist/esm"
5
+ },
6
+ "include": [
7
+ "./src"
8
+ ]
9
+ }