@teleporthq/teleport-plugin-next-static-paths 0.27.3-alpha.2 → 0.27.3-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +45 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/cjs/utils.d.ts +2 -2
- package/dist/cjs/utils.d.ts.map +1 -1
- package/dist/cjs/utils.js +27 -9
- package/dist/cjs/utils.js.map +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +23 -7
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/utils.d.ts +2 -2
- package/dist/esm/utils.d.ts.map +1 -1
- package/dist/esm/utils.js +27 -9
- package/dist/esm/utils.js.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +35 -3
- package/src/utils.ts +49 -10
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EACf,sBAAsB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EACf,sBAAsB,EAGvB,MAAM,4BAA4B,CAAA;AAKnC,UAAU,uBAAuB;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED,eAAO,MAAM,uBAAuB,EAAE,sBAAsB,CAAC,uBAAuB,CA+DnF,CAAA;;AAED,wBAAwC"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,4 +1,27 @@
|
|
|
1
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
|
+
};
|
|
2
25
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
26
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
27
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -38,22 +61,38 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
38
61
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
62
|
exports.createStaticPathsPlugin = void 0;
|
|
40
63
|
var teleport_types_1 = require("@teleporthq/teleport-types");
|
|
64
|
+
var types = __importStar(require("@babel/types"));
|
|
65
|
+
var teleport_shared_1 = require("@teleporthq/teleport-shared");
|
|
41
66
|
var utils_1 = require("./utils");
|
|
42
67
|
var createStaticPathsPlugin = function (config) {
|
|
43
68
|
var _a = (config || {}).componentChunkName, componentChunkName = _a === void 0 ? 'jsx-component' : _a;
|
|
44
69
|
var staticPathsPlugin = function (structure) { return __awaiter(void 0, void 0, void 0, function () {
|
|
45
|
-
var uidl, chunks, componentChunk, getStaticPathsAST;
|
|
46
|
-
var _a;
|
|
47
|
-
return __generator(this, function (
|
|
48
|
-
uidl = structure.uidl, chunks = structure.chunks;
|
|
49
|
-
|
|
70
|
+
var uidl, chunks, options, resources, resource, usedResource, resourceImportName, componentChunk, getStaticPathsAST;
|
|
71
|
+
var _a, _b;
|
|
72
|
+
return __generator(this, function (_c) {
|
|
73
|
+
uidl = structure.uidl, chunks = structure.chunks, options = structure.options;
|
|
74
|
+
resources = options.resources;
|
|
75
|
+
if (!((_a = uidl.outputOptions) === null || _a === void 0 ? void 0 : _a.initialPathsData) || !(resources === null || resources === void 0 ? void 0 : resources.items)) {
|
|
50
76
|
return [2 /*return*/, structure];
|
|
51
77
|
}
|
|
78
|
+
resource = ((_b = uidl === null || uidl === void 0 ? void 0 : uidl.outputOptions) === null || _b === void 0 ? void 0 : _b.initialPathsData).resource;
|
|
79
|
+
usedResource = resources.items[resource.id];
|
|
80
|
+
if (!usedResource) {
|
|
81
|
+
throw new teleport_types_1.TeleportError("Resource ".concat(resource.id, " is being used, but missing from the project ressources"));
|
|
82
|
+
}
|
|
83
|
+
resourceImportName = teleport_shared_1.StringUtils.dashCaseToCamelCase(teleport_shared_1.StringUtils.camelCaseToDashCase("".concat(usedResource.name, "-reource")));
|
|
52
84
|
componentChunk = chunks.find(function (chunk) { return chunk.name === componentChunkName; });
|
|
53
85
|
if (!componentChunk) {
|
|
54
86
|
return [2 /*return*/, structure];
|
|
55
87
|
}
|
|
56
|
-
getStaticPathsAST = (0, utils_1.generateInitialPathsAST)(uidl.outputOptions.initialPathsData,
|
|
88
|
+
getStaticPathsAST = (0, utils_1.generateInitialPathsAST)(uidl.outputOptions.initialPathsData, resourceImportName, resource, uidl.outputOptions.pagination);
|
|
89
|
+
chunks.push({
|
|
90
|
+
name: 'import-resource-chunk',
|
|
91
|
+
type: teleport_types_1.ChunkType.AST,
|
|
92
|
+
fileType: teleport_types_1.FileType.JS,
|
|
93
|
+
content: types.importDeclaration([types.importDefaultSpecifier(types.identifier(resourceImportName))], types.stringLiteral("".concat(resources.path).concat(teleport_shared_1.StringUtils.camelCaseToDashCase(usedResource.name)))),
|
|
94
|
+
linkAfter: [''],
|
|
95
|
+
});
|
|
57
96
|
chunks.push({
|
|
58
97
|
name: 'getStaticPaths',
|
|
59
98
|
type: teleport_types_1.ChunkType.AST,
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6DAMmC;AACnC,kDAAqC;AACrC,+DAAyD;AACzD,iCAAiD;AAM1C,IAAM,uBAAuB,GAAoD,UACtF,MAAM;IAEE,IAAA,KAAyC,CAAA,MAAM,IAAI,EAAE,CAAA,mBAAjB,EAApC,kBAAkB,mBAAG,eAAe,KAAA,CAAiB;IAE7D,IAAM,iBAAiB,GAAoB,UAAO,SAAS;;;;YACjD,IAAI,GAAsB,SAAS,KAA/B,EAAE,MAAM,GAAc,SAAS,OAAvB,EAAE,OAAO,GAAK,SAAS,QAAd,CAAc;YACnC,SAAS,GAAK,OAAO,UAAZ,CAAY;YAE7B,IAAI,CAAC,CAAA,MAAA,IAAI,CAAC,aAAa,0CAAE,gBAAgB,CAAA,IAAI,CAAC,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,KAAK,CAAA,EAAE;gBAC9D,sBAAO,SAAS,EAAA;aACjB;YAEO,QAAQ,GAAK,CAAA,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,aAAa,0CAAE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QAAQ,EAAE,yBAAQ,CAAC,EAAE;gBACrB,OAAO,EAAE,iBAAiB;gBAC1B,SAAS,EAAE,CAAC,kBAAkB,CAAC;aAChC,CAAC,CAAA;YAEF,sBAAO,SAAS,EAAA;;SACjB,CAAA;IAED,OAAO,iBAAiB,CAAA;AAC1B,CAAC,CAAA;AA/DY,QAAA,uBAAuB,2BA+DnC;AAED,kBAAe,IAAA,+BAAuB,GAAE,CAAA"}
|
|
@@ -1 +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.es2020.bigint.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.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","../../../../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/node-handlers/node-to-jsx/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/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/@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/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/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/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":"3ac1b83264055b28c0165688fda6dfcc39001e9e7828f649299101c23ad0a0c3","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940",{"version":"72704b10d97777e15f1a581b73f88273037ef752d2e50b72287bd0a90af64fe6","affectsGlobalScope":true},{"version":"d8996609230d17e90484a2dd58f22668f9a05a3bfe00bfb1d6271171e54a31fb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","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":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"5075b36ab861c8c0c45377cb8c96270d7c65f0eeaf105d53fac6850da61f1027","affectsGlobalScope":true},{"version":"10bbdc1981b8d9310ee75bfac28ee0477bb2353e8529da8cff7cb26c409cb5e8","affectsGlobalScope":true},"fd0f56a96d995bf07780490eb65da40e9fbdf80c1ddc89fb5ef837d91849c6d8","1aad8f94a73782ef4056ea0bc19ea1cd58491e9b15ec3aa22f06d7314fb48e1d","db2ea909d82eb6e05c4c162e83d40ffd164bbd3f268c9416b8f84c056f79c63a","71a689048584cde03cb508408ae7c3b04ad8f10af887865e8b65c27ed9d91488","ccdd58c6212ebce6230fe7b78d57ddad6cf4032334ebc8c87a88d475d40e7012","6ba1631f84ef4507073189c4ada06d6de8bac89375ea3b49e34e49006cc44a3f","2ff9995137f3e5d68971388ec58af0c79721626323884513f9f5e2e996ac1fdd","07e3907c42b7215b7f8ced0c990805f42862060e53c9c4c42c28e407648d52d9","7d69ac79c9de7620a1bdd926fd4b20b8e968d6467a220eac2a836988ab47c933","c7b126a023fbcbe6b07edf69283b049fc3ca6958bc19934cde610a0ab5ae8ef3","7383bcf1e3b4970ec58cddeb24becd4fcd207aa518ca46270a6872b63712c29e","caeb0e5ee606c0461616c3f884bc15e651e5de500973335ed360ab063deae8ca","15644fa386f870a3ff6202ec0c8acdc1007d0466004c37757490991ec2602d74","d4f36091f2a7fac55cac2d088d46e68f01cd5cf68e3db5770b3ba62641875e18","5a007f687f1be0ed103375930c7027eb6f10d0b826472f7f6d7a5b260502104e","531942c2bbd4ebc75da80f161ab9b8ad1c519a8a703bdbc7907805f9f92bc223","dcaef7f7c1f0cb2dba19a1a70cc8d5276faa68e50bc69d6a006d3aaaaa9f7aa7","ffd67adf9464cf9bcddc3954fcd27d59b60e85acb02101fefe8b0eb642a2be2f","59b8c7576043b12356b13745811130ae5fa9c37cbd7ec5e49ecac8e88b8c9992","d992548828f9d7f905d401ec57c41f241f7dfde4267e639aa8b2d33ecf90c8b0","e689f3e0af5e9bb2034ad2e16784fb1f231e41159080e944666ebc9d9f33dc09","0d5a2ee1fdfa82740e0103389b9efd6bfe145a20018a2da3c02b89666181f4d9","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"2f6c9750131d5d2fdaba85c164a930dc07d2d7e7e8970b89d32864aa6c72620c","affectsGlobalScope":true},"56d13f223ab40f71840795f5bef2552a397a70666ee60878222407f3893fb8d0",{"version":"aeeee3998c5a730f8689f04038d41cf4245c9edbf6ef29a698e45b36e399b8ed","affectsGlobalScope":true},"95843d5cfafced8f3f8a5ce57d2335f0bcd361b9483587d12a25e4bd403b8216","afc6e96061af46bcff47246158caee7e056f5288783f2d83d6858cd25be1c565",{"version":"34f5bcac12b36d70304b73de5f5aab3bb91bd9919f984be80579ebcad03a624e","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","90b94d3d2aa3432cc9dd2d15f56a38b166163fc555404c74243e1af29c5549d8","f50c975ab7b50e25a69e3d8a3773894125b44e9698924105f23b812bf7488baf","c993aac3b6d4a4620ef9651497069eb84806a131420e4f158ea9396fb8eb9b8c","76650408392bf49a8fbf3e2b6b302712a92d76af77b06e2da1cc8077359c4409","0af3121e68297b2247dd331c0d24dba599e50736a7517a5622d5591aae4a3122","6972fca26f6e9bd56197568d4379f99071a90766e06b4fcb5920a0130a9202be",{"version":"4a2628e95962c8ab756121faa3ac2ed348112ff7a87b5c286dd2cc3326546b4c","affectsGlobalScope":true},"80793b2277f31baa199234daed806fff0fb11491d1ebd3357e520c3558063f00","a049a59a02009fc023684fcfaf0ac526fe36c35dcc5d2b7d620c1750ba11b083","e3b886bacdd1fbf1f72e654596c80a55c7bc1d10bdf464aaf52f45ecd243862f","d2f5c67858e65ebb932c2f4bd2af646f5764e8ad7f1e4fbe942a0b5ea05dc0e7","4b9a003b5c556c96784132945bb41c655ea11273b1917f5c8d0c154dd5fd20dd","7f249c599e7a9335dd8e94a4bfe63f00e911756c3c23f77cdb6ef0ec4d479e4a",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"2cabc86ea4f972f2c8386903eccb8c19e2f2370fb9808b66dd8759c1f2ab30c7","abc1c425b2ad6720433f40f1877abfa4223f0f3dd486c9c28c492179ca183cb6","945a841f9a591197154c85386bc5a1467d42d325104bb36db51bc566bbb240be","10c39ce1df102994b47d4bc0c71aa9a6aea76f4651a5ec51914431f50bc883a1",{"version":"8207e7e6db9aa5fc7e61c8f17ba74cf9c115d26f51f91ee93f790815a7ea9dfb","affectsGlobalScope":true},"9f1069b9e2c051737b1f9b4f1baf50e4a63385a6a89c32235549ae87fc3d5492","ee18f2da7a037c6ceeb112a084e485aead9ea166980bf433474559eac1b46553","29c2706fa0cc49a2bd90c83234da33d08bb9554ecec675e91c1f85087f5a5324","0acbf26bf958f9e80c1ffa587b74749d2697b75b484062d36e103c137c562bc3","3fa48484c65913004d5abb5c0f917b61ea4684f32d05bb28c1ecfa5f05a9ed12","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"33eee034727baf564056b4ea719075c23d3b4767d0b5f9c6933b81f3d77774d2","c33a6ea7147af60d8e98f1ac127047f4b0d4e2ce28b8f08ff3de07ca7cc00637",{"version":"127803f77e0dfee84b031b83ea7776875c6c4c89e11a81d00299ff58f163f0e2","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","2408611d9b4146e35d1dbd1f443ccd8e187c74614a54b80300728277529dbf11","998a3de5237518c0b3ac00a11b3b4417affb008aa20aedee52f3fdae3cb86151","ad41008ffe077206e1811fc873f4d9005b5fd7f6ab52bb6118fef600815a5cb4",{"version":"dd9ea469d1bfaf589c6a196275d35cb1aa14014707c2c46d920c7b921e8f5bca","affectsGlobalScope":true},"badae0df9a8016ac36994b0a0e7b82ba6aaa3528e175a8c3cb161e4683eec03e","c3db860bcaaaeb3bbc23f353bbda1f8ab82756c8d5e973bebb3953cb09ea68f2","235a53595bd20b0b0eeb1a29cb2887c67c48375e92f03749b2488fbd46d0b1a0","bc09393cd4cd13f69cf1366d4236fbae5359bb550f0de4e15767e9a91d63dfb1","9c266243b01545e11d2733a55ad02b4c00ecdbda99c561cd1674f96e89cdc958","c71155c05fc76ff948a4759abc1cb9feec036509f500174bc18dad4c7827a60c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"1503a452a67127e5c2da794d1c7c44344d5038373aae16c9b03ac964db159edd","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":[[104],[104,116,118],[104,112,113],[104,112,113,114,115],[104,117],[104,119],[61,104],[64,104],[65,70,104],[66,76,77,84,93,103,104],[66,67,76,84,104],[68,104],[69,70,77,85,104],[70,93,100,104],[71,73,76,84,104],[72,104],[73,74,104],[75,76,104],[76,104],[76,77,78,93,103,104],[76,77,78,93,104],[79,84,93,103,104],[76,77,79,80,84,93,100,103,104],[79,81,93,100,103,104],[61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110],[76,82,104],[83,103,104],[73,76,84,93,104],[85,104],[86,104],[64,87,104],[88,102,104,108],[89,104],[90,104],[76,91,104],[91,92,104,106],[76,93,94,95,104],[93,95,104],[93,94,104],[96,104],[97,104],[76,98,99,104],[98,99,104],[70,84,100,104],[101,104],[84,102,104],[65,79,90,103,104],[70,104],[93,104,105],[104,106],[104,107],[65,70,76,78,87,93,103,104,106,108],[93,104,109],[45,46,104],[45,104],[45,46,48,104],[47,48,49,50,51,52,53,54,55,56,57,104],[45,55,104],[45,46,51,104],[45,46,48,51,104],[45,59,104],[45,46,58,104],[41,104],[41,42,43,44,104],[40,104],[40,41,104]],"referencedMap":[[46,1],[119,2],[112,1],[114,3],[116,4],[115,3],[113,1],[118,5],[117,1],[120,6],[61,7],[62,7],[64,8],[65,9],[66,10],[67,11],[68,12],[69,13],[70,14],[71,15],[72,16],[73,17],[74,17],[75,18],[76,19],[77,20],[78,21],[63,1],[110,1],[79,22],[80,23],[81,24],[111,25],[82,26],[83,27],[84,28],[85,29],[86,30],[87,31],[88,32],[89,33],[90,34],[91,35],[92,36],[93,37],[95,38],[94,39],[96,40],[97,41],[98,42],[99,43],[100,44],[101,45],[102,46],[103,47],[104,48],[105,49],[106,50],[107,51],[108,52],[109,53],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[30,1],[31,1],[32,1],[33,1],[7,1],[38,1],[34,1],[35,1],[36,1],[37,1],[1,1],[39,1],[47,54],[50,55],[49,56],[58,57],[56,58],[55,55],[57,59],[51,54],[52,60],[54,55],[48,1],[53,55],[60,61],[59,62],[43,1],[42,63],[40,1],[45,64],[41,65],[44,66]],"exportedModulesMap":[[46,1],[119,2],[112,1],[114,3],[116,4],[115,3],[113,1],[118,5],[117,1],[120,6],[61,7],[62,7],[64,8],[65,9],[66,10],[67,11],[68,12],[69,13],[70,14],[71,15],[72,16],[73,17],[74,17],[75,18],[76,19],[77,20],[78,21],[63,1],[110,1],[79,22],[80,23],[81,24],[111,25],[82,26],[83,27],[84,28],[85,29],[86,30],[87,31],[88,32],[89,33],[90,34],[91,35],[92,36],[93,37],[95,38],[94,39],[96,40],[97,41],[98,42],[99,43],[100,44],[101,45],[102,46],[103,47],[104,48],[105,49],[106,50],[107,51],[108,52],[109,53],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[30,1],[31,1],[32,1],[33,1],[7,1],[38,1],[34,1],[35,1],[36,1],[37,1],[1,1],[39,1],[47,54],[50,55],[49,56],[58,57],[56,58],[55,55],[57,59],[51,54],[52,60],[54,55],[48,1],[53,55],[60,61],[59,62],[43,1],[42,63],[40,1],[45,64],[41,65],[44,66]],"semanticDiagnosticsPerFile":[46,119,112,114,116,115,113,118,117,120,61,62,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,63,110,79,80,81,111,82,83,84,85,86,87,88,89,90,91,92,93,95,94,96,97,98,99,100,101,102,103,104,105,106,107,108,109,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,30,31,32,33,7,38,34,35,36,37,1,39,47,50,49,58,56,55,57,51,52,54,48,53,60,59,43,42,40,45,41,44]},"version":"4.6.2"}
|
|
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.es2020.bigint.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.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","../../../../node_modules/@babel/types/lib/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","../../../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/node-handlers/node-to-jsx/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/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/@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/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/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/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":"3ac1b83264055b28c0165688fda6dfcc39001e9e7828f649299101c23ad0a0c3","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940",{"version":"72704b10d97777e15f1a581b73f88273037ef752d2e50b72287bd0a90af64fe6","affectsGlobalScope":true},{"version":"d8996609230d17e90484a2dd58f22668f9a05a3bfe00bfb1d6271171e54a31fb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","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":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"5075b36ab861c8c0c45377cb8c96270d7c65f0eeaf105d53fac6850da61f1027","affectsGlobalScope":true},{"version":"10bbdc1981b8d9310ee75bfac28ee0477bb2353e8529da8cff7cb26c409cb5e8","affectsGlobalScope":true},"fd0f56a96d995bf07780490eb65da40e9fbdf80c1ddc89fb5ef837d91849c6d8","ad6f358381110ffc47a0c7255a62069081ae709db5cb5488cb238ac20770f52b","ce336c67e433e48fdfcbbf72785dd955752988f38f71f67a125021df8f115cfb","71a689048584cde03cb508408ae7c3b04ad8f10af887865e8b65c27ed9d91488","0b1466e3b5a0182ad1b9fc6627914df1f6b6fb3b3c49e65b9e282579dc95ecf4","6ba1631f84ef4507073189c4ada06d6de8bac89375ea3b49e34e49006cc44a3f","2ff9995137f3e5d68971388ec58af0c79721626323884513f9f5e2e996ac1fdd","6adc82a39151ff8104426c75c98557da5e87528d01a0fcafe44a826c637c2426","8c08668019739abf45bfa24fb3559a4362161c438e71e3925f06bd6ea2792883","4108609a2489c2b83780313865561402c5fbde5ad824c9b56fa7a1dae2240c4a","2c55653d46d0d2bfa1b84b54c3a4ffa6e43de5b05c9f808e46b42adffc4e3e92","1875bde1eafbc9d923cd1624ac1fd6da0af82347c2a9c7a847a660cc4fa01a33","07e3907c42b7215b7f8ced0c990805f42862060e53c9c4c42c28e407648d52d9","7d69ac79c9de7620a1bdd926fd4b20b8e968d6467a220eac2a836988ab47c933","c7b126a023fbcbe6b07edf69283b049fc3ca6958bc19934cde610a0ab5ae8ef3","7383bcf1e3b4970ec58cddeb24becd4fcd207aa518ca46270a6872b63712c29e","caeb0e5ee606c0461616c3f884bc15e651e5de500973335ed360ab063deae8ca","1a3c7e66bd92da01ec40e3b0f902b34d26e0f67e41b2ed38fe9fdd71fb8e69e1","d4f36091f2a7fac55cac2d088d46e68f01cd5cf68e3db5770b3ba62641875e18","5a007f687f1be0ed103375930c7027eb6f10d0b826472f7f6d7a5b260502104e","531942c2bbd4ebc75da80f161ab9b8ad1c519a8a703bdbc7907805f9f92bc223","dcaef7f7c1f0cb2dba19a1a70cc8d5276faa68e50bc69d6a006d3aaaaa9f7aa7","ffd67adf9464cf9bcddc3954fcd27d59b60e85acb02101fefe8b0eb642a2be2f","59b8c7576043b12356b13745811130ae5fa9c37cbd7ec5e49ecac8e88b8c9992","c7f5e0a08e4ab385669b85f5565904ca54d28a89646046aaf3dc3dcca8dad103","da7e04eb4761dd3c24874f8c3927ffc06d1c7fe09e1d6db3e6ff3c442d6b9a98","0d5a2ee1fdfa82740e0103389b9efd6bfe145a20018a2da3c02b89666181f4d9","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"2f6c9750131d5d2fdaba85c164a930dc07d2d7e7e8970b89d32864aa6c72620c","affectsGlobalScope":true},"56d13f223ab40f71840795f5bef2552a397a70666ee60878222407f3893fb8d0",{"version":"aeeee3998c5a730f8689f04038d41cf4245c9edbf6ef29a698e45b36e399b8ed","affectsGlobalScope":true},"95843d5cfafced8f3f8a5ce57d2335f0bcd361b9483587d12a25e4bd403b8216","afc6e96061af46bcff47246158caee7e056f5288783f2d83d6858cd25be1c565",{"version":"34f5bcac12b36d70304b73de5f5aab3bb91bd9919f984be80579ebcad03a624e","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","90b94d3d2aa3432cc9dd2d15f56a38b166163fc555404c74243e1af29c5549d8","f50c975ab7b50e25a69e3d8a3773894125b44e9698924105f23b812bf7488baf","c993aac3b6d4a4620ef9651497069eb84806a131420e4f158ea9396fb8eb9b8c","76650408392bf49a8fbf3e2b6b302712a92d76af77b06e2da1cc8077359c4409","0af3121e68297b2247dd331c0d24dba599e50736a7517a5622d5591aae4a3122","6972fca26f6e9bd56197568d4379f99071a90766e06b4fcb5920a0130a9202be",{"version":"4a2628e95962c8ab756121faa3ac2ed348112ff7a87b5c286dd2cc3326546b4c","affectsGlobalScope":true},"80793b2277f31baa199234daed806fff0fb11491d1ebd3357e520c3558063f00","a049a59a02009fc023684fcfaf0ac526fe36c35dcc5d2b7d620c1750ba11b083","e3b886bacdd1fbf1f72e654596c80a55c7bc1d10bdf464aaf52f45ecd243862f","d2f5c67858e65ebb932c2f4bd2af646f5764e8ad7f1e4fbe942a0b5ea05dc0e7","4b9a003b5c556c96784132945bb41c655ea11273b1917f5c8d0c154dd5fd20dd","7f249c599e7a9335dd8e94a4bfe63f00e911756c3c23f77cdb6ef0ec4d479e4a",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"2cabc86ea4f972f2c8386903eccb8c19e2f2370fb9808b66dd8759c1f2ab30c7","abc1c425b2ad6720433f40f1877abfa4223f0f3dd486c9c28c492179ca183cb6","945a841f9a591197154c85386bc5a1467d42d325104bb36db51bc566bbb240be","10c39ce1df102994b47d4bc0c71aa9a6aea76f4651a5ec51914431f50bc883a1",{"version":"8207e7e6db9aa5fc7e61c8f17ba74cf9c115d26f51f91ee93f790815a7ea9dfb","affectsGlobalScope":true},"9f1069b9e2c051737b1f9b4f1baf50e4a63385a6a89c32235549ae87fc3d5492","ee18f2da7a037c6ceeb112a084e485aead9ea166980bf433474559eac1b46553","29c2706fa0cc49a2bd90c83234da33d08bb9554ecec675e91c1f85087f5a5324","0acbf26bf958f9e80c1ffa587b74749d2697b75b484062d36e103c137c562bc3","3fa48484c65913004d5abb5c0f917b61ea4684f32d05bb28c1ecfa5f05a9ed12","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"33eee034727baf564056b4ea719075c23d3b4767d0b5f9c6933b81f3d77774d2","c33a6ea7147af60d8e98f1ac127047f4b0d4e2ce28b8f08ff3de07ca7cc00637",{"version":"127803f77e0dfee84b031b83ea7776875c6c4c89e11a81d00299ff58f163f0e2","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","2408611d9b4146e35d1dbd1f443ccd8e187c74614a54b80300728277529dbf11","998a3de5237518c0b3ac00a11b3b4417affb008aa20aedee52f3fdae3cb86151","ad41008ffe077206e1811fc873f4d9005b5fd7f6ab52bb6118fef600815a5cb4",{"version":"dd9ea469d1bfaf589c6a196275d35cb1aa14014707c2c46d920c7b921e8f5bca","affectsGlobalScope":true},"badae0df9a8016ac36994b0a0e7b82ba6aaa3528e175a8c3cb161e4683eec03e","c3db860bcaaaeb3bbc23f353bbda1f8ab82756c8d5e973bebb3953cb09ea68f2","235a53595bd20b0b0eeb1a29cb2887c67c48375e92f03749b2488fbd46d0b1a0","bc09393cd4cd13f69cf1366d4236fbae5359bb550f0de4e15767e9a91d63dfb1","9c266243b01545e11d2733a55ad02b4c00ecdbda99c561cd1674f96e89cdc958","c71155c05fc76ff948a4759abc1cb9feec036509f500174bc18dad4c7827a60c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"1503a452a67127e5c2da794d1c7c44344d5038373aae16c9b03ac964db159edd","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":[[109],[109,121,123],[109,117,118],[109,117,118,119,120],[109,122],[109,124],[66,109],[69,109],[70,75,109],[71,81,82,89,98,108,109],[71,72,81,89,109],[73,109],[74,75,82,90,109],[75,98,105,109],[76,78,81,89,109],[77,109],[78,79,109],[80,81,109],[81,109],[81,82,83,98,108,109],[81,82,83,98,109],[84,89,98,108,109],[81,82,84,85,89,98,105,108,109],[84,86,98,105,108,109],[66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115],[81,87,109],[88,108,109],[78,81,89,98,109],[90,109],[91,109],[69,92,109],[93,107,109,113],[94,109],[95,109],[81,96,109],[96,97,109,111],[81,98,99,100,109],[98,100,109],[98,99,109],[101,109],[102,109],[81,103,104,109],[103,104,109],[75,89,105,109],[106,109],[89,107,109],[70,84,95,108,109],[75,109],[98,109,110],[109,111],[109,112],[70,75,81,83,92,98,108,109,111,113],[98,109,114],[45,46,109],[45,109],[45,46,53,109],[52,53,54,55,56,57,58,59,60,61,62,109],[45,60,109],[45,46,56,109],[45,46,53,56,109],[45,46,51,64,109],[45,46,63,109],[47,48,49,50,109],[41,109],[41,42,43,44,109],[40,109],[40,41,109]],"referencedMap":[[46,1],[124,2],[117,1],[119,3],[121,4],[120,3],[118,1],[123,5],[122,1],[125,6],[66,7],[67,7],[69,8],[70,9],[71,10],[72,11],[73,12],[74,13],[75,14],[76,15],[77,16],[78,17],[79,17],[80,18],[81,19],[82,20],[83,21],[68,1],[115,1],[84,22],[85,23],[86,24],[116,25],[87,26],[88,27],[89,28],[90,29],[91,30],[92,31],[93,32],[94,33],[95,34],[96,35],[97,36],[98,37],[100,38],[99,39],[101,40],[102,41],[103,42],[104,43],[105,44],[106,45],[107,46],[108,47],[109,48],[110,49],[111,50],[112,51],[113,52],[114,53],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[30,1],[31,1],[32,1],[33,1],[7,1],[38,1],[34,1],[35,1],[36,1],[37,1],[1,1],[39,1],[52,54],[55,55],[54,56],[63,57],[61,58],[60,55],[62,59],[56,54],[57,60],[59,55],[53,1],[58,55],[65,61],[64,62],[47,55],[51,63],[50,1],[48,1],[49,55],[43,1],[42,64],[40,1],[45,65],[41,66],[44,67]],"exportedModulesMap":[[46,1],[124,2],[117,1],[119,3],[121,4],[120,3],[118,1],[123,5],[122,1],[125,6],[66,7],[67,7],[69,8],[70,9],[71,10],[72,11],[73,12],[74,13],[75,14],[76,15],[77,16],[78,17],[79,17],[80,18],[81,19],[82,20],[83,21],[68,1],[115,1],[84,22],[85,23],[86,24],[116,25],[87,26],[88,27],[89,28],[90,29],[91,30],[92,31],[93,32],[94,33],[95,34],[96,35],[97,36],[98,37],[100,38],[99,39],[101,40],[102,41],[103,42],[104,43],[105,44],[106,45],[107,46],[108,47],[109,48],[110,49],[111,50],[112,51],[113,52],[114,53],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[30,1],[31,1],[32,1],[33,1],[7,1],[38,1],[34,1],[35,1],[36,1],[37,1],[1,1],[39,1],[52,54],[55,55],[54,56],[63,57],[61,58],[60,55],[62,59],[56,54],[57,60],[59,55],[53,1],[58,55],[65,61],[64,62],[47,55],[51,63],[50,1],[48,1],[49,55],[43,1],[42,64],[40,1],[45,65],[41,66],[44,67]],"semanticDiagnosticsPerFile":[46,124,117,119,121,120,118,123,122,125,66,67,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,68,115,84,85,86,116,87,88,89,90,91,92,93,94,95,96,97,98,100,99,101,102,103,104,105,106,107,108,109,110,111,112,113,114,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,30,31,32,33,7,38,34,35,36,37,1,39,52,55,54,63,61,60,62,56,57,59,53,58,65,64,47,51,50,48,49,43,42,40,45,41,44]},"version":"4.6.2"}
|
package/dist/cjs/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as types from '@babel/types';
|
|
2
|
-
import {
|
|
3
|
-
export declare const generateInitialPathsAST: (initialData:
|
|
2
|
+
import { UIDLInitialPathsData, PagePaginationOptions } from '@teleporthq/teleport-types';
|
|
3
|
+
export declare const generateInitialPathsAST: (initialData: UIDLInitialPathsData, resourceImportName: string, resource: UIDLInitialPathsData['resource'], pagination?: PagePaginationOptions) => types.ExportNamedDeclaration;
|
|
4
4
|
//# sourceMappingURL=utils.d.ts.map
|
package/dist/cjs/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AAErC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AAErC,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAExF,eAAO,MAAM,uBAAuB,gBACrB,oBAAoB,sBACb,MAAM,YAChB,oBAAoB,CAAC,UAAU,CAAC,eAC7B,qBAAqB,iCAkBnC,CAAA"}
|
package/dist/cjs/utils.js
CHANGED
|
@@ -35,9 +35,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
35
35
|
exports.generateInitialPathsAST = void 0;
|
|
36
36
|
var types = __importStar(require("@babel/types"));
|
|
37
37
|
var teleport_plugin_common_1 = require("@teleporthq/teleport-plugin-common");
|
|
38
|
-
var generateInitialPathsAST = function (initialData,
|
|
39
|
-
|
|
40
|
-
var computedResourceAST = computePropsAST(initialData, propsPrefix, pagination);
|
|
38
|
+
var generateInitialPathsAST = function (initialData, resourceImportName, resource, pagination) {
|
|
39
|
+
var computedResourceAST = computePropsAST(initialData, resourceImportName, resource, pagination);
|
|
41
40
|
return types.exportNamedDeclaration((function () {
|
|
42
41
|
var node = types.functionDeclaration(types.identifier('getStaticPaths'), [], types.blockStatement(__spreadArray([], computedResourceAST, true)), false, true);
|
|
43
42
|
node.async = true;
|
|
@@ -45,13 +44,32 @@ var generateInitialPathsAST = function (initialData, propsPrefix, pagination) {
|
|
|
45
44
|
})());
|
|
46
45
|
};
|
|
47
46
|
exports.generateInitialPathsAST = generateInitialPathsAST;
|
|
48
|
-
var computePropsAST = function (initialData,
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
var computePropsAST = function (initialData, resourceImportName, resource, pagination) {
|
|
48
|
+
var funcParams = Object.keys((resource === null || resource === void 0 ? void 0 : resource.params) || {}).reduce(function (acc, item) {
|
|
49
|
+
var prop = resource.params[item];
|
|
50
|
+
acc.push(types.objectProperty(types.stringLiteral(item), teleport_plugin_common_1.ASTUtils.resolveObjectValue(prop)));
|
|
51
|
+
return acc;
|
|
52
|
+
}, []);
|
|
53
|
+
var declerationAST = types.variableDeclaration('const', [
|
|
54
|
+
types.variableDeclarator(types.identifier('response'), types.awaitExpression(types.callExpression(types.identifier(resourceImportName), [
|
|
55
|
+
types.objectExpression(funcParams),
|
|
56
|
+
]))),
|
|
57
|
+
]);
|
|
51
58
|
var paginationASTs = [];
|
|
52
|
-
|
|
59
|
+
// TODO: When pagination is used totalCountPath is mandatory
|
|
60
|
+
if (pagination && (pagination === null || pagination === void 0 ? void 0 : pagination.totalCountPath)) {
|
|
61
|
+
var _a = pagination.totalCountPath || {}, type = _a.type, path = _a.path;
|
|
62
|
+
if (type === 'headers') {
|
|
63
|
+
// We need to parse the headers as JSON because they are returned as a map.
|
|
64
|
+
var parseHeadersAST = types.variableDeclaration('const', [
|
|
65
|
+
types.variableDeclarator(types.identifier('headers'), types.callExpression(types.memberExpression(types.identifier('Object'), types.identifier('fromEntries')), [types.memberExpression(types.identifier('response'), types.identifier('headers'))])),
|
|
66
|
+
]);
|
|
67
|
+
paginationASTs.push(parseHeadersAST);
|
|
68
|
+
}
|
|
53
69
|
var itemsCountAST = types.variableDeclaration('const', [
|
|
54
|
-
types.variableDeclarator(types.identifier('totalCount'),
|
|
70
|
+
types.variableDeclarator(types.identifier('totalCount'), type === 'body'
|
|
71
|
+
? teleport_plugin_common_1.ASTUtils.generateMemberExpressionASTFromPath(__spreadArray(['response'], path, true))
|
|
72
|
+
: teleport_plugin_common_1.ASTUtils.generateMemberExpressionASTFromPath(__spreadArray(['headers'], path, true))),
|
|
55
73
|
]);
|
|
56
74
|
var pagesCountAST = types.variableDeclaration('const', [
|
|
57
75
|
types.variableDeclarator(types.identifier('pagesCount'), types.callExpression(types.memberExpression(types.identifier('Math'), types.identifier('ceil'), false), [
|
|
@@ -88,6 +106,6 @@ var computePropsAST = function (initialData, propsPrefix, pagination) {
|
|
|
88
106
|
]), false, false),
|
|
89
107
|
types.objectProperty(types.identifier('fallback'), types.booleanLiteral(false), false, false),
|
|
90
108
|
]));
|
|
91
|
-
return __spreadArray(__spreadArray(
|
|
109
|
+
return __spreadArray(__spreadArray([declerationAST], paginationASTs, true), [returnAST], false);
|
|
92
110
|
};
|
|
93
111
|
//# sourceMappingURL=utils.js.map
|
package/dist/cjs/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAqC;AACrC,6EAA6D;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BAAgB,CACpB,iCAAQ,CAAC,mCAAmC;gCAC1C,MAAM;+BACH,WAAW,CAAC,QAAQ,CAAC,aAAa,QACrC,EACF,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,CAC7B,EACD,EAAE,CACH,EACD,KAAK,EACL,KAAK,CACN;yBACF,CAAC,EACF,KAAK,EACL,KAAK,CACN;qBACF,CAAC,CACH;iBACF,CAAC,CACH;aACF,CACF,EACL,KAAK,EACL,KAAK,CACN;QACD,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC;KAC9F,CAAC,CACH,CAAA;IAED,oCAAQ,cAAc,GAAK,cAAc,UAAE,SAAS,UAAC;AACvD,CAAC,CAAA"}
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EACf,sBAAsB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EACf,sBAAsB,EAGvB,MAAM,4BAA4B,CAAA;AAKnC,UAAU,uBAAuB;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED,eAAO,MAAM,uBAAuB,EAAE,sBAAsB,CAAC,uBAAuB,CA+DnF,CAAA;;AAED,wBAAwC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -34,23 +34,39 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
34
34
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
|
-
import { ChunkType, FileType, } from '@teleporthq/teleport-types';
|
|
37
|
+
import { ChunkType, FileType, TeleportError, } from '@teleporthq/teleport-types';
|
|
38
|
+
import * as types from '@babel/types';
|
|
39
|
+
import { StringUtils } from '@teleporthq/teleport-shared';
|
|
38
40
|
import { generateInitialPathsAST } from './utils';
|
|
39
41
|
export var createStaticPathsPlugin = function (config) {
|
|
40
42
|
var _a = (config || {}).componentChunkName, componentChunkName = _a === void 0 ? 'jsx-component' : _a;
|
|
41
43
|
var staticPathsPlugin = function (structure) { return __awaiter(void 0, void 0, void 0, function () {
|
|
42
|
-
var uidl, chunks, componentChunk, getStaticPathsAST;
|
|
43
|
-
var _a;
|
|
44
|
-
return __generator(this, function (
|
|
45
|
-
uidl = structure.uidl, chunks = structure.chunks;
|
|
46
|
-
|
|
44
|
+
var uidl, chunks, options, resources, resource, usedResource, resourceImportName, componentChunk, getStaticPathsAST;
|
|
45
|
+
var _a, _b;
|
|
46
|
+
return __generator(this, function (_c) {
|
|
47
|
+
uidl = structure.uidl, chunks = structure.chunks, options = structure.options;
|
|
48
|
+
resources = options.resources;
|
|
49
|
+
if (!((_a = uidl.outputOptions) === null || _a === void 0 ? void 0 : _a.initialPathsData) || !(resources === null || resources === void 0 ? void 0 : resources.items)) {
|
|
47
50
|
return [2 /*return*/, structure];
|
|
48
51
|
}
|
|
52
|
+
resource = ((_b = uidl === null || uidl === void 0 ? void 0 : uidl.outputOptions) === null || _b === void 0 ? void 0 : _b.initialPathsData).resource;
|
|
53
|
+
usedResource = resources.items[resource.id];
|
|
54
|
+
if (!usedResource) {
|
|
55
|
+
throw new TeleportError("Resource ".concat(resource.id, " is being used, but missing from the project ressources"));
|
|
56
|
+
}
|
|
57
|
+
resourceImportName = StringUtils.dashCaseToCamelCase(StringUtils.camelCaseToDashCase("".concat(usedResource.name, "-reource")));
|
|
49
58
|
componentChunk = chunks.find(function (chunk) { return chunk.name === componentChunkName; });
|
|
50
59
|
if (!componentChunk) {
|
|
51
60
|
return [2 /*return*/, structure];
|
|
52
61
|
}
|
|
53
|
-
getStaticPathsAST = generateInitialPathsAST(uidl.outputOptions.initialPathsData,
|
|
62
|
+
getStaticPathsAST = generateInitialPathsAST(uidl.outputOptions.initialPathsData, resourceImportName, resource, uidl.outputOptions.pagination);
|
|
63
|
+
chunks.push({
|
|
64
|
+
name: 'import-resource-chunk',
|
|
65
|
+
type: ChunkType.AST,
|
|
66
|
+
fileType: FileType.JS,
|
|
67
|
+
content: types.importDeclaration([types.importDefaultSpecifier(types.identifier(resourceImportName))], types.stringLiteral("".concat(resources.path).concat(StringUtils.camelCaseToDashCase(usedResource.name)))),
|
|
68
|
+
linkAfter: [''],
|
|
69
|
+
});
|
|
54
70
|
chunks.push({
|
|
55
71
|
name: 'getStaticPaths',
|
|
56
72
|
type: ChunkType.AST,
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EACL,SAAS,EAGT,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EACL,SAAS,EAGT,QAAQ,EACR,aAAa,GACd,MAAM,4BAA4B,CAAA;AACnC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAA;AAMjD,MAAM,CAAC,IAAM,uBAAuB,GAAoD,UACtF,MAAM;IAEE,IAAA,KAAyC,CAAA,MAAM,IAAI,EAAE,CAAA,mBAAjB,EAApC,kBAAkB,mBAAG,eAAe,KAAA,CAAiB;IAE7D,IAAM,iBAAiB,GAAoB,UAAO,SAAS;;;;YACjD,IAAI,GAAsB,SAAS,KAA/B,EAAE,MAAM,GAAc,SAAS,OAAvB,EAAE,OAAO,GAAK,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,CAAC,CAAC,CAAC,EACpE,KAAK,CAAC,aAAa,CACjB,UAAG,SAAS,CAAC,IAAI,SAAG,WAAW,CAAC,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,CAAE,CACzE,CACF;gBACD,SAAS,EAAE,CAAC,EAAE,CAAC;aAChB,CAAC,CAAA;YAEF,MAAM,CAAC,IAAI,CAAC;gBACV,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,SAAS,CAAC,GAAG;gBACnB,QAAQ,EAAE,QAAQ,CAAC,EAAE;gBACrB,OAAO,EAAE,iBAAiB;gBAC1B,SAAS,EAAE,CAAC,kBAAkB,CAAC;aAChC,CAAC,CAAA;YAEF,sBAAO,SAAS,EAAA;;SACjB,CAAA;IAED,OAAO,iBAAiB,CAAA;AAC1B,CAAC,CAAA;AAED,eAAe,uBAAuB,EAAE,CAAA"}
|
|
@@ -1 +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.es2020.bigint.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.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","../../../../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/node-handlers/node-to-jsx/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/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/@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/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/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/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":"3ac1b83264055b28c0165688fda6dfcc39001e9e7828f649299101c23ad0a0c3","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940",{"version":"72704b10d97777e15f1a581b73f88273037ef752d2e50b72287bd0a90af64fe6","affectsGlobalScope":true},{"version":"d8996609230d17e90484a2dd58f22668f9a05a3bfe00bfb1d6271171e54a31fb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","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":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"5075b36ab861c8c0c45377cb8c96270d7c65f0eeaf105d53fac6850da61f1027","affectsGlobalScope":true},{"version":"10bbdc1981b8d9310ee75bfac28ee0477bb2353e8529da8cff7cb26c409cb5e8","affectsGlobalScope":true},"fd0f56a96d995bf07780490eb65da40e9fbdf80c1ddc89fb5ef837d91849c6d8","1aad8f94a73782ef4056ea0bc19ea1cd58491e9b15ec3aa22f06d7314fb48e1d","db2ea909d82eb6e05c4c162e83d40ffd164bbd3f268c9416b8f84c056f79c63a","71a689048584cde03cb508408ae7c3b04ad8f10af887865e8b65c27ed9d91488","ccdd58c6212ebce6230fe7b78d57ddad6cf4032334ebc8c87a88d475d40e7012","6ba1631f84ef4507073189c4ada06d6de8bac89375ea3b49e34e49006cc44a3f","2ff9995137f3e5d68971388ec58af0c79721626323884513f9f5e2e996ac1fdd","07e3907c42b7215b7f8ced0c990805f42862060e53c9c4c42c28e407648d52d9","7d69ac79c9de7620a1bdd926fd4b20b8e968d6467a220eac2a836988ab47c933","c7b126a023fbcbe6b07edf69283b049fc3ca6958bc19934cde610a0ab5ae8ef3","7383bcf1e3b4970ec58cddeb24becd4fcd207aa518ca46270a6872b63712c29e","caeb0e5ee606c0461616c3f884bc15e651e5de500973335ed360ab063deae8ca","15644fa386f870a3ff6202ec0c8acdc1007d0466004c37757490991ec2602d74","d4f36091f2a7fac55cac2d088d46e68f01cd5cf68e3db5770b3ba62641875e18","5a007f687f1be0ed103375930c7027eb6f10d0b826472f7f6d7a5b260502104e","531942c2bbd4ebc75da80f161ab9b8ad1c519a8a703bdbc7907805f9f92bc223","dcaef7f7c1f0cb2dba19a1a70cc8d5276faa68e50bc69d6a006d3aaaaa9f7aa7","ffd67adf9464cf9bcddc3954fcd27d59b60e85acb02101fefe8b0eb642a2be2f","59b8c7576043b12356b13745811130ae5fa9c37cbd7ec5e49ecac8e88b8c9992","d992548828f9d7f905d401ec57c41f241f7dfde4267e639aa8b2d33ecf90c8b0","e689f3e0af5e9bb2034ad2e16784fb1f231e41159080e944666ebc9d9f33dc09","0d5a2ee1fdfa82740e0103389b9efd6bfe145a20018a2da3c02b89666181f4d9","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"2f6c9750131d5d2fdaba85c164a930dc07d2d7e7e8970b89d32864aa6c72620c","affectsGlobalScope":true},"56d13f223ab40f71840795f5bef2552a397a70666ee60878222407f3893fb8d0",{"version":"aeeee3998c5a730f8689f04038d41cf4245c9edbf6ef29a698e45b36e399b8ed","affectsGlobalScope":true},"95843d5cfafced8f3f8a5ce57d2335f0bcd361b9483587d12a25e4bd403b8216","afc6e96061af46bcff47246158caee7e056f5288783f2d83d6858cd25be1c565",{"version":"34f5bcac12b36d70304b73de5f5aab3bb91bd9919f984be80579ebcad03a624e","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","90b94d3d2aa3432cc9dd2d15f56a38b166163fc555404c74243e1af29c5549d8","f50c975ab7b50e25a69e3d8a3773894125b44e9698924105f23b812bf7488baf","c993aac3b6d4a4620ef9651497069eb84806a131420e4f158ea9396fb8eb9b8c","76650408392bf49a8fbf3e2b6b302712a92d76af77b06e2da1cc8077359c4409","0af3121e68297b2247dd331c0d24dba599e50736a7517a5622d5591aae4a3122","6972fca26f6e9bd56197568d4379f99071a90766e06b4fcb5920a0130a9202be",{"version":"4a2628e95962c8ab756121faa3ac2ed348112ff7a87b5c286dd2cc3326546b4c","affectsGlobalScope":true},"80793b2277f31baa199234daed806fff0fb11491d1ebd3357e520c3558063f00","a049a59a02009fc023684fcfaf0ac526fe36c35dcc5d2b7d620c1750ba11b083","e3b886bacdd1fbf1f72e654596c80a55c7bc1d10bdf464aaf52f45ecd243862f","d2f5c67858e65ebb932c2f4bd2af646f5764e8ad7f1e4fbe942a0b5ea05dc0e7","4b9a003b5c556c96784132945bb41c655ea11273b1917f5c8d0c154dd5fd20dd","7f249c599e7a9335dd8e94a4bfe63f00e911756c3c23f77cdb6ef0ec4d479e4a",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"2cabc86ea4f972f2c8386903eccb8c19e2f2370fb9808b66dd8759c1f2ab30c7","abc1c425b2ad6720433f40f1877abfa4223f0f3dd486c9c28c492179ca183cb6","945a841f9a591197154c85386bc5a1467d42d325104bb36db51bc566bbb240be","10c39ce1df102994b47d4bc0c71aa9a6aea76f4651a5ec51914431f50bc883a1",{"version":"8207e7e6db9aa5fc7e61c8f17ba74cf9c115d26f51f91ee93f790815a7ea9dfb","affectsGlobalScope":true},"9f1069b9e2c051737b1f9b4f1baf50e4a63385a6a89c32235549ae87fc3d5492","ee18f2da7a037c6ceeb112a084e485aead9ea166980bf433474559eac1b46553","29c2706fa0cc49a2bd90c83234da33d08bb9554ecec675e91c1f85087f5a5324","0acbf26bf958f9e80c1ffa587b74749d2697b75b484062d36e103c137c562bc3","3fa48484c65913004d5abb5c0f917b61ea4684f32d05bb28c1ecfa5f05a9ed12","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"33eee034727baf564056b4ea719075c23d3b4767d0b5f9c6933b81f3d77774d2","c33a6ea7147af60d8e98f1ac127047f4b0d4e2ce28b8f08ff3de07ca7cc00637",{"version":"127803f77e0dfee84b031b83ea7776875c6c4c89e11a81d00299ff58f163f0e2","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","2408611d9b4146e35d1dbd1f443ccd8e187c74614a54b80300728277529dbf11","998a3de5237518c0b3ac00a11b3b4417affb008aa20aedee52f3fdae3cb86151","ad41008ffe077206e1811fc873f4d9005b5fd7f6ab52bb6118fef600815a5cb4",{"version":"dd9ea469d1bfaf589c6a196275d35cb1aa14014707c2c46d920c7b921e8f5bca","affectsGlobalScope":true},"badae0df9a8016ac36994b0a0e7b82ba6aaa3528e175a8c3cb161e4683eec03e","c3db860bcaaaeb3bbc23f353bbda1f8ab82756c8d5e973bebb3953cb09ea68f2","235a53595bd20b0b0eeb1a29cb2887c67c48375e92f03749b2488fbd46d0b1a0","bc09393cd4cd13f69cf1366d4236fbae5359bb550f0de4e15767e9a91d63dfb1","9c266243b01545e11d2733a55ad02b4c00ecdbda99c561cd1674f96e89cdc958","c71155c05fc76ff948a4759abc1cb9feec036509f500174bc18dad4c7827a60c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"1503a452a67127e5c2da794d1c7c44344d5038373aae16c9b03ac964db159edd","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":[[104],[104,116,118],[104,112,113],[104,112,113,114,115],[104,117],[104,119],[61,104],[64,104],[65,70,104],[66,76,77,84,93,103,104],[66,67,76,84,104],[68,104],[69,70,77,85,104],[70,93,100,104],[71,73,76,84,104],[72,104],[73,74,104],[75,76,104],[76,104],[76,77,78,93,103,104],[76,77,78,93,104],[79,84,93,103,104],[76,77,79,80,84,93,100,103,104],[79,81,93,100,103,104],[61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110],[76,82,104],[83,103,104],[73,76,84,93,104],[85,104],[86,104],[64,87,104],[88,102,104,108],[89,104],[90,104],[76,91,104],[91,92,104,106],[76,93,94,95,104],[93,95,104],[93,94,104],[96,104],[97,104],[76,98,99,104],[98,99,104],[70,84,100,104],[101,104],[84,102,104],[65,79,90,103,104],[70,104],[93,104,105],[104,106],[104,107],[65,70,76,78,87,93,103,104,106,108],[93,104,109],[45,46,104],[45,104],[45,46,48,104],[47,48,49,50,51,52,53,54,55,56,57,104],[45,55,104],[45,46,51,104],[45,46,48,51,104],[45,59,104],[45,46,58,104],[41,104],[41,42,43,44,104],[40,104],[40,41,104]],"referencedMap":[[46,1],[119,2],[112,1],[114,3],[116,4],[115,3],[113,1],[118,5],[117,1],[120,6],[61,7],[62,7],[64,8],[65,9],[66,10],[67,11],[68,12],[69,13],[70,14],[71,15],[72,16],[73,17],[74,17],[75,18],[76,19],[77,20],[78,21],[63,1],[110,1],[79,22],[80,23],[81,24],[111,25],[82,26],[83,27],[84,28],[85,29],[86,30],[87,31],[88,32],[89,33],[90,34],[91,35],[92,36],[93,37],[95,38],[94,39],[96,40],[97,41],[98,42],[99,43],[100,44],[101,45],[102,46],[103,47],[104,48],[105,49],[106,50],[107,51],[108,52],[109,53],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[30,1],[31,1],[32,1],[33,1],[7,1],[38,1],[34,1],[35,1],[36,1],[37,1],[1,1],[39,1],[47,54],[50,55],[49,56],[58,57],[56,58],[55,55],[57,59],[51,54],[52,60],[54,55],[48,1],[53,55],[60,61],[59,62],[43,1],[42,63],[40,1],[45,64],[41,65],[44,66]],"exportedModulesMap":[[46,1],[119,2],[112,1],[114,3],[116,4],[115,3],[113,1],[118,5],[117,1],[120,6],[61,7],[62,7],[64,8],[65,9],[66,10],[67,11],[68,12],[69,13],[70,14],[71,15],[72,16],[73,17],[74,17],[75,18],[76,19],[77,20],[78,21],[63,1],[110,1],[79,22],[80,23],[81,24],[111,25],[82,26],[83,27],[84,28],[85,29],[86,30],[87,31],[88,32],[89,33],[90,34],[91,35],[92,36],[93,37],[95,38],[94,39],[96,40],[97,41],[98,42],[99,43],[100,44],[101,45],[102,46],[103,47],[104,48],[105,49],[106,50],[107,51],[108,52],[109,53],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[30,1],[31,1],[32,1],[33,1],[7,1],[38,1],[34,1],[35,1],[36,1],[37,1],[1,1],[39,1],[47,54],[50,55],[49,56],[58,57],[56,58],[55,55],[57,59],[51,54],[52,60],[54,55],[48,1],[53,55],[60,61],[59,62],[43,1],[42,63],[40,1],[45,64],[41,65],[44,66]],"semanticDiagnosticsPerFile":[46,119,112,114,116,115,113,118,117,120,61,62,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,63,110,79,80,81,111,82,83,84,85,86,87,88,89,90,91,92,93,95,94,96,97,98,99,100,101,102,103,104,105,106,107,108,109,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,30,31,32,33,7,38,34,35,36,37,1,39,47,50,49,58,56,55,57,51,52,54,48,53,60,59,43,42,40,45,41,44]},"version":"4.6.2"}
|
|
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.es2020.bigint.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.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","../../../../node_modules/@babel/types/lib/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","../../../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/node-handlers/node-to-jsx/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/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/@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/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/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/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":"3ac1b83264055b28c0165688fda6dfcc39001e9e7828f649299101c23ad0a0c3","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940",{"version":"72704b10d97777e15f1a581b73f88273037ef752d2e50b72287bd0a90af64fe6","affectsGlobalScope":true},{"version":"d8996609230d17e90484a2dd58f22668f9a05a3bfe00bfb1d6271171e54a31fb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","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":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"5075b36ab861c8c0c45377cb8c96270d7c65f0eeaf105d53fac6850da61f1027","affectsGlobalScope":true},{"version":"10bbdc1981b8d9310ee75bfac28ee0477bb2353e8529da8cff7cb26c409cb5e8","affectsGlobalScope":true},"fd0f56a96d995bf07780490eb65da40e9fbdf80c1ddc89fb5ef837d91849c6d8","ad6f358381110ffc47a0c7255a62069081ae709db5cb5488cb238ac20770f52b","ce336c67e433e48fdfcbbf72785dd955752988f38f71f67a125021df8f115cfb","71a689048584cde03cb508408ae7c3b04ad8f10af887865e8b65c27ed9d91488","0b1466e3b5a0182ad1b9fc6627914df1f6b6fb3b3c49e65b9e282579dc95ecf4","6ba1631f84ef4507073189c4ada06d6de8bac89375ea3b49e34e49006cc44a3f","2ff9995137f3e5d68971388ec58af0c79721626323884513f9f5e2e996ac1fdd","6adc82a39151ff8104426c75c98557da5e87528d01a0fcafe44a826c637c2426","8c08668019739abf45bfa24fb3559a4362161c438e71e3925f06bd6ea2792883","4108609a2489c2b83780313865561402c5fbde5ad824c9b56fa7a1dae2240c4a","2c55653d46d0d2bfa1b84b54c3a4ffa6e43de5b05c9f808e46b42adffc4e3e92","1875bde1eafbc9d923cd1624ac1fd6da0af82347c2a9c7a847a660cc4fa01a33","07e3907c42b7215b7f8ced0c990805f42862060e53c9c4c42c28e407648d52d9","7d69ac79c9de7620a1bdd926fd4b20b8e968d6467a220eac2a836988ab47c933","c7b126a023fbcbe6b07edf69283b049fc3ca6958bc19934cde610a0ab5ae8ef3","7383bcf1e3b4970ec58cddeb24becd4fcd207aa518ca46270a6872b63712c29e","caeb0e5ee606c0461616c3f884bc15e651e5de500973335ed360ab063deae8ca","1a3c7e66bd92da01ec40e3b0f902b34d26e0f67e41b2ed38fe9fdd71fb8e69e1","d4f36091f2a7fac55cac2d088d46e68f01cd5cf68e3db5770b3ba62641875e18","5a007f687f1be0ed103375930c7027eb6f10d0b826472f7f6d7a5b260502104e","531942c2bbd4ebc75da80f161ab9b8ad1c519a8a703bdbc7907805f9f92bc223","dcaef7f7c1f0cb2dba19a1a70cc8d5276faa68e50bc69d6a006d3aaaaa9f7aa7","ffd67adf9464cf9bcddc3954fcd27d59b60e85acb02101fefe8b0eb642a2be2f","59b8c7576043b12356b13745811130ae5fa9c37cbd7ec5e49ecac8e88b8c9992","c7f5e0a08e4ab385669b85f5565904ca54d28a89646046aaf3dc3dcca8dad103","da7e04eb4761dd3c24874f8c3927ffc06d1c7fe09e1d6db3e6ff3c442d6b9a98","0d5a2ee1fdfa82740e0103389b9efd6bfe145a20018a2da3c02b89666181f4d9","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"2f6c9750131d5d2fdaba85c164a930dc07d2d7e7e8970b89d32864aa6c72620c","affectsGlobalScope":true},"56d13f223ab40f71840795f5bef2552a397a70666ee60878222407f3893fb8d0",{"version":"aeeee3998c5a730f8689f04038d41cf4245c9edbf6ef29a698e45b36e399b8ed","affectsGlobalScope":true},"95843d5cfafced8f3f8a5ce57d2335f0bcd361b9483587d12a25e4bd403b8216","afc6e96061af46bcff47246158caee7e056f5288783f2d83d6858cd25be1c565",{"version":"34f5bcac12b36d70304b73de5f5aab3bb91bd9919f984be80579ebcad03a624e","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","90b94d3d2aa3432cc9dd2d15f56a38b166163fc555404c74243e1af29c5549d8","f50c975ab7b50e25a69e3d8a3773894125b44e9698924105f23b812bf7488baf","c993aac3b6d4a4620ef9651497069eb84806a131420e4f158ea9396fb8eb9b8c","76650408392bf49a8fbf3e2b6b302712a92d76af77b06e2da1cc8077359c4409","0af3121e68297b2247dd331c0d24dba599e50736a7517a5622d5591aae4a3122","6972fca26f6e9bd56197568d4379f99071a90766e06b4fcb5920a0130a9202be",{"version":"4a2628e95962c8ab756121faa3ac2ed348112ff7a87b5c286dd2cc3326546b4c","affectsGlobalScope":true},"80793b2277f31baa199234daed806fff0fb11491d1ebd3357e520c3558063f00","a049a59a02009fc023684fcfaf0ac526fe36c35dcc5d2b7d620c1750ba11b083","e3b886bacdd1fbf1f72e654596c80a55c7bc1d10bdf464aaf52f45ecd243862f","d2f5c67858e65ebb932c2f4bd2af646f5764e8ad7f1e4fbe942a0b5ea05dc0e7","4b9a003b5c556c96784132945bb41c655ea11273b1917f5c8d0c154dd5fd20dd","7f249c599e7a9335dd8e94a4bfe63f00e911756c3c23f77cdb6ef0ec4d479e4a",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"2cabc86ea4f972f2c8386903eccb8c19e2f2370fb9808b66dd8759c1f2ab30c7","abc1c425b2ad6720433f40f1877abfa4223f0f3dd486c9c28c492179ca183cb6","945a841f9a591197154c85386bc5a1467d42d325104bb36db51bc566bbb240be","10c39ce1df102994b47d4bc0c71aa9a6aea76f4651a5ec51914431f50bc883a1",{"version":"8207e7e6db9aa5fc7e61c8f17ba74cf9c115d26f51f91ee93f790815a7ea9dfb","affectsGlobalScope":true},"9f1069b9e2c051737b1f9b4f1baf50e4a63385a6a89c32235549ae87fc3d5492","ee18f2da7a037c6ceeb112a084e485aead9ea166980bf433474559eac1b46553","29c2706fa0cc49a2bd90c83234da33d08bb9554ecec675e91c1f85087f5a5324","0acbf26bf958f9e80c1ffa587b74749d2697b75b484062d36e103c137c562bc3","3fa48484c65913004d5abb5c0f917b61ea4684f32d05bb28c1ecfa5f05a9ed12","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"33eee034727baf564056b4ea719075c23d3b4767d0b5f9c6933b81f3d77774d2","c33a6ea7147af60d8e98f1ac127047f4b0d4e2ce28b8f08ff3de07ca7cc00637",{"version":"127803f77e0dfee84b031b83ea7776875c6c4c89e11a81d00299ff58f163f0e2","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","2408611d9b4146e35d1dbd1f443ccd8e187c74614a54b80300728277529dbf11","998a3de5237518c0b3ac00a11b3b4417affb008aa20aedee52f3fdae3cb86151","ad41008ffe077206e1811fc873f4d9005b5fd7f6ab52bb6118fef600815a5cb4",{"version":"dd9ea469d1bfaf589c6a196275d35cb1aa14014707c2c46d920c7b921e8f5bca","affectsGlobalScope":true},"badae0df9a8016ac36994b0a0e7b82ba6aaa3528e175a8c3cb161e4683eec03e","c3db860bcaaaeb3bbc23f353bbda1f8ab82756c8d5e973bebb3953cb09ea68f2","235a53595bd20b0b0eeb1a29cb2887c67c48375e92f03749b2488fbd46d0b1a0","bc09393cd4cd13f69cf1366d4236fbae5359bb550f0de4e15767e9a91d63dfb1","9c266243b01545e11d2733a55ad02b4c00ecdbda99c561cd1674f96e89cdc958","c71155c05fc76ff948a4759abc1cb9feec036509f500174bc18dad4c7827a60c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"1503a452a67127e5c2da794d1c7c44344d5038373aae16c9b03ac964db159edd","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":[[109],[109,121,123],[109,117,118],[109,117,118,119,120],[109,122],[109,124],[66,109],[69,109],[70,75,109],[71,81,82,89,98,108,109],[71,72,81,89,109],[73,109],[74,75,82,90,109],[75,98,105,109],[76,78,81,89,109],[77,109],[78,79,109],[80,81,109],[81,109],[81,82,83,98,108,109],[81,82,83,98,109],[84,89,98,108,109],[81,82,84,85,89,98,105,108,109],[84,86,98,105,108,109],[66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115],[81,87,109],[88,108,109],[78,81,89,98,109],[90,109],[91,109],[69,92,109],[93,107,109,113],[94,109],[95,109],[81,96,109],[96,97,109,111],[81,98,99,100,109],[98,100,109],[98,99,109],[101,109],[102,109],[81,103,104,109],[103,104,109],[75,89,105,109],[106,109],[89,107,109],[70,84,95,108,109],[75,109],[98,109,110],[109,111],[109,112],[70,75,81,83,92,98,108,109,111,113],[98,109,114],[45,46,109],[45,109],[45,46,53,109],[52,53,54,55,56,57,58,59,60,61,62,109],[45,60,109],[45,46,56,109],[45,46,53,56,109],[45,46,51,64,109],[45,46,63,109],[47,48,49,50,109],[41,109],[41,42,43,44,109],[40,109],[40,41,109]],"referencedMap":[[46,1],[124,2],[117,1],[119,3],[121,4],[120,3],[118,1],[123,5],[122,1],[125,6],[66,7],[67,7],[69,8],[70,9],[71,10],[72,11],[73,12],[74,13],[75,14],[76,15],[77,16],[78,17],[79,17],[80,18],[81,19],[82,20],[83,21],[68,1],[115,1],[84,22],[85,23],[86,24],[116,25],[87,26],[88,27],[89,28],[90,29],[91,30],[92,31],[93,32],[94,33],[95,34],[96,35],[97,36],[98,37],[100,38],[99,39],[101,40],[102,41],[103,42],[104,43],[105,44],[106,45],[107,46],[108,47],[109,48],[110,49],[111,50],[112,51],[113,52],[114,53],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[30,1],[31,1],[32,1],[33,1],[7,1],[38,1],[34,1],[35,1],[36,1],[37,1],[1,1],[39,1],[52,54],[55,55],[54,56],[63,57],[61,58],[60,55],[62,59],[56,54],[57,60],[59,55],[53,1],[58,55],[65,61],[64,62],[47,55],[51,63],[50,1],[48,1],[49,55],[43,1],[42,64],[40,1],[45,65],[41,66],[44,67]],"exportedModulesMap":[[46,1],[124,2],[117,1],[119,3],[121,4],[120,3],[118,1],[123,5],[122,1],[125,6],[66,7],[67,7],[69,8],[70,9],[71,10],[72,11],[73,12],[74,13],[75,14],[76,15],[77,16],[78,17],[79,17],[80,18],[81,19],[82,20],[83,21],[68,1],[115,1],[84,22],[85,23],[86,24],[116,25],[87,26],[88,27],[89,28],[90,29],[91,30],[92,31],[93,32],[94,33],[95,34],[96,35],[97,36],[98,37],[100,38],[99,39],[101,40],[102,41],[103,42],[104,43],[105,44],[106,45],[107,46],[108,47],[109,48],[110,49],[111,50],[112,51],[113,52],[114,53],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[30,1],[31,1],[32,1],[33,1],[7,1],[38,1],[34,1],[35,1],[36,1],[37,1],[1,1],[39,1],[52,54],[55,55],[54,56],[63,57],[61,58],[60,55],[62,59],[56,54],[57,60],[59,55],[53,1],[58,55],[65,61],[64,62],[47,55],[51,63],[50,1],[48,1],[49,55],[43,1],[42,64],[40,1],[45,65],[41,66],[44,67]],"semanticDiagnosticsPerFile":[46,124,117,119,121,120,118,123,122,125,66,67,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,68,115,84,85,86,116,87,88,89,90,91,92,93,94,95,96,97,98,100,99,101,102,103,104,105,106,107,108,109,110,111,112,113,114,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,30,31,32,33,7,38,34,35,36,37,1,39,52,55,54,63,61,60,62,56,57,59,53,58,65,64,47,51,50,48,49,43,42,40,45,41,44]},"version":"4.6.2"}
|
package/dist/esm/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as types from '@babel/types';
|
|
2
|
-
import {
|
|
3
|
-
export declare const generateInitialPathsAST: (initialData:
|
|
2
|
+
import { UIDLInitialPathsData, PagePaginationOptions } from '@teleporthq/teleport-types';
|
|
3
|
+
export declare const generateInitialPathsAST: (initialData: UIDLInitialPathsData, resourceImportName: string, resource: UIDLInitialPathsData['resource'], pagination?: PagePaginationOptions) => types.ExportNamedDeclaration;
|
|
4
4
|
//# sourceMappingURL=utils.d.ts.map
|
package/dist/esm/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AAErC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AAErC,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAExF,eAAO,MAAM,uBAAuB,gBACrB,oBAAoB,sBACb,MAAM,YAChB,oBAAoB,CAAC,UAAU,CAAC,eAC7B,qBAAqB,iCAkBnC,CAAA"}
|
package/dist/esm/utils.js
CHANGED
|
@@ -9,22 +9,40 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
9
9
|
};
|
|
10
10
|
import * as types from '@babel/types';
|
|
11
11
|
import { ASTUtils } from '@teleporthq/teleport-plugin-common';
|
|
12
|
-
export var generateInitialPathsAST = function (initialData,
|
|
13
|
-
|
|
14
|
-
var computedResourceAST = computePropsAST(initialData, propsPrefix, pagination);
|
|
12
|
+
export var generateInitialPathsAST = function (initialData, resourceImportName, resource, pagination) {
|
|
13
|
+
var computedResourceAST = computePropsAST(initialData, resourceImportName, resource, pagination);
|
|
15
14
|
return types.exportNamedDeclaration((function () {
|
|
16
15
|
var node = types.functionDeclaration(types.identifier('getStaticPaths'), [], types.blockStatement(__spreadArray([], computedResourceAST, true)), false, true);
|
|
17
16
|
node.async = true;
|
|
18
17
|
return node;
|
|
19
18
|
})());
|
|
20
19
|
};
|
|
21
|
-
var computePropsAST = function (initialData,
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
var computePropsAST = function (initialData, resourceImportName, resource, pagination) {
|
|
21
|
+
var funcParams = Object.keys((resource === null || resource === void 0 ? void 0 : resource.params) || {}).reduce(function (acc, item) {
|
|
22
|
+
var prop = resource.params[item];
|
|
23
|
+
acc.push(types.objectProperty(types.stringLiteral(item), ASTUtils.resolveObjectValue(prop)));
|
|
24
|
+
return acc;
|
|
25
|
+
}, []);
|
|
26
|
+
var declerationAST = types.variableDeclaration('const', [
|
|
27
|
+
types.variableDeclarator(types.identifier('response'), types.awaitExpression(types.callExpression(types.identifier(resourceImportName), [
|
|
28
|
+
types.objectExpression(funcParams),
|
|
29
|
+
]))),
|
|
30
|
+
]);
|
|
24
31
|
var paginationASTs = [];
|
|
25
|
-
|
|
32
|
+
// TODO: When pagination is used totalCountPath is mandatory
|
|
33
|
+
if (pagination && (pagination === null || pagination === void 0 ? void 0 : pagination.totalCountPath)) {
|
|
34
|
+
var _a = pagination.totalCountPath || {}, type = _a.type, path = _a.path;
|
|
35
|
+
if (type === 'headers') {
|
|
36
|
+
// We need to parse the headers as JSON because they are returned as a map.
|
|
37
|
+
var parseHeadersAST = types.variableDeclaration('const', [
|
|
38
|
+
types.variableDeclarator(types.identifier('headers'), types.callExpression(types.memberExpression(types.identifier('Object'), types.identifier('fromEntries')), [types.memberExpression(types.identifier('response'), types.identifier('headers'))])),
|
|
39
|
+
]);
|
|
40
|
+
paginationASTs.push(parseHeadersAST);
|
|
41
|
+
}
|
|
26
42
|
var itemsCountAST = types.variableDeclaration('const', [
|
|
27
|
-
types.variableDeclarator(types.identifier('totalCount'),
|
|
43
|
+
types.variableDeclarator(types.identifier('totalCount'), type === 'body'
|
|
44
|
+
? ASTUtils.generateMemberExpressionASTFromPath(__spreadArray(['response'], path, true))
|
|
45
|
+
: ASTUtils.generateMemberExpressionASTFromPath(__spreadArray(['headers'], path, true))),
|
|
28
46
|
]);
|
|
29
47
|
var pagesCountAST = types.variableDeclaration('const', [
|
|
30
48
|
types.variableDeclarator(types.identifier('pagesCount'), types.callExpression(types.memberExpression(types.identifier('Math'), types.identifier('ceil'), false), [
|
|
@@ -61,6 +79,6 @@ var computePropsAST = function (initialData, propsPrefix, pagination) {
|
|
|
61
79
|
]), false, false),
|
|
62
80
|
types.objectProperty(types.identifier('fallback'), types.booleanLiteral(false), false, false),
|
|
63
81
|
]));
|
|
64
|
-
return __spreadArray(__spreadArray(
|
|
82
|
+
return __spreadArray(__spreadArray([declerationAST], paginationASTs, true), [returnAST], false);
|
|
65
83
|
};
|
|
66
84
|
//# sourceMappingURL=utils.js.map
|
package/dist/esm/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAA;AAG7D,MAAM,CAAC,IAAM,uBAAuB,GAAG,UACrC,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAA;AAG7D,MAAM,CAAC,IAAM,uBAAuB,GAAG,UACrC,WAAiC,EACjC,kBAA0B,EAC1B,QAA0C,EAC1C,UAAkC;IAElC,IAAM,mBAAmB,GAAG,eAAe,CAAC,WAAW,EAAE,kBAAkB,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAA;IAElG,OAAO,KAAK,CAAC,sBAAsB,CACjC,CAAC;QACC,IAAM,IAAI,GAAG,KAAK,CAAC,mBAAmB,CACpC,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAClC,EAAE,EACF,KAAK,CAAC,cAAc,mBAAK,mBAAmB,QAAE,EAC9C,KAAK,EACL,IAAI,CACL,CAAA;QAED,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;QACjB,OAAO,IAAI,CAAA;IACb,CAAC,CAAC,EAAE,CACL,CAAA;AACH,CAAC,CAAA;AAED,IAAM,eAAe,GAAG,UACtB,WAAiC,EACjC,kBAA0B,EAC1B,QAA0C,EAC1C,UAAkC;IAElC,IAAM,UAAU,GAA2B,MAAM,CAAC,IAAI,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,KAAI,EAAE,CAAC,CAAC,MAAM,CACnF,UAAC,GAA2B,EAAE,IAAI;QAChC,IAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;QAClC,GAAG,CAAC,IAAI,CAAC,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,CAAC,gBAAgB,CAAC;4BACrB,KAAK,CAAC,cAAc,CAClB,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,EAC3C,KAAK,CAAC,cAAc,CAClB,KAAK,CAAC,gBAAgB,CACpB,QAAQ,CAAC,mCAAmC;gCAC1C,MAAM;+BACH,WAAW,CAAC,QAAQ,CAAC,aAAa,QACrC,EACF,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,CAC7B,EACD,EAAE,CACH,EACD,KAAK,EACL,KAAK,CACN;yBACF,CAAC,EACF,KAAK,EACL,KAAK,CACN;qBACF,CAAC,CACH;iBACF,CAAC,CACH;aACF,CACF,EACL,KAAK,EACL,KAAK,CACN;QACD,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC;KAC9F,CAAC,CACH,CAAA;IAED,oCAAQ,cAAc,GAAK,cAAc,UAAE,SAAS,UAAC;AACvD,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teleporthq/teleport-plugin-next-static-paths",
|
|
3
|
-
"version": "0.27.3-alpha.
|
|
3
|
+
"version": "0.27.3-alpha.4",
|
|
4
4
|
"description": "A plugin for adding getStaticPaths inside a nextjs page",
|
|
5
5
|
"author": "teleportHQ",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@babel/types": "^7.5.5",
|
|
28
|
-
"@teleporthq/teleport-plugin-common": "^0.27.3-alpha.
|
|
29
|
-
"@teleporthq/teleport-types": "^0.27.3-alpha.
|
|
28
|
+
"@teleporthq/teleport-plugin-common": "^0.27.3-alpha.4",
|
|
29
|
+
"@teleporthq/teleport-types": "^0.27.3-alpha.4"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "aef4f43968d22682591f84d9080e3c5844318f9a"
|
|
32
32
|
}
|
package/src/index.ts
CHANGED
|
@@ -3,7 +3,10 @@ import {
|
|
|
3
3
|
ComponentPlugin,
|
|
4
4
|
ComponentPluginFactory,
|
|
5
5
|
FileType,
|
|
6
|
+
TeleportError,
|
|
6
7
|
} from '@teleporthq/teleport-types'
|
|
8
|
+
import * as types from '@babel/types'
|
|
9
|
+
import { StringUtils } from '@teleporthq/teleport-shared'
|
|
7
10
|
import { generateInitialPathsAST } from './utils'
|
|
8
11
|
|
|
9
12
|
interface StaticPropsPluginConfig {
|
|
@@ -16,11 +19,26 @@ export const createStaticPathsPlugin: ComponentPluginFactory<StaticPropsPluginCo
|
|
|
16
19
|
const { componentChunkName = 'jsx-component' } = config || {}
|
|
17
20
|
|
|
18
21
|
const staticPathsPlugin: ComponentPlugin = async (structure) => {
|
|
19
|
-
const { uidl, chunks } = structure
|
|
20
|
-
|
|
22
|
+
const { uidl, chunks, options } = structure
|
|
23
|
+
const { resources } = options
|
|
24
|
+
|
|
25
|
+
if (!uidl.outputOptions?.initialPathsData || !resources?.items) {
|
|
21
26
|
return structure
|
|
22
27
|
}
|
|
23
28
|
|
|
29
|
+
const { resource } = uidl?.outputOptions?.initialPathsData
|
|
30
|
+
const usedResource = resources.items[resource.id]
|
|
31
|
+
|
|
32
|
+
if (!usedResource) {
|
|
33
|
+
throw new TeleportError(
|
|
34
|
+
`Resource ${resource.id} is being used, but missing from the project ressources`
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const resourceImportName = StringUtils.dashCaseToCamelCase(
|
|
39
|
+
StringUtils.camelCaseToDashCase(`${usedResource.name}-reource`)
|
|
40
|
+
)
|
|
41
|
+
|
|
24
42
|
const componentChunk = chunks.find((chunk) => chunk.name === componentChunkName)
|
|
25
43
|
if (!componentChunk) {
|
|
26
44
|
return structure
|
|
@@ -28,10 +46,24 @@ export const createStaticPathsPlugin: ComponentPluginFactory<StaticPropsPluginCo
|
|
|
28
46
|
|
|
29
47
|
const getStaticPathsAST = generateInitialPathsAST(
|
|
30
48
|
uidl.outputOptions.initialPathsData,
|
|
31
|
-
|
|
49
|
+
resourceImportName,
|
|
50
|
+
resource,
|
|
32
51
|
uidl.outputOptions.pagination
|
|
33
52
|
)
|
|
34
53
|
|
|
54
|
+
chunks.push({
|
|
55
|
+
name: 'import-resource-chunk',
|
|
56
|
+
type: ChunkType.AST,
|
|
57
|
+
fileType: FileType.JS,
|
|
58
|
+
content: types.importDeclaration(
|
|
59
|
+
[types.importDefaultSpecifier(types.identifier(resourceImportName))],
|
|
60
|
+
types.stringLiteral(
|
|
61
|
+
`${resources.path}${StringUtils.camelCaseToDashCase(usedResource.name)}`
|
|
62
|
+
)
|
|
63
|
+
),
|
|
64
|
+
linkAfter: [''],
|
|
65
|
+
})
|
|
66
|
+
|
|
35
67
|
chunks.push({
|
|
36
68
|
name: 'getStaticPaths',
|
|
37
69
|
type: ChunkType.AST,
|
package/src/utils.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import * as types from '@babel/types'
|
|
2
2
|
import { ASTUtils } from '@teleporthq/teleport-plugin-common'
|
|
3
|
-
import {
|
|
3
|
+
import { UIDLInitialPathsData, PagePaginationOptions } from '@teleporthq/teleport-types'
|
|
4
4
|
|
|
5
5
|
export const generateInitialPathsAST = (
|
|
6
|
-
initialData:
|
|
7
|
-
|
|
6
|
+
initialData: UIDLInitialPathsData,
|
|
7
|
+
resourceImportName: string,
|
|
8
|
+
resource: UIDLInitialPathsData['resource'],
|
|
8
9
|
pagination?: PagePaginationOptions
|
|
9
10
|
) => {
|
|
10
|
-
const computedResourceAST = computePropsAST(initialData,
|
|
11
|
+
const computedResourceAST = computePropsAST(initialData, resourceImportName, resource, pagination)
|
|
11
12
|
|
|
12
13
|
return types.exportNamedDeclaration(
|
|
13
14
|
(() => {
|
|
@@ -26,18 +27,56 @@ export const generateInitialPathsAST = (
|
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
const computePropsAST = (
|
|
29
|
-
initialData:
|
|
30
|
-
|
|
30
|
+
initialData: UIDLInitialPathsData,
|
|
31
|
+
resourceImportName: string,
|
|
32
|
+
resource: UIDLInitialPathsData['resource'],
|
|
31
33
|
pagination?: PagePaginationOptions
|
|
32
34
|
) => {
|
|
33
|
-
const
|
|
35
|
+
const funcParams: types.ObjectProperty[] = Object.keys(resource?.params || {}).reduce(
|
|
36
|
+
(acc: types.ObjectProperty[], item) => {
|
|
37
|
+
const prop = resource.params[item]
|
|
38
|
+
acc.push(types.objectProperty(types.stringLiteral(item), ASTUtils.resolveObjectValue(prop)))
|
|
39
|
+
|
|
40
|
+
return acc
|
|
41
|
+
},
|
|
42
|
+
[]
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
const declerationAST = types.variableDeclaration('const', [
|
|
46
|
+
types.variableDeclarator(
|
|
47
|
+
types.identifier('response'),
|
|
48
|
+
types.awaitExpression(
|
|
49
|
+
types.callExpression(types.identifier(resourceImportName), [
|
|
50
|
+
types.objectExpression(funcParams),
|
|
51
|
+
])
|
|
52
|
+
)
|
|
53
|
+
),
|
|
54
|
+
])
|
|
34
55
|
|
|
35
56
|
const paginationASTs = []
|
|
36
|
-
|
|
57
|
+
// TODO: When pagination is used totalCountPath is mandatory
|
|
58
|
+
if (pagination && pagination?.totalCountPath) {
|
|
59
|
+
const { type, path } = pagination.totalCountPath || {}
|
|
60
|
+
if (type === 'headers') {
|
|
61
|
+
// We need to parse the headers as JSON because they are returned as a map.
|
|
62
|
+
const parseHeadersAST = types.variableDeclaration('const', [
|
|
63
|
+
types.variableDeclarator(
|
|
64
|
+
types.identifier('headers'),
|
|
65
|
+
types.callExpression(
|
|
66
|
+
types.memberExpression(types.identifier('Object'), types.identifier('fromEntries')),
|
|
67
|
+
[types.memberExpression(types.identifier('response'), types.identifier('headers'))]
|
|
68
|
+
)
|
|
69
|
+
),
|
|
70
|
+
])
|
|
71
|
+
paginationASTs.push(parseHeadersAST)
|
|
72
|
+
}
|
|
73
|
+
|
|
37
74
|
const itemsCountAST = types.variableDeclaration('const', [
|
|
38
75
|
types.variableDeclarator(
|
|
39
76
|
types.identifier('totalCount'),
|
|
40
|
-
|
|
77
|
+
type === 'body'
|
|
78
|
+
? ASTUtils.generateMemberExpressionASTFromPath(['response', ...path])
|
|
79
|
+
: ASTUtils.generateMemberExpressionASTFromPath(['headers', ...path])
|
|
41
80
|
),
|
|
42
81
|
])
|
|
43
82
|
|
|
@@ -148,5 +187,5 @@ const computePropsAST = (
|
|
|
148
187
|
])
|
|
149
188
|
)
|
|
150
189
|
|
|
151
|
-
return [
|
|
190
|
+
return [declerationAST, ...paginationASTs, returnAST]
|
|
152
191
|
}
|