@teleporthq/teleport-plugin-next-inline-fetch 0.32.3

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,5 @@
1
+ import { ComponentPlugin, ComponentPluginFactory } from '@teleporthq/teleport-types';
2
+ export declare const createNextInlineFetchPlugin: ComponentPluginFactory<{}>;
3
+ declare const _default: ComponentPlugin;
4
+ export default _default;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EACf,sBAAsB,EAGvB,MAAM,4BAA4B,CAAA;AAgBnC,eAAO,MAAM,2BAA2B,EAAE,sBAAsB,CAAC,EAAE,CAgUlE,CAAA;;AAED,wBAA4C"}
@@ -0,0 +1,272 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
+ return new (P || (P = Promise))(function (resolve, reject) {
28
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
32
+ });
33
+ };
34
+ var __generator = (this && this.__generator) || function (thisArg, body) {
35
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
36
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
37
+ function verb(n) { return function (v) { return step([n, v]); }; }
38
+ function step(op) {
39
+ if (f) throw new TypeError("Generator is already executing.");
40
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
41
+ 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;
42
+ if (y = 0, t) op = [op[0] & 2, t.value];
43
+ switch (op[0]) {
44
+ case 0: case 1: t = op; break;
45
+ case 4: _.label++; return { value: op[1], done: false };
46
+ case 5: _.label++; y = op[1]; op = [0]; continue;
47
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
48
+ default:
49
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
50
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
51
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
52
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
53
+ if (t[2]) _.ops.pop();
54
+ _.trys.pop(); continue;
55
+ }
56
+ op = body.call(thisArg, _);
57
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
58
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
59
+ }
60
+ };
61
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
62
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
63
+ if (ar || !(i in from)) {
64
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
65
+ ar[i] = from[i];
66
+ }
67
+ }
68
+ return to.concat(ar || Array.prototype.slice.call(from));
69
+ };
70
+ Object.defineProperty(exports, "__esModule", { value: true });
71
+ exports.createNextInlineFetchPlugin = void 0;
72
+ var teleport_types_1 = require("@teleporthq/teleport-types");
73
+ var teleport_shared_1 = require("@teleporthq/teleport-shared");
74
+ var types = __importStar(require("@babel/types"));
75
+ var teleport_plugin_common_1 = require("@teleporthq/teleport-plugin-common");
76
+ var utils_1 = require("./utils");
77
+ var path_1 = require("path");
78
+ /*
79
+ When defining a cms-item or cms-list in the UIDL, the user can specify a resource associated with the node.
80
+ Usually, this resource is a local resource, and we decide here either to extract it into getStaticProps or
81
+ directly pass it as a callback to the DataProvider.
82
+ All the top-level API calls which don't have any dynamic references are extracted into getStaticProps,
83
+ and the rest are passed as callbacks to the DataProvider which results in loading them at the client-side
84
+ when the app is deployed..
85
+ */
86
+ var createNextInlineFetchPlugin = function () {
87
+ var nextComponentCMSFetchPlugin = function (structure) { return __awaiter(void 0, void 0, void 0, function () {
88
+ var uidl, chunks, options, dependencies, resources, getStaticPropsChunk, componentChunk;
89
+ return __generator(this, function (_a) {
90
+ uidl = structure.uidl, chunks = structure.chunks, options = structure.options, dependencies = structure.dependencies;
91
+ resources = options.resources;
92
+ if ((resources === null || resources === void 0 ? void 0 : resources.items) === undefined || (resources === null || resources === void 0 ? void 0 : resources.path) === undefined) {
93
+ return [2 /*return*/, structure];
94
+ }
95
+ getStaticPropsChunk = chunks.find(function (chunk) { return chunk.name === 'getStaticProps'; });
96
+ componentChunk = chunks.find(function (chunk) { return chunk.name === 'jsx-component'; });
97
+ if (componentChunk === undefined) {
98
+ return [2 /*return*/, structure];
99
+ }
100
+ teleport_shared_1.UIDLUtils.traverseNodes(uidl.node, function (node) {
101
+ var _a, _b, _c, _d, _e;
102
+ if (node.type !== 'cms-item' && node.type !== 'cms-list') {
103
+ return;
104
+ }
105
+ var jsxNode = componentChunk.meta.nodesLookup[node.content.key];
106
+ if (jsxNode === undefined || jsxNode.type !== 'JSXElement') {
107
+ return;
108
+ }
109
+ /*
110
+ If a node already has a initialData on it. We don't need to do anything.
111
+ As the node is connected with getStaticProps in the page. And the resource is
112
+ defined inside `intialPropsData` in the UIDL for the page.
113
+ */
114
+ if (node.content.initialData !== undefined || node.content.resource === undefined) {
115
+ return;
116
+ }
117
+ var isResourceContainsAnyDynamicValues = Object.values(((_a = node.content.resource) === null || _a === void 0 ? void 0 : _a.params) || {}).some(function (param) { return param.type === 'expr' || param.type === 'dynamic'; });
118
+ /*
119
+ If the node is not using any dynamic stuff as parameters, it can be safely extracted.
120
+ If the node is using purely static values as params, no matter how deep the node is nested.
121
+ If can safely be extracted into server side getStaticProps
122
+ */
123
+ if (isResourceContainsAnyDynamicValues === false) {
124
+ var propKey = teleport_shared_1.StringUtils.createStateOrPropStoringValue(node.content.renderPropIdentifier + 'Prop');
125
+ jsxNode.openingElement.attributes.push(types.jsxAttribute(types.jsxIdentifier('initialData'), types.jsxExpressionContainer(types.memberExpression(types.identifier('props'), types.identifier(propKey)))));
126
+ jsxNode.openingElement.attributes.push(types.jsxAttribute(types.jsxIdentifier('persistDataDuringLoading'), types.jsxExpressionContainer(types.booleanLiteral(true))));
127
+ var resourceName = void 0;
128
+ if ('id' in node.content.resource) {
129
+ var usedResource = resources.items[node.content.resource.id];
130
+ resourceName = teleport_shared_1.StringUtils.dashCaseToCamelCase(teleport_shared_1.StringUtils.camelCaseToDashCase(teleport_shared_1.StringUtils.removeIllegalCharacters(usedResource.name + 'Resource')));
131
+ dependencies[resourceName] = {
132
+ type: 'local',
133
+ path: (0, path_1.relative)(path_1.join.apply(void 0, __spreadArray(__spreadArray([], uidl.outputOptions.folderPath, false), [uidl.outputOptions.fileName], false)), path_1.join.apply(void 0, __spreadArray(__spreadArray([], resources.path, false), [teleport_shared_1.StringUtils.camelCaseToDashCase(usedResource.name)], false))),
134
+ };
135
+ }
136
+ if ('name' in node.content.resource) {
137
+ resourceName = teleport_shared_1.StringUtils.dashCaseToCamelCase(teleport_shared_1.StringUtils.camelCaseToDashCase(teleport_shared_1.StringUtils.removeIllegalCharacters(node.content.resource.name)));
138
+ }
139
+ var extractedResource = types.variableDeclaration('const', [
140
+ types.variableDeclarator(types.identifier(propKey), types.awaitExpression(types.callExpression(types.identifier(resourceName), [
141
+ types.objectExpression(__spreadArray([
142
+ types.spreadElement(types.optionalMemberExpression(types.identifier('context'), types.identifier('params'), false, true))
143
+ ], Object.keys(((_b = node.content.resource) === null || _b === void 0 ? void 0 : _b.params) || {}).reduce(function (acc, item) {
144
+ var prop = node.content.resource.params[item];
145
+ acc.push(types.objectProperty(types.stringLiteral(item), teleport_plugin_common_1.ASTUtils.resolveObjectValue(prop)));
146
+ return acc;
147
+ }, []), true)),
148
+ ]))),
149
+ ]);
150
+ var responseMemberAST = teleport_plugin_common_1.ASTUtils.generateMemberExpressionASTFromPath(__spreadArray([
151
+ propKey
152
+ ], (node.content.valuePath || []), true));
153
+ var notFoundAST = types.ifStatement(types.unaryExpression('!', responseMemberAST), types.blockStatement([
154
+ types.returnStatement(types.objectExpression([
155
+ types.objectProperty(types.identifier('notFound'), types.booleanLiteral(true)),
156
+ ])),
157
+ ]));
158
+ if (getStaticPropsChunk === undefined) {
159
+ var tryBlock = types.tryStatement(types.blockStatement([
160
+ extractedResource,
161
+ notFoundAST,
162
+ types.returnStatement(types.objectExpression([
163
+ types.objectProperty(types.identifier('props'), types.objectExpression([
164
+ types.objectProperty(types.identifier(propKey), responseMemberAST, false, false),
165
+ ])),
166
+ types.objectProperty(types.identifier('revalidate'), types.numericLiteral(60)),
167
+ ])),
168
+ ]), types.catchClause(types.identifier('error'), types.blockStatement([
169
+ types.returnStatement(types.objectExpression([
170
+ types.objectProperty(types.identifier('notFound'), types.booleanLiteral(true)),
171
+ ])),
172
+ ])));
173
+ var staticPropsChunk = types.exportNamedDeclaration(types.functionDeclaration(types.identifier('getStaticProps'), [types.identifier('context')], types.blockStatement([tryBlock]), false, true));
174
+ getStaticPropsChunk = {
175
+ name: 'getStaticProps',
176
+ type: teleport_types_1.ChunkType.AST,
177
+ fileType: teleport_types_1.FileType.JS,
178
+ linkAfter: ['jsx-component'],
179
+ content: staticPropsChunk,
180
+ };
181
+ chunks.push(getStaticPropsChunk);
182
+ }
183
+ else {
184
+ var functionDecleration = getStaticPropsChunk.content
185
+ .declaration;
186
+ var functionBody = functionDecleration.body.body;
187
+ var tryBlock = functionBody.find(function (subNode) { return subNode.type === 'TryStatement'; });
188
+ if (!tryBlock) {
189
+ throw new Error("Try block not found for getStaticProps");
190
+ }
191
+ tryBlock.block.body.unshift(extractedResource, notFoundAST);
192
+ var returnStatement = tryBlock.block.body.find(function (subNode) { return subNode.type === 'ReturnStatement'; });
193
+ if (!returnStatement) {
194
+ throw new Error("Failed to find return statement for getStatisProps");
195
+ }
196
+ var propsObject = returnStatement.argument.properties.find(function (property) {
197
+ return property.key.name === 'props';
198
+ });
199
+ var propsValue = propsObject.value;
200
+ propsValue.properties.unshift(types.objectProperty(types.identifier(propKey), responseMemberAST, false, false));
201
+ }
202
+ }
203
+ else {
204
+ /*
205
+ If a resource is not extracted, it means the data-fetch happens on the client-side.
206
+ which in case, we need to proxy the call using /api/ route in next-js.
207
+ So, the reosurces can take advantage of
208
+ process.env values while accessing the actual functions from the `/resources/` folder.
209
+ */
210
+ var resourceFileName = void 0;
211
+ var resourceImportVariable = void 0;
212
+ var importPath = void 0;
213
+ var isNamedImport = false;
214
+ var funcParams = '';
215
+ if ('id' in node.content.resource) {
216
+ var usedResource = resources.items[node.content.resource.id];
217
+ if (!usedResource) {
218
+ throw new Error("Tried to find a resource that does not exist ".concat(node.content.resource.id));
219
+ }
220
+ if (Object.keys(node.content.resource.params).length > 0 &&
221
+ Object.keys(usedResource.params).length > 0) {
222
+ funcParams = 'req.query';
223
+ }
224
+ resourceImportVariable = teleport_shared_1.StringUtils.dashCaseToCamelCase(teleport_shared_1.StringUtils.camelize("".concat(usedResource.name, "-resource")));
225
+ var importName = teleport_shared_1.StringUtils.camelCaseToDashCase(usedResource.name);
226
+ importPath = (0, path_1.relative)(['pages', 'api'].join('/'), __spreadArray(__spreadArray([], resources.path, true), [importName], false).join('/'));
227
+ resourceFileName = teleport_shared_1.StringUtils.camelCaseToDashCase("".concat(resourceImportVariable, "-").concat(importName));
228
+ (0, utils_1.computeUseEffectAST)({
229
+ fileName: resourceFileName,
230
+ resourceType: usedResource.method,
231
+ node: node,
232
+ componentChunk: componentChunk,
233
+ params: node.content.resource.params,
234
+ });
235
+ }
236
+ if ('name' in node.content.resource) {
237
+ var _f = node.content.resource, name_1 = _f.name, dependency = _f.dependency;
238
+ resourceImportVariable = ((_c = dependency.meta) === null || _c === void 0 ? void 0 : _c.originalName) || name_1;
239
+ importPath = ((_d = dependency === null || dependency === void 0 ? void 0 : dependency.meta) === null || _d === void 0 ? void 0 : _d.importAlias) || dependency.path;
240
+ resourceFileName = teleport_shared_1.StringUtils.camelCaseToDashCase(node.content.resource.name);
241
+ isNamedImport = ((_e = dependency === null || dependency === void 0 ? void 0 : dependency.meta) === null || _e === void 0 ? void 0 : _e.namedImport) || false;
242
+ /*
243
+ When we are calling external functions to make a request call for us.
244
+ The `fetch` that happens behind the scenes are basically encapsulated.
245
+ So, we can't derieve if the resource call is actually a GET / POST.
246
+ So, we can mark these as POST by default since we are taking data from the component.
247
+ */
248
+ funcParams = 'req.body';
249
+ (0, utils_1.computeUseEffectAST)({
250
+ fileName: resourceFileName,
251
+ resourceType: 'POST',
252
+ node: node,
253
+ componentChunk: componentChunk,
254
+ params: node.content.resource.params,
255
+ });
256
+ }
257
+ options.extractedResources[resourceFileName] = {
258
+ fileName: resourceFileName,
259
+ fileType: teleport_types_1.FileType.JS,
260
+ path: ['pages', 'api'],
261
+ content: "import ".concat(isNamedImport ? '{ ' + resourceImportVariable + ' }' : resourceImportVariable, " from '").concat(importPath, "'\nexport default async function handler(req, res) {\n try {\n const response = await ").concat(resourceImportVariable, "(").concat(funcParams, ")\n return res.status(200).json(response)\n } catch (error) {\n return res.status(500).send('Something went wrong')\n }\n}\n "),
262
+ };
263
+ }
264
+ });
265
+ return [2 /*return*/, structure];
266
+ });
267
+ }); };
268
+ return nextComponentCMSFetchPlugin;
269
+ };
270
+ exports.createNextInlineFetchPlugin = createNextInlineFetchPlugin;
271
+ exports.default = (0, exports.create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,CAAC,CAAC,CAAC,sBAAsB,oBACrE,UAAU,uGAGD,sBAAsB,cAAI,UAAU,mJAMtD;qBACF,CAAA;iBACF;YACH,CAAC,CAAC,CAAA;YAEF,sBAAO,SAAS,EAAA;;SACjB,CAAA;IAED,OAAO,2BAA2B,CAAA;AACpC,CAAC,CAAA;AAhUY,QAAA,2BAA2B,+BAgUvC;AAED,kBAAe,IAAA,mCAA2B,GAAE,CAAA"}
@@ -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","../../../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-shared/dist/cjs/constants/index.d.ts","../../../teleport-shared/dist/cjs/utils/string-utils.d.ts","../../../teleport-shared/dist/cjs/utils/uidl-utils.d.ts","../../../teleport-shared/dist/cjs/utils/generic.d.ts","../../../teleport-shared/dist/cjs/index.d.ts","../../../../node_modules/@babel/types/lib/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/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","../../src/utils.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},"b09482535eb7d553ab0507e93616b811a3194a0339292f0e534787e4b01568bb","b5fe48cb150982e2e57b93e5ce0bb59118585808e2840a9184aa99d5b12b0bba","0a4c69d9cbfed2345bc803c308a743dc4e1e9236319a50150d8430462679a5c9","71a689048584cde03cb508408ae7c3b04ad8f10af887865e8b65c27ed9d91488","815ae80d16b38a496813dc5c791e596bc7b109eb5649da9c05b7bc65ed4584df","6ba1631f84ef4507073189c4ada06d6de8bac89375ea3b49e34e49006cc44a3f","afa9397f3aa80897cec3ddec1dd6f7c8741106ce96090f74df790a474b114ed6","8c08668019739abf45bfa24fb3559a4362161c438e71e3925f06bd6ea2792883","22c6f439ba8a0f6347a16d6fad503bb8a2fbfe778e5cf5c90918659c653c8a8c","2c55653d46d0d2bfa1b84b54c3a4ffa6e43de5b05c9f808e46b42adffc4e3e92","1875bde1eafbc9d923cd1624ac1fd6da0af82347c2a9c7a847a660cc4fa01a33","923c136dcbf20f140c369078a7eb56f6697889d104397d694f70e21dd08b1810","ce5106bc15353dd05f601ecb48fd99b152362346cbbb3b398e0d5fdc36d24b0a","7d69ac79c9de7620a1bdd926fd4b20b8e968d6467a220eac2a836988ab47c933","ff590fd234e4b504ab2be8779169f506b388d88c3406277d48b5bf1c49e1265b","7383bcf1e3b4970ec58cddeb24becd4fcd207aa518ca46270a6872b63712c29e","afd0b0fceb1e38d6ba3af077bf8a8ed16934f39508eef510a92f409467f00329","d4f36091f2a7fac55cac2d088d46e68f01cd5cf68e3db5770b3ba62641875e18","5a007f687f1be0ed103375930c7027eb6f10d0b826472f7f6d7a5b260502104e","64e43fe64a91d26169ee2bbc877135375b99ca4c5806b706f63e962528a3eb30","dcaef7f7c1f0cb2dba19a1a70cc8d5276faa68e50bc69d6a006d3aaaaa9f7aa7","5e311ff10bfde2163e21741125d322a756c3869c44cf1f0edd7b9a1e4d7f08f9","ffd67adf9464cf9bcddc3954fcd27d59b60e85acb02101fefe8b0eb642a2be2f","59b8c7576043b12356b13745811130ae5fa9c37cbd7ec5e49ecac8e88b8c9992",{"version":"8b88c4060754eaab0f400ec11b02e8d66a24d4217c429af8bd3f52015a3247ad","signature":"2cd6858bc8330d726ac3f919a56dc7b6d28c157af01ff623edaf3dda519ac373"},{"version":"267b2125980d82bfe0f14f1e17e451bbe312eb60ff01a5b3f445232ad5070eb3","signature":"6c9cbdbd19ec75748474e8214e55497631defe3fcbe0faddc3607d0cd27fdc34"},"3846d0dcf468a1d1a07e6d00eaa37ec542956fb5fe0357590a6407af20d2ff90","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":"49026435d21e3d7559d723af3ae48f73ec28f9cba651b41bd2ac991012836122","affectsGlobalScope":true},"39b1a50d543770780b0409a4caacb87f3ff1d510aedfeb7dc06ed44188256f89",{"version":"b6a4a51bc749ad882c33d98563ff5a94716ca884bfde949a8c97bad530e4ee2c","affectsGlobalScope":true},"16b872cf5432818bdbf405428b4a1d77bb2a7ab908e8bd6609f9a541cea92f81","fe39ceafa361b6d339b518936275eff89a77e7dfe92f2efa5fb97abf9a95ca49",{"version":"4009dd21843fe4a62d1d97b584a2937ca9f045df6fbd65c8b264d8dd04b656fd","affectsGlobalScope":true},"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","5f74757c479da70bc82930f50c6a5cfea4ff9f2979fd965d4ff91de0f6291a22","278fe296432b9840660d6e0d1778b4b4897a591d4b910a5f7ac8db0b476a8af7","1c611ff373ce1958aafc40b328048ac2540ba5c7f373cf2897e0d9aeaabe90a0","bea5c9fc0843a6961411ab4a04df856a8372448bc0d180da0c3a054ff31044b8","715873cecbfcebb49f293f0521bd0955d6298486e2eeb9c7bbf5e9f20a6ed152","c6cf9428f45f3d78b07df7d7aab1569994c177d36549e3a962f952d89f026bc4",{"version":"2c71199d1fc83bf17636ad5bf63a945633406b7b94887612bba4ef027c662b3e","affectsGlobalScope":true},{"version":"6c7b9d2139abd8f2e83ed8fa018c3799ab3187755a6665621feb6e93d3429ac3","affectsGlobalScope":true},"a019c9782ea4e21c83881c780cebce8ad86e3f78122619336eacbd87e47fe674","021ca24be8eb8c46f99b4e03ebf872931f590c9b07b88d715c68bd30495b6c44","5899ab1898582115c432cccef063298f75477bf2cebe5473360043fddd67bcc6","6b97f4106d72ae6b4ebf4e46d2fe90f4d04dd04b3dbff6e294572440a428209d","e3baa0c5780c2c805ec33a999722a2f740b572eb3746fd0a5f93a0a5c3dbf7f6","48fedd2f8549a2ae7e62f30fdb015779c2a7b536760730c5269406cd3d17cab2",{"version":"089867511b37a534ae71f3d9bc97acc0b925b7f5dbec113f98c4b49224c694eb","affectsGlobalScope":true},"c874bfffe38a94b129077eaba4e26575972d545d5d04cd64e90c02d2c029ead6","f5ce35485541e817c2d4105d3eb78e3e538bbb009515ed014694363fa3e94ceb","323506ce173f7f865f42f493885ee3dacd18db6359ea1141d57676d3781ce10c",{"version":"bd88055918cf8bf30ad7c9269177f7ebeafd4c5f0d28919edccd1c1d24f7e73c","affectsGlobalScope":true},{"version":"4ee9304173804c2c6dff4fcb8ad900619a4078b30d37f7e455236836e8e87a45","affectsGlobalScope":true},"ea3ab3727cd6c222d94003ecafa30e8550c61eadcdabbf59514aee76e86211a5","d3cdd41693c5ed6bec4f1a1c399d9501372b14bd341bc46eedacf2854c5df5a7","2de7a21c92226fb8abbeed7a0a9bd8aa6d37e4c68a8c7ff7938c644267e9fcc1","6d6070c5c81ba0bfe58988c69e3ba3149fc86421fd383f253aeb071cbf29cd41","48dab0d6e633b8052e7eaa0efb0bb3d58a733777b248765eafcb0b0349439834","d3e22aaa84d935196f465fff6645f88bb41352736c3130285eea0f2489c5f183","269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","cdaaf046791d7d588f28f32197c5d6acc43343e62540a67eed194c9c20535fdc","4b1ff655bd8edd879dd4f04f15338ce0109f58ccb424165d44fa07e7ea39c4bf",{"version":"6fa61015444e843013443f2e5ca6bee5f033cbf361f953fd932abb0c029b73b2","affectsGlobalScope":true},{"version":"300f8e9de0b0c3482be3e749462b6ebc3dab8a316801f1da0def94aed0cd2018","affectsGlobalScope":true},"4e228e78c1e9b0a75c70588d59288f63a6258e8b1fe4a67b0c53fe03461421d9","24b8c93eb91a64a6fbb877a295cfac4c10aa4660599970c954a99d33697534a3","76a89af04f2ba1807309320dab5169c0d1243b80738b4a2005989e40a136733e","c045b664abf3fc2a4750fa96117ab2735e4ed45ddd571b2a6a91b9917e231a02",{"version":"ca619678b887ae262316673b55bb358c517593d3b6b96c1271972716c699da32","affectsGlobalScope":true},{"version":"0c312a7c5dec6c616f754d3a4b16318ce8d1cb912dfb3dfa0e808f45e66cbb21","affectsGlobalScope":true},"d1ef1d8516286380fd0a6f498f1650d374a8cb5f03d91633b6124e4fb8fb131d","fecdf44bec4ee9c5188e5f2f58c292c9689c02520900dceaaa6e76594de6da90","2641e5e19268b6f5038ad48a6e2598965301df8a77c48c99d8df760a6a154204",{"version":"6a4a80787c57c10b3ea8314c80d9cc6e1deb99d20adca16106a337825f582420","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":[[160,162],[156,157],[156,157,158,159],[161],[163],[69],[105],[106,111,139],[107,118,119,126,136,147],[107,108,118,126],[109,148],[110,111,119,127],[111,136,144],[112,114,118,126],[105,113],[114,115],[118],[116,118],[105,118],[118,119,120,136,147],[118,119,120,133,136,139],[103,152],[114,118,121,126,136,147],[118,119,121,122,126,136,144,147],[121,123,136,144,147],[69,70,104,105,106,107,108,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],[118,124],[125,147,152],[114,118,126,136],[127],[128],[105,129],[130,146,152],[131],[132],[118,133,134],[133,135,148,150],[106,118,136,137,138,139],[106,136,138],[136,137],[139],[140],[105,136],[118,142,143],[142,143],[111,126,136,144],[145],[126,146],[106,121,132,147],[111,148],[136,149],[125,150],[151],[106,111,118,120,129,136,147,150,152],[136,153],[80,84,147],[80,136,147],[75],[77,80,144,147],[126,144],[155],[75,155],[77,80,126,147],[72,73,76,79,106,118,136,147],[72,78],[76,80,106,139,147,155],[106,155],[96,106,155],[74,75,155],[80],[74,75,76,77,78,79,80,81,82,84,85,86,87,88,89,90,91,92,93,94,95,97,98,99,100,101,102],[80,87,88],[78,80,88,89],[79],[72,75,80],[80,84,88,89],[84],[78,80,83,147],[72,77,78,80,84,87],[106,136],[75,80,96,106,152,155],[48,54],[48],[48,54,56],[55,56,57,58,59,60,61,62,63,64,65],[48,62],[48,54,64],[48,53,54,66,67,128],[48,54,66],[49,50,51,52],[44],[44,45,46,47],[43],[43,44]],"referencedMap":[[163,1],[158,2],[160,3],[159,2],[162,4],[164,5],[69,6],[70,6],[105,7],[106,8],[107,9],[108,10],[109,11],[110,12],[111,13],[112,14],[113,15],[114,16],[115,16],[117,17],[116,18],[118,19],[119,20],[120,21],[104,22],[121,23],[122,24],[123,25],[155,26],[124,27],[125,28],[126,29],[127,30],[128,31],[129,32],[130,33],[131,34],[132,35],[133,36],[134,36],[135,37],[136,38],[138,39],[137,40],[139,41],[140,42],[141,43],[142,44],[143,45],[144,46],[145,47],[146,48],[147,49],[148,50],[149,51],[150,52],[151,53],[152,54],[153,55],[87,56],[94,57],[86,56],[101,58],[78,59],[77,60],[100,61],[95,62],[98,63],[80,64],[79,65],[75,66],[74,67],[97,68],[76,69],[81,70],[85,70],[103,71],[102,70],[89,72],[90,73],[92,74],[88,75],[91,76],[96,61],[83,77],[84,78],[93,79],[73,80],[99,81],[55,82],[58,83],[57,84],[66,85],[63,86],[62,83],[65,87],[64,82],[59,84],[61,83],[60,83],[68,88],[67,89],[49,83],[53,90],[51,83],[45,91],[48,92],[44,93],[47,94]],"exportedModulesMap":[[163,1],[158,2],[160,3],[159,2],[162,4],[164,5],[69,6],[70,6],[105,7],[106,8],[107,9],[108,10],[109,11],[110,12],[111,13],[112,14],[113,15],[114,16],[115,16],[117,17],[116,18],[118,19],[119,20],[120,21],[104,22],[121,23],[122,24],[123,25],[155,26],[124,27],[125,28],[126,29],[127,30],[128,31],[129,32],[130,33],[131,34],[132,35],[133,36],[134,36],[135,37],[136,38],[138,39],[137,40],[139,41],[140,42],[141,43],[142,44],[143,45],[144,46],[145,47],[146,48],[147,49],[148,50],[149,51],[150,52],[151,53],[152,54],[153,55],[87,56],[94,57],[86,56],[101,58],[78,59],[77,60],[100,61],[95,62],[98,63],[80,64],[79,65],[75,66],[74,67],[97,68],[76,69],[81,70],[85,70],[103,71],[102,70],[89,72],[90,73],[92,74],[88,75],[91,76],[96,61],[83,77],[84,78],[93,79],[73,80],[99,81],[55,82],[58,83],[57,84],[66,85],[63,86],[62,83],[65,87],[64,82],[59,84],[61,83],[60,83],[68,83],[67,83],[49,83],[53,90],[51,83],[45,91],[48,92],[44,93],[47,94]],"semanticDiagnosticsPerFile":[54,163,156,158,160,159,157,162,161,164,69,70,105,106,107,108,109,110,111,112,113,114,115,117,116,118,119,120,104,154,121,122,123,155,124,125,126,127,128,129,130,131,132,133,134,135,136,138,137,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,71,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,87,94,86,101,78,77,100,95,98,80,79,75,74,97,76,81,82,85,72,103,102,89,90,92,88,91,96,83,84,93,73,99,55,58,57,66,63,62,65,64,59,61,56,60,68,67,49,53,52,50,51,46,45,43,48,44,47]},"version":"4.9.5"}
@@ -0,0 +1,9 @@
1
+ import { UIDLCMSItemNode, UIDLCMSListNode, ChunkDefinition, UIDLResourceLink, UIDLResourceItem } from '@teleporthq/teleport-types';
2
+ export declare const computeUseEffectAST: (params: {
3
+ fileName: string;
4
+ resourceType: UIDLResourceItem['method'];
5
+ node: UIDLCMSItemNode | UIDLCMSListNode;
6
+ componentChunk: ChunkDefinition;
7
+ params: UIDLResourceLink['params'];
8
+ }) => void;
9
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,4BAA4B,CAAA;AAInC,eAAO,MAAM,mBAAmB;cACpB,MAAM;kBACF,gBAAgB,CAAC,QAAQ,CAAC;UAClC,eAAe,GAAG,eAAe;oBACvB,eAAe;YACvB,gBAAgB,CAAC,QAAQ,CAAC;UA6FnC,CAAA"}
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
26
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
27
+ if (ar || !(i in from)) {
28
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
29
+ ar[i] = from[i];
30
+ }
31
+ }
32
+ return to.concat(ar || Array.prototype.slice.call(from));
33
+ };
34
+ Object.defineProperty(exports, "__esModule", { value: true });
35
+ exports.computeUseEffectAST = void 0;
36
+ var types = __importStar(require("@babel/types"));
37
+ var teleport_plugin_common_1 = require("@teleporthq/teleport-plugin-common");
38
+ var computeUseEffectAST = function (params) {
39
+ var node = params.node, fileName = params.fileName, componentChunk = params.componentChunk, resourceType = params.resourceType;
40
+ if (node.type !== 'cms-item' && node.type !== 'cms-list') {
41
+ throw new Error('Invalid node type passed to computeUseEffectAST');
42
+ }
43
+ var _a = node.content, key = _a.key, _b = _a.valuePath, valuePath = _b === void 0 ? [] : _b;
44
+ var jsxNode = componentChunk.meta.nodesLookup[key];
45
+ var resourcePath = types.stringLiteral("/api/".concat(fileName));
46
+ var resourceParameters = [];
47
+ if (resourceType === 'GET' && Object.keys(params).length > 0) {
48
+ resourcePath = types.templateLiteral([
49
+ types.templateElement({ raw: "/api/".concat(fileName, "?"), cooked: "/api/".concat(fileName, "?") }),
50
+ types.templateElement({ raw: '', cooked: '' }),
51
+ ], [types.newExpression(types.identifier('URLSearchParams'), [types.identifier('params')])]);
52
+ }
53
+ if (resourceType === 'POST' && Object.keys(params).length > 0) {
54
+ resourceParameters.push(types.objectProperty(types.identifier('method'), types.stringLiteral('POST')), types.objectProperty(types.identifier('body'), types.callExpression(types.memberExpression(types.identifier('JSON'), types.identifier('stringify')), [types.identifier('params')])));
55
+ }
56
+ var headers = types.objectProperty(types.identifier('headers'), types.objectExpression([
57
+ types.objectProperty(types.stringLiteral('Content-Type'), types.stringLiteral('application/json')),
58
+ ]));
59
+ /*
60
+ For NextJS projects, we wrap the direct CMS calls with a `/api`
61
+ from Next. So, the return type is always going to be `json`. We can safely
62
+ set the return type to `.json()`. Because the actual return type is handled
63
+ in the resource itself. `/api/resource/resource.js`
64
+ */
65
+ var fetchAST = types.callExpression(types.memberExpression(types.callExpression(types.identifier('fetch'), [resourcePath, types.objectExpression(__spreadArray([headers], resourceParameters, true))].filter(Boolean)), types.identifier('then')), [
66
+ types.arrowFunctionExpression([types.identifier('res')], types.callExpression(types.memberExpression(types.identifier('res'), types.identifier('json')), [])),
67
+ ]);
68
+ var responseExpression = teleport_plugin_common_1.ASTUtils.generateMemberExpressionASTFromPath(__spreadArray([
69
+ 'data'
70
+ ], valuePath, true));
71
+ var resourceAST = types.arrowFunctionExpression([types.identifier('params')], valuePath.length >= 0
72
+ ? types.callExpression(types.memberExpression(fetchAST, types.identifier('then'), false), [
73
+ types.arrowFunctionExpression([types.identifier('data')], responseExpression),
74
+ ])
75
+ : fetchAST);
76
+ jsxNode.openingElement.attributes.unshift(types.jSXAttribute(types.jsxIdentifier('fetchData'), types.jsxExpressionContainer(resourceAST)));
77
+ return;
78
+ };
79
+ exports.computeUseEffectAST = computeUseEffectAST;
80
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,kDAAqC;AACrC,6EAA6D;AAEtD,IAAM,mBAAmB,GAAG,UAAC,MAMnC;IACS,IAAA,IAAI,GAA6C,MAAM,KAAnD,EAAE,QAAQ,GAAmC,MAAM,SAAzC,EAAE,cAAc,GAAmB,MAAM,eAAzB,EAAE,YAAY,GAAK,MAAM,aAAX,CAAW;IAC/D,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,EAAE;QACxD,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAA;KACnE;IAEK,IAAA,KAA0B,IAAI,CAAC,OAAO,EAApC,GAAG,SAAA,EAAE,iBAAc,EAAd,SAAS,mBAAG,EAAE,KAAiB,CAAA;IAC5C,IAAM,OAAO,GAAG,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAqB,CAAA;IACxE,IAAI,YAAY,GAAgD,KAAK,CAAC,aAAa,CACjF,eAAQ,QAAQ,CAAE,CACnB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,CAAC,cAAc,CAAC,UAAU,CAAC,OAAO,CACvC,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,sBAAsB,CAAC,WAAW,CAAC,CAAC,CAChG,CAAA;IAED,OAAM;AACR,CAAC,CAAA;AAlGY,QAAA,mBAAmB,uBAkG/B"}
@@ -0,0 +1,5 @@
1
+ import { ComponentPlugin, ComponentPluginFactory } from '@teleporthq/teleport-types';
2
+ export declare const createNextInlineFetchPlugin: ComponentPluginFactory<{}>;
3
+ declare const _default: ComponentPlugin;
4
+ export default _default;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EACf,sBAAsB,EAGvB,MAAM,4BAA4B,CAAA;AAgBnC,eAAO,MAAM,2BAA2B,EAAE,sBAAsB,CAAC,EAAE,CAgUlE,CAAA;;AAED,wBAA4C"}