@opentf/web 0.4.0 → 0.5.0
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/components/Link.jsx +29 -0
- package/core/errors.js +48 -0
- package/core/signals.js +188 -0
- package/index.js +12 -0
- package/package.json +27 -18
- package/runtime/context.js +89 -0
- package/runtime/dom.js +280 -0
- package/runtime/error-boundary.js +109 -0
- package/runtime/events.js +17 -0
- package/runtime/index.js +16 -0
- package/runtime/lifecycle.js +9 -0
- package/runtime/mount.js +49 -0
- package/runtime/portal.js +59 -0
- package/runtime/router.js +246 -0
- package/server/builtins.js +11 -0
- package/server/index.js +7 -0
- package/server/render.js +76 -0
- package/server/ssg-runtime.js +109 -0
- package/README.md +0 -41
- package/dist/CHANGELOG.md +0 -49
- package/dist/README.md +0 -41
- package/dist/babel.config.cjs +0 -6
- package/dist/compiler/babel-plugin.cjs +0 -798
- package/dist/core/mount.js +0 -32
- package/dist/index.js +0 -7
- package/dist/node_modules/@babel/core/LICENSE +0 -22
- package/dist/node_modules/@babel/core/README.md +0 -19
- package/dist/node_modules/@babel/core/lib/config/cache-contexts.js +0 -5
- package/dist/node_modules/@babel/core/lib/config/cache-contexts.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/config/caching.js +0 -261
- package/dist/node_modules/@babel/core/lib/config/caching.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/config/config-chain.js +0 -469
- package/dist/node_modules/@babel/core/lib/config/config-chain.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/config/config-descriptors.js +0 -190
- package/dist/node_modules/@babel/core/lib/config/config-descriptors.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/config/files/configuration.js +0 -290
- package/dist/node_modules/@babel/core/lib/config/files/configuration.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/config/files/import.cjs +0 -6
- package/dist/node_modules/@babel/core/lib/config/files/import.cjs.map +0 -1
- package/dist/node_modules/@babel/core/lib/config/files/index-browser.js +0 -58
- package/dist/node_modules/@babel/core/lib/config/files/index-browser.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/config/files/index.js +0 -78
- package/dist/node_modules/@babel/core/lib/config/files/index.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/config/files/module-types.js +0 -203
- package/dist/node_modules/@babel/core/lib/config/files/module-types.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/config/files/package.js +0 -61
- package/dist/node_modules/@babel/core/lib/config/files/package.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/config/files/plugins.js +0 -220
- package/dist/node_modules/@babel/core/lib/config/files/plugins.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/config/files/types.js +0 -5
- package/dist/node_modules/@babel/core/lib/config/files/types.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/config/files/utils.js +0 -36
- package/dist/node_modules/@babel/core/lib/config/files/utils.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/config/full.js +0 -312
- package/dist/node_modules/@babel/core/lib/config/full.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/config/helpers/config-api.js +0 -85
- package/dist/node_modules/@babel/core/lib/config/helpers/config-api.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/config/helpers/deep-array.js +0 -23
- package/dist/node_modules/@babel/core/lib/config/helpers/deep-array.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/config/helpers/environment.js +0 -12
- package/dist/node_modules/@babel/core/lib/config/helpers/environment.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/config/index.js +0 -87
- package/dist/node_modules/@babel/core/lib/config/index.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/config/item.js +0 -67
- package/dist/node_modules/@babel/core/lib/config/item.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/config/partial.js +0 -158
- package/dist/node_modules/@babel/core/lib/config/partial.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/config/pattern-to-regex.js +0 -38
- package/dist/node_modules/@babel/core/lib/config/pattern-to-regex.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/config/plugin.js +0 -33
- package/dist/node_modules/@babel/core/lib/config/plugin.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/config/printer.js +0 -113
- package/dist/node_modules/@babel/core/lib/config/printer.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/config/resolve-targets-browser.js +0 -41
- package/dist/node_modules/@babel/core/lib/config/resolve-targets-browser.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/config/resolve-targets.js +0 -61
- package/dist/node_modules/@babel/core/lib/config/resolve-targets.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/config/util.js +0 -31
- package/dist/node_modules/@babel/core/lib/config/util.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/config/validation/option-assertions.js +0 -277
- package/dist/node_modules/@babel/core/lib/config/validation/option-assertions.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/config/validation/options.js +0 -187
- package/dist/node_modules/@babel/core/lib/config/validation/options.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/config/validation/plugins.js +0 -67
- package/dist/node_modules/@babel/core/lib/config/validation/plugins.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/config/validation/removed.js +0 -68
- package/dist/node_modules/@babel/core/lib/config/validation/removed.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/errors/config-error.js +0 -18
- package/dist/node_modules/@babel/core/lib/errors/config-error.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js +0 -98
- package/dist/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/gensync-utils/async.js +0 -90
- package/dist/node_modules/@babel/core/lib/gensync-utils/async.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/gensync-utils/fs.js +0 -31
- package/dist/node_modules/@babel/core/lib/gensync-utils/fs.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/gensync-utils/functional.js +0 -58
- package/dist/node_modules/@babel/core/lib/gensync-utils/functional.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/index.js +0 -230
- package/dist/node_modules/@babel/core/lib/index.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/parse.js +0 -45
- package/dist/node_modules/@babel/core/lib/parse.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/parser/index.js +0 -85
- package/dist/node_modules/@babel/core/lib/parser/index.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js +0 -337
- package/dist/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/tools/build-external-helpers.js +0 -144
- package/dist/node_modules/@babel/core/lib/tools/build-external-helpers.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/transform-ast.js +0 -48
- package/dist/node_modules/@babel/core/lib/transform-ast.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/transform-file-browser.js +0 -23
- package/dist/node_modules/@babel/core/lib/transform-file-browser.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/transform-file.js +0 -40
- package/dist/node_modules/@babel/core/lib/transform-file.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/transform.js +0 -47
- package/dist/node_modules/@babel/core/lib/transform.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js +0 -84
- package/dist/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/transformation/file/babel-7-helpers.cjs +0 -4
- package/dist/node_modules/@babel/core/lib/transformation/file/babel-7-helpers.cjs.map +0 -1
- package/dist/node_modules/@babel/core/lib/transformation/file/file.js +0 -204
- package/dist/node_modules/@babel/core/lib/transformation/file/file.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/transformation/file/generate.js +0 -84
- package/dist/node_modules/@babel/core/lib/transformation/file/generate.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/transformation/file/merge-map.js +0 -37
- package/dist/node_modules/@babel/core/lib/transformation/file/merge-map.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/transformation/index.js +0 -90
- package/dist/node_modules/@babel/core/lib/transformation/index.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/transformation/normalize-file.js +0 -127
- package/dist/node_modules/@babel/core/lib/transformation/normalize-file.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/transformation/normalize-opts.js +0 -59
- package/dist/node_modules/@babel/core/lib/transformation/normalize-opts.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/transformation/plugin-pass.js +0 -48
- package/dist/node_modules/@babel/core/lib/transformation/plugin-pass.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/transformation/util/clone-deep.js +0 -54
- package/dist/node_modules/@babel/core/lib/transformation/util/clone-deep.js.map +0 -1
- package/dist/node_modules/@babel/core/lib/vendor/import-meta-resolve.js +0 -1042
- package/dist/node_modules/@babel/core/lib/vendor/import-meta-resolve.js.map +0 -1
- package/dist/node_modules/@babel/core/package.json +0 -82
- package/dist/node_modules/@babel/core/src/config/files/index-browser.ts +0 -115
- package/dist/node_modules/@babel/core/src/config/files/index.ts +0 -30
- package/dist/node_modules/@babel/core/src/config/resolve-targets-browser.ts +0 -42
- package/dist/node_modules/@babel/core/src/config/resolve-targets.ts +0 -54
- package/dist/node_modules/@babel/core/src/transform-file-browser.ts +0 -33
- package/dist/node_modules/@babel/core/src/transform-file.ts +0 -56
- package/dist/node_modules/@babel/helper-module-imports/LICENSE +0 -22
- package/dist/node_modules/@babel/helper-module-imports/README.md +0 -19
- package/dist/node_modules/@babel/helper-module-imports/lib/import-builder.js +0 -122
- package/dist/node_modules/@babel/helper-module-imports/lib/import-builder.js.map +0 -1
- package/dist/node_modules/@babel/helper-module-imports/lib/import-injector.js +0 -304
- package/dist/node_modules/@babel/helper-module-imports/lib/import-injector.js.map +0 -1
- package/dist/node_modules/@babel/helper-module-imports/lib/index.js +0 -37
- package/dist/node_modules/@babel/helper-module-imports/lib/index.js.map +0 -1
- package/dist/node_modules/@babel/helper-module-imports/lib/is-module.js +0 -11
- package/dist/node_modules/@babel/helper-module-imports/lib/is-module.js.map +0 -1
- package/dist/node_modules/@babel/helper-module-imports/package.json +0 -28
- package/dist/node_modules/@babel/plugin-syntax-jsx/LICENSE +0 -22
- package/dist/node_modules/@babel/plugin-syntax-jsx/README.md +0 -19
- package/dist/node_modules/@babel/plugin-syntax-jsx/lib/index.js +0 -21
- package/dist/node_modules/@babel/plugin-syntax-jsx/lib/index.js.map +0 -1
- package/dist/node_modules/@babel/plugin-syntax-jsx/package.json +0 -33
- package/dist/node_modules/@preact/signals-core/CHANGELOG.md +0 -331
- package/dist/node_modules/@preact/signals-core/LICENSE +0 -21
- package/dist/node_modules/@preact/signals-core/README.md +0 -258
- package/dist/node_modules/@preact/signals-core/dist/signals-core.d.ts +0 -149
- package/dist/node_modules/@preact/signals-core/dist/signals-core.js +0 -1
- package/dist/node_modules/@preact/signals-core/dist/signals-core.js.map +0 -1
- package/dist/node_modules/@preact/signals-core/dist/signals-core.min.js +0 -1
- package/dist/node_modules/@preact/signals-core/dist/signals-core.min.js.map +0 -1
- package/dist/node_modules/@preact/signals-core/dist/signals-core.mjs +0 -1
- package/dist/node_modules/@preact/signals-core/dist/signals-core.mjs.map +0 -1
- package/dist/node_modules/@preact/signals-core/dist/signals-core.module.js +0 -1
- package/dist/node_modules/@preact/signals-core/dist/signals-core.module.js.map +0 -1
- package/dist/node_modules/@preact/signals-core/package.json +0 -48
- package/dist/node_modules/@preact/signals-core/src/index.ts +0 -1121
- package/dist/package.json +0 -30
- package/dist/router/Link.js +0 -73
- package/dist/router/index.js +0 -216
- package/dist/runtime/For.js +0 -16
- package/dist/runtime/dom.js +0 -73
- package/dist/runtime/lifecycle.js +0 -25
- package/dist/runtime/props.js +0 -103
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.run = run;
|
|
7
|
-
function _traverse() {
|
|
8
|
-
const data = require("@babel/traverse");
|
|
9
|
-
_traverse = function () {
|
|
10
|
-
return data;
|
|
11
|
-
};
|
|
12
|
-
return data;
|
|
13
|
-
}
|
|
14
|
-
var _pluginPass = require("./plugin-pass.js");
|
|
15
|
-
var _blockHoistPlugin = require("./block-hoist-plugin.js");
|
|
16
|
-
var _normalizeOpts = require("./normalize-opts.js");
|
|
17
|
-
var _normalizeFile = require("./normalize-file.js");
|
|
18
|
-
var _generate = require("./file/generate.js");
|
|
19
|
-
var _deepArray = require("../config/helpers/deep-array.js");
|
|
20
|
-
var _async = require("../gensync-utils/async.js");
|
|
21
|
-
function* run(config, code, ast) {
|
|
22
|
-
const file = yield* (0, _normalizeFile.default)(config.passes, (0, _normalizeOpts.default)(config), code, ast);
|
|
23
|
-
const opts = file.opts;
|
|
24
|
-
try {
|
|
25
|
-
yield* transformFile(file, config.passes);
|
|
26
|
-
} catch (e) {
|
|
27
|
-
var _opts$filename;
|
|
28
|
-
e.message = `${(_opts$filename = opts.filename) != null ? _opts$filename : "unknown file"}: ${e.message}`;
|
|
29
|
-
if (!e.code) {
|
|
30
|
-
e.code = "BABEL_TRANSFORM_ERROR";
|
|
31
|
-
}
|
|
32
|
-
throw e;
|
|
33
|
-
}
|
|
34
|
-
let outputCode, outputMap;
|
|
35
|
-
try {
|
|
36
|
-
if (opts.code !== false) {
|
|
37
|
-
({
|
|
38
|
-
outputCode,
|
|
39
|
-
outputMap
|
|
40
|
-
} = (0, _generate.default)(config.passes, file));
|
|
41
|
-
}
|
|
42
|
-
} catch (e) {
|
|
43
|
-
var _opts$filename2;
|
|
44
|
-
e.message = `${(_opts$filename2 = opts.filename) != null ? _opts$filename2 : "unknown file"}: ${e.message}`;
|
|
45
|
-
if (!e.code) {
|
|
46
|
-
e.code = "BABEL_GENERATE_ERROR";
|
|
47
|
-
}
|
|
48
|
-
throw e;
|
|
49
|
-
}
|
|
50
|
-
return {
|
|
51
|
-
metadata: file.metadata,
|
|
52
|
-
options: opts,
|
|
53
|
-
ast: opts.ast === true ? file.ast : null,
|
|
54
|
-
code: outputCode === undefined ? null : outputCode,
|
|
55
|
-
map: outputMap === undefined ? null : outputMap,
|
|
56
|
-
sourceType: file.ast.program.sourceType,
|
|
57
|
-
externalDependencies: (0, _deepArray.flattenToSet)(config.externalDependencies)
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
function* transformFile(file, pluginPasses) {
|
|
61
|
-
const async = yield* (0, _async.isAsync)();
|
|
62
|
-
for (const pluginPairs of pluginPasses) {
|
|
63
|
-
const passPairs = [];
|
|
64
|
-
const passes = [];
|
|
65
|
-
const visitors = [];
|
|
66
|
-
for (const plugin of pluginPairs.concat([(0, _blockHoistPlugin.default)()])) {
|
|
67
|
-
const pass = new _pluginPass.default(file, plugin.key, plugin.options, async);
|
|
68
|
-
passPairs.push([plugin, pass]);
|
|
69
|
-
passes.push(pass);
|
|
70
|
-
visitors.push(plugin.visitor);
|
|
71
|
-
}
|
|
72
|
-
for (const [plugin, pass] of passPairs) {
|
|
73
|
-
if (plugin.pre) {
|
|
74
|
-
const fn = (0, _async.maybeAsync)(plugin.pre, `You appear to be using an async plugin/preset, but Babel has been called synchronously`);
|
|
75
|
-
yield* fn.call(pass, file);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
const visitor = _traverse().default.visitors.merge(visitors, passes, file.opts.wrapPluginVisitorMethod);
|
|
79
|
-
(0, _traverse().default)(file.ast, visitor, file.scope);
|
|
80
|
-
for (const [plugin, pass] of passPairs) {
|
|
81
|
-
if (plugin.post) {
|
|
82
|
-
const fn = (0, _async.maybeAsync)(plugin.post, `You appear to be using an async plugin/preset, but Babel has been called synchronously`);
|
|
83
|
-
yield* fn.call(pass, file);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
0 && 0;
|
|
89
|
-
|
|
90
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_traverse","data","require","_pluginPass","_blockHoistPlugin","_normalizeOpts","_normalizeFile","_generate","_deepArray","_async","run","config","code","ast","file","normalizeFile","passes","normalizeOptions","opts","transformFile","e","_opts$filename","message","filename","outputCode","outputMap","generateCode","_opts$filename2","metadata","options","undefined","map","sourceType","program","externalDependencies","flattenToSet","pluginPasses","async","isAsync","pluginPairs","passPairs","visitors","plugin","concat","loadBlockHoistPlugin","pass","PluginPass","key","push","visitor","pre","fn","maybeAsync","call","traverse","merge","wrapPluginVisitorMethod","scope","post"],"sources":["../../src/transformation/index.ts"],"sourcesContent":["import traverse from \"@babel/traverse\";\nimport type * as t from \"@babel/types\";\nimport type { GeneratorResult } from \"@babel/generator\";\n\nimport type { Handler } from \"gensync\";\n\nimport type { ResolvedConfig, Plugin, PluginPasses } from \"../config/index.ts\";\n\nimport PluginPass from \"./plugin-pass.ts\";\nimport loadBlockHoistPlugin from \"./block-hoist-plugin.ts\";\nimport normalizeOptions from \"./normalize-opts.ts\";\nimport normalizeFile from \"./normalize-file.ts\";\n\nimport generateCode from \"./file/generate.ts\";\nimport type File from \"./file/file.ts\";\n\nimport { flattenToSet } from \"../config/helpers/deep-array.ts\";\nimport { isAsync, maybeAsync } from \"../gensync-utils/async.ts\";\nimport type { SourceTypeOption } from \"../config/validation/options.ts\";\n\nexport type FileResultCallback = {\n (err: Error, file: null): void;\n (err: null, file: FileResult | null): void;\n};\n\nexport type FileResult = {\n metadata: Record<string, any>;\n options: Record<string, any>;\n ast: t.File | null;\n code: string | null;\n map: GeneratorResult[\"map\"];\n sourceType: Exclude<SourceTypeOption, \"unambiguous\">;\n externalDependencies: Set<string>;\n};\n\nexport function* run(\n config: ResolvedConfig,\n code: string,\n ast?: t.File | t.Program | null,\n): Handler<FileResult> {\n const file = yield* normalizeFile(\n config.passes,\n normalizeOptions(config),\n code,\n ast,\n );\n\n const opts = file.opts;\n try {\n yield* transformFile(file, config.passes);\n } catch (e) {\n e.message = `${opts.filename ?? \"unknown file\"}: ${e.message}`;\n if (!e.code) {\n e.code = \"BABEL_TRANSFORM_ERROR\";\n }\n throw e;\n }\n\n let outputCode, outputMap;\n try {\n if (opts.code !== false) {\n ({ outputCode, outputMap } = generateCode(config.passes, file));\n }\n } catch (e) {\n e.message = `${opts.filename ?? \"unknown file\"}: ${e.message}`;\n if (!e.code) {\n e.code = \"BABEL_GENERATE_ERROR\";\n }\n throw e;\n }\n\n return {\n metadata: file.metadata,\n options: opts,\n ast: opts.ast === true ? file.ast : null,\n code: outputCode === undefined ? null : outputCode,\n map: outputMap === undefined ? null : outputMap,\n sourceType: file.ast.program.sourceType,\n externalDependencies: flattenToSet(config.externalDependencies),\n };\n}\n\nfunction* transformFile(file: File, pluginPasses: PluginPasses): Handler<void> {\n const async = yield* isAsync();\n\n for (const pluginPairs of pluginPasses) {\n const passPairs: [Plugin, PluginPass][] = [];\n const passes = [];\n const visitors = [];\n\n for (const plugin of pluginPairs.concat([loadBlockHoistPlugin()])) {\n const pass = new PluginPass(file, plugin.key, plugin.options, async);\n\n passPairs.push([plugin, pass]);\n passes.push(pass);\n visitors.push(plugin.visitor);\n }\n\n for (const [plugin, pass] of passPairs) {\n if (plugin.pre) {\n const fn = maybeAsync(\n plugin.pre,\n `You appear to be using an async plugin/preset, but Babel has been called synchronously`,\n );\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n yield* fn.call(pass, file);\n }\n }\n\n // merge all plugin visitors into a single visitor\n const visitor = traverse.visitors.merge(\n visitors,\n passes,\n file.opts.wrapPluginVisitorMethod,\n );\n if (process.env.BABEL_8_BREAKING) {\n traverse(file.ast.program, visitor, file.scope, null, file.path, true);\n } else {\n traverse(file.ast, visitor, file.scope);\n }\n\n for (const [plugin, pass] of passPairs) {\n if (plugin.post) {\n const fn = maybeAsync(\n plugin.post,\n `You appear to be using an async plugin/preset, but Babel has been called synchronously`,\n );\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n yield* fn.call(pass, file);\n }\n }\n }\n}\n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,CAACN,MAAM,EAAEG,IAAI,CAAC,CAAC;MAC9B7B,MAAM,CAACgC,IAAI,CAACH,IAAI,CAAC;MACjBJ,QAAQ,CAACO,IAAI,CAACN,MAAM,CAACO,OAAO,CAAC;IAC/B;IAEA,KAAK,MAAM,CAACP,MAAM,EAAEG,IAAI,CAAC,IAAIL,SAAS,EAAE;MACtC,IAAIE,MAAM,CAACQ,GAAG,EAAE;QACd,MAAMC,EAAE,GAAG,IAAAC,iBAAU,EACnBV,MAAM,CAACQ,GAAG,EACV,wFACF,CAAC;QAGD,OAAOC,EAAE,CAACE,IAAI,CAACR,IAAI,EAAE/B,IAAI,CAAC;MAC5B;IACF;IAGA,MAAMmC,OAAO,GAAGK,mBAAQ,CAACb,QAAQ,CAACc,KAAK,CACrCd,QAAQ,EACRzB,MAAM,EACNF,IAAI,CAACI,IAAI,CAACsC,uBACZ,CAAC;IAIC,IAAAF,mBAAQ,EAACxC,IAAI,CAACD,GAAG,EAAEoC,OAAO,EAAEnC,IAAI,CAAC2C,KAAK,CAAC;IAGzC,KAAK,MAAM,CAACf,MAAM,EAAEG,IAAI,CAAC,IAAIL,SAAS,EAAE;MACtC,IAAIE,MAAM,CAACgB,IAAI,EAAE;QACf,MAAMP,EAAE,GAAG,IAAAC,iBAAU,EACnBV,MAAM,CAACgB,IAAI,EACX,wFACF,CAAC;QAGD,OAAOP,EAAE,CAACE,IAAI,CAACR,IAAI,EAAE/B,IAAI,CAAC;MAC5B;IACF;EACF;AACF;AAAC","ignoreList":[]}
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = normalizeFile;
|
|
7
|
-
function _fs() {
|
|
8
|
-
const data = require("fs");
|
|
9
|
-
_fs = function () {
|
|
10
|
-
return data;
|
|
11
|
-
};
|
|
12
|
-
return data;
|
|
13
|
-
}
|
|
14
|
-
function _path() {
|
|
15
|
-
const data = require("path");
|
|
16
|
-
_path = function () {
|
|
17
|
-
return data;
|
|
18
|
-
};
|
|
19
|
-
return data;
|
|
20
|
-
}
|
|
21
|
-
function _debug() {
|
|
22
|
-
const data = require("debug");
|
|
23
|
-
_debug = function () {
|
|
24
|
-
return data;
|
|
25
|
-
};
|
|
26
|
-
return data;
|
|
27
|
-
}
|
|
28
|
-
function _t() {
|
|
29
|
-
const data = require("@babel/types");
|
|
30
|
-
_t = function () {
|
|
31
|
-
return data;
|
|
32
|
-
};
|
|
33
|
-
return data;
|
|
34
|
-
}
|
|
35
|
-
function _convertSourceMap() {
|
|
36
|
-
const data = require("convert-source-map");
|
|
37
|
-
_convertSourceMap = function () {
|
|
38
|
-
return data;
|
|
39
|
-
};
|
|
40
|
-
return data;
|
|
41
|
-
}
|
|
42
|
-
var _file = require("./file/file.js");
|
|
43
|
-
var _index = require("../parser/index.js");
|
|
44
|
-
var _cloneDeep = require("./util/clone-deep.js");
|
|
45
|
-
const {
|
|
46
|
-
file,
|
|
47
|
-
traverseFast
|
|
48
|
-
} = _t();
|
|
49
|
-
const debug = _debug()("babel:transform:file");
|
|
50
|
-
const INLINE_SOURCEMAP_REGEX = /^[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,.*$/;
|
|
51
|
-
const EXTERNAL_SOURCEMAP_REGEX = /^[@#][ \t]+sourceMappingURL=([^\s'"`]+)[ \t]*$/;
|
|
52
|
-
function* normalizeFile(pluginPasses, options, code, ast) {
|
|
53
|
-
code = `${code || ""}`;
|
|
54
|
-
if (ast) {
|
|
55
|
-
if (ast.type === "Program") {
|
|
56
|
-
ast = file(ast, [], []);
|
|
57
|
-
} else if (ast.type !== "File") {
|
|
58
|
-
throw new Error("AST root must be a Program or File node");
|
|
59
|
-
}
|
|
60
|
-
if (options.cloneInputAst) {
|
|
61
|
-
ast = (0, _cloneDeep.default)(ast);
|
|
62
|
-
}
|
|
63
|
-
} else {
|
|
64
|
-
ast = yield* (0, _index.default)(pluginPasses, options, code);
|
|
65
|
-
}
|
|
66
|
-
let inputMap = null;
|
|
67
|
-
if (options.inputSourceMap !== false) {
|
|
68
|
-
if (typeof options.inputSourceMap === "object") {
|
|
69
|
-
inputMap = _convertSourceMap().fromObject(options.inputSourceMap);
|
|
70
|
-
}
|
|
71
|
-
if (!inputMap) {
|
|
72
|
-
const lastComment = extractComments(INLINE_SOURCEMAP_REGEX, ast);
|
|
73
|
-
if (lastComment) {
|
|
74
|
-
try {
|
|
75
|
-
inputMap = _convertSourceMap().fromComment("//" + lastComment);
|
|
76
|
-
} catch (err) {
|
|
77
|
-
debug("discarding unknown inline input sourcemap");
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
if (!inputMap) {
|
|
82
|
-
const lastComment = extractComments(EXTERNAL_SOURCEMAP_REGEX, ast);
|
|
83
|
-
if (typeof options.filename === "string" && lastComment) {
|
|
84
|
-
try {
|
|
85
|
-
const match = EXTERNAL_SOURCEMAP_REGEX.exec(lastComment);
|
|
86
|
-
const inputMapContent = _fs().readFileSync(_path().resolve(_path().dirname(options.filename), match[1]), "utf8");
|
|
87
|
-
inputMap = _convertSourceMap().fromJSON(inputMapContent);
|
|
88
|
-
} catch (err) {
|
|
89
|
-
debug("discarding unknown file input sourcemap", err);
|
|
90
|
-
}
|
|
91
|
-
} else if (lastComment) {
|
|
92
|
-
debug("discarding un-loadable file input sourcemap");
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
return new _file.default(options, {
|
|
97
|
-
code,
|
|
98
|
-
ast: ast,
|
|
99
|
-
inputMap
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
function extractCommentsFromList(regex, comments, lastComment) {
|
|
103
|
-
if (comments) {
|
|
104
|
-
comments = comments.filter(({
|
|
105
|
-
value
|
|
106
|
-
}) => {
|
|
107
|
-
if (regex.test(value)) {
|
|
108
|
-
lastComment = value;
|
|
109
|
-
return false;
|
|
110
|
-
}
|
|
111
|
-
return true;
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
return [comments, lastComment];
|
|
115
|
-
}
|
|
116
|
-
function extractComments(regex, ast) {
|
|
117
|
-
let lastComment = null;
|
|
118
|
-
traverseFast(ast, node => {
|
|
119
|
-
[node.leadingComments, lastComment] = extractCommentsFromList(regex, node.leadingComments, lastComment);
|
|
120
|
-
[node.innerComments, lastComment] = extractCommentsFromList(regex, node.innerComments, lastComment);
|
|
121
|
-
[node.trailingComments, lastComment] = extractCommentsFromList(regex, node.trailingComments, lastComment);
|
|
122
|
-
});
|
|
123
|
-
return lastComment;
|
|
124
|
-
}
|
|
125
|
-
0 && 0;
|
|
126
|
-
|
|
127
|
-
//# sourceMappingURL=normalize-file.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_fs","data","require","_path","_debug","_t","_convertSourceMap","_file","_index","_cloneDeep","file","traverseFast","debug","buildDebug","INLINE_SOURCEMAP_REGEX","EXTERNAL_SOURCEMAP_REGEX","normalizeFile","pluginPasses","options","code","ast","type","Error","cloneInputAst","cloneDeep","parser","inputMap","inputSourceMap","convertSourceMap","fromObject","lastComment","extractComments","fromComment","err","filename","match","exec","inputMapContent","fs","readFileSync","path","resolve","dirname","fromJSON","File","extractCommentsFromList","regex","comments","filter","value","test","node","leadingComments","innerComments","trailingComments"],"sources":["../../src/transformation/normalize-file.ts"],"sourcesContent":["import fs from \"node:fs\";\nimport path from \"node:path\";\nimport buildDebug from \"debug\";\nimport type { Handler } from \"gensync\";\nimport { file, traverseFast } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport type { PluginPasses } from \"../config/index.ts\";\nimport convertSourceMap from \"convert-source-map\";\nimport type { SourceMapConverter as Converter } from \"convert-source-map\";\nimport File from \"./file/file.ts\";\nimport parser from \"../parser/index.ts\";\nimport cloneDeep from \"./util/clone-deep.ts\";\nimport type { ResolvedOptions } from \"../config/validation/options.ts\";\n\nconst debug = buildDebug(\"babel:transform:file\");\n\n// These regexps are copied from the convert-source-map package,\n// but without // or /* at the beginning of the comment.\n\nconst INLINE_SOURCEMAP_REGEX =\n /^[@#]\\s+sourceMappingURL=data:(?:application|text)\\/json;(?:charset[:=]\\S+?;)?base64,.*$/;\nconst EXTERNAL_SOURCEMAP_REGEX =\n /^[@#][ \\t]+sourceMappingURL=([^\\s'\"`]+)[ \\t]*$/;\n\nexport type NormalizedFile = {\n code: string;\n ast: t.File;\n inputMap: Converter | null;\n};\n\nexport default function* normalizeFile(\n pluginPasses: PluginPasses,\n options: ResolvedOptions,\n code: string,\n ast?: t.File | t.Program | null,\n): Handler<File> {\n code = `${code || \"\"}`;\n\n if (ast) {\n if (ast.type === \"Program\") {\n ast = file(ast, [], []);\n } else if (ast.type !== \"File\") {\n throw new Error(\"AST root must be a Program or File node\");\n }\n\n if (options.cloneInputAst) {\n ast = cloneDeep(ast);\n }\n } else {\n ast = yield* parser(pluginPasses, options, code);\n }\n\n let inputMap = null;\n if (options.inputSourceMap !== false) {\n // If an explicit object is passed in, it overrides the processing of\n // source maps that may be in the file itself.\n if (typeof options.inputSourceMap === \"object\") {\n inputMap = convertSourceMap.fromObject(options.inputSourceMap);\n }\n\n if (!inputMap) {\n const lastComment = extractComments(INLINE_SOURCEMAP_REGEX, ast);\n if (lastComment) {\n try {\n inputMap = convertSourceMap.fromComment(\"//\" + lastComment);\n } catch (err) {\n if (process.env.BABEL_8_BREAKING) {\n console.warn(\n \"discarding unknown inline input sourcemap\",\n options.filename,\n err,\n );\n } else {\n debug(\"discarding unknown inline input sourcemap\");\n }\n }\n }\n }\n\n if (!inputMap) {\n const lastComment = extractComments(EXTERNAL_SOURCEMAP_REGEX, ast);\n if (typeof options.filename === \"string\" && lastComment) {\n try {\n // when `lastComment` is non-null, EXTERNAL_SOURCEMAP_REGEX must have matches\n const match: [string, string] = EXTERNAL_SOURCEMAP_REGEX.exec(\n lastComment,\n ) as any;\n const inputMapContent = fs.readFileSync(\n path.resolve(path.dirname(options.filename), match[1]),\n \"utf8\",\n );\n inputMap = convertSourceMap.fromJSON(inputMapContent);\n } catch (err) {\n debug(\"discarding unknown file input sourcemap\", err);\n }\n } else if (lastComment) {\n debug(\"discarding un-loadable file input sourcemap\");\n }\n }\n }\n\n return new File(options, {\n code,\n ast: ast,\n inputMap,\n });\n}\n\nfunction extractCommentsFromList(\n regex: RegExp,\n comments: t.Comment[],\n lastComment: string | null,\n): [t.Comment[], string | null] {\n if (comments) {\n comments = comments.filter(({ value }) => {\n if (regex.test(value)) {\n lastComment = value;\n return false;\n }\n return true;\n });\n }\n return [comments, lastComment];\n}\n\nfunction extractComments(regex: RegExp, ast: t.Node) {\n let lastComment: string = null;\n traverseFast(ast, node => {\n [node.leadingComments, lastComment] = extractCommentsFromList(\n regex,\n node.leadingComments,\n lastComment,\n );\n [node.innerComments, lastComment] = extractCommentsFromList(\n regex,\n node.innerComments,\n lastComment,\n );\n [node.trailingComments, lastComment] = extractCommentsFromList(\n regex,\n node.trailingComments,\n lastComment,\n );\n });\n return lastComment;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,IAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,GAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,MAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,OAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,MAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,GAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,EAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAK,kBAAA;EAAA,MAAAL,I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AC;MAAEC;IAAM,CAAC,KAAK;MACxC,IAAIH,KAAK,CAACI,IAAI,CAACD,KAAK,CAAC,EAAE;QACrBnB,WAAW,GAAGmB,KAAK;QACnB,OAAO,KAAK;MACd;MACA,OAAO,IAAI;IACb,CAAC,CAAC;EACJ;EACA,OAAO,CAACF,QAAQ,EAAEjB,WAAW,CAAC;AAChC;AAEA,SAASC,eAAeA,CAACe,KAAa,EAAE1B,GAAW,EAAE;EACnD,IAAIU,WAAmB,GAAG,IAAI;EAC9BnB,YAAY,CAACS,GAAG,EAAE+B,IAAI,IAAI;IACxB,CAACA,IAAI,CAACC,eAAe,EAAEtB,WAAW,CAAC,GAAGe,uBAAuB,CAC3DC,KAAK,EACLK,IAAI,CAACC,eAAe,EACpBtB,WACF,CAAC;IACD,CAACqB,IAAI,CAACE,aAAa,EAAEvB,WAAW,CAAC,GAAGe,uBAAuB,CACzDC,KAAK,EACLK,IAAI,CAACE,aAAa,EAClBvB,WACF,CAAC;IACD,CAACqB,IAAI,CAACG,gBAAgB,EAAExB,WAAW,CAAC,GAAGe,uBAAuB,CAC5DC,KAAK,EACLK,IAAI,CAACG,gBAAgB,EACrBxB,WACF,CAAC;EACH,CAAC,CAAC;EACF,OAAOA,WAAW;AACpB;AAAC","ignoreList":[]}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = normalizeOptions;
|
|
7
|
-
function _path() {
|
|
8
|
-
const data = require("path");
|
|
9
|
-
_path = function () {
|
|
10
|
-
return data;
|
|
11
|
-
};
|
|
12
|
-
return data;
|
|
13
|
-
}
|
|
14
|
-
function normalizeOptions(config) {
|
|
15
|
-
const {
|
|
16
|
-
filename,
|
|
17
|
-
cwd,
|
|
18
|
-
filenameRelative = typeof filename === "string" ? _path().relative(cwd, filename) : "unknown",
|
|
19
|
-
sourceType = "module",
|
|
20
|
-
inputSourceMap,
|
|
21
|
-
sourceMaps = !!inputSourceMap,
|
|
22
|
-
sourceRoot = config.options.moduleRoot,
|
|
23
|
-
sourceFileName = _path().basename(filenameRelative),
|
|
24
|
-
comments = true,
|
|
25
|
-
compact = "auto"
|
|
26
|
-
} = config.options;
|
|
27
|
-
const opts = config.options;
|
|
28
|
-
const options = Object.assign({}, opts, {
|
|
29
|
-
parserOpts: Object.assign({
|
|
30
|
-
sourceType: _path().extname(filenameRelative) === ".mjs" ? "module" : sourceType,
|
|
31
|
-
sourceFileName: filename,
|
|
32
|
-
plugins: []
|
|
33
|
-
}, opts.parserOpts),
|
|
34
|
-
generatorOpts: Object.assign({
|
|
35
|
-
filename,
|
|
36
|
-
auxiliaryCommentBefore: opts.auxiliaryCommentBefore,
|
|
37
|
-
auxiliaryCommentAfter: opts.auxiliaryCommentAfter,
|
|
38
|
-
retainLines: opts.retainLines,
|
|
39
|
-
comments,
|
|
40
|
-
shouldPrintComment: opts.shouldPrintComment,
|
|
41
|
-
compact,
|
|
42
|
-
minified: opts.minified,
|
|
43
|
-
sourceMaps: !!sourceMaps,
|
|
44
|
-
sourceRoot,
|
|
45
|
-
sourceFileName
|
|
46
|
-
}, opts.generatorOpts)
|
|
47
|
-
});
|
|
48
|
-
for (const plugins of config.passes) {
|
|
49
|
-
for (const plugin of plugins) {
|
|
50
|
-
if (plugin.manipulateOptions) {
|
|
51
|
-
plugin.manipulateOptions(options, options.parserOpts);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return options;
|
|
56
|
-
}
|
|
57
|
-
0 && 0;
|
|
58
|
-
|
|
59
|
-
//# sourceMappingURL=normalize-opts.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_path","data","require","normalizeOptions","config","filename","cwd","filenameRelative","path","relative","sourceType","inputSourceMap","sourceMaps","sourceRoot","options","moduleRoot","sourceFileName","basename","comments","compact","opts","Object","assign","parserOpts","extname","plugins","generatorOpts","auxiliaryCommentBefore","auxiliaryCommentAfter","retainLines","shouldPrintComment","minified","passes","plugin","manipulateOptions"],"sources":["../../src/transformation/normalize-opts.ts"],"sourcesContent":["import path from \"node:path\";\nimport type { ResolvedConfig } from \"../config/index.ts\";\nimport type { ResolvedOptions } from \"../config/validation/options.ts\";\n\nexport default function normalizeOptions(\n config: ResolvedConfig,\n): ResolvedOptions {\n const {\n filename,\n cwd,\n filenameRelative = typeof filename === \"string\"\n ? path.relative(cwd, filename)\n : \"unknown\",\n sourceType = \"module\",\n inputSourceMap,\n sourceMaps = !!inputSourceMap,\n sourceRoot = process.env.BABEL_8_BREAKING\n ? undefined\n : // @ts-ignore(Babel 7 vs Babel 8) moduleRoot is a Babel 7 option\n config.options.moduleRoot,\n\n sourceFileName = path.basename(filenameRelative),\n\n comments = true,\n compact = \"auto\",\n } = config.options;\n\n const opts = config.options;\n\n const options: ResolvedOptions = {\n ...opts,\n\n parserOpts: {\n sourceType:\n path.extname(filenameRelative) === \".mjs\" ? \"module\" : sourceType,\n\n // @ts-expect-error We should have passed `sourceFilename` here\n // pending https://github.com/babel/babel/issues/15917#issuecomment-2789278964\n sourceFileName: filename,\n plugins: [],\n ...opts.parserOpts,\n },\n\n generatorOpts: {\n // General generator flags.\n filename,\n\n auxiliaryCommentBefore: opts.auxiliaryCommentBefore,\n auxiliaryCommentAfter: opts.auxiliaryCommentAfter,\n retainLines: opts.retainLines,\n comments,\n shouldPrintComment: opts.shouldPrintComment,\n compact,\n minified: opts.minified,\n\n // Source-map generation flags.\n // babel-generator does not differentiate between `true`, `\"inline\"` or `\"both\"`\n sourceMaps: !!sourceMaps,\n sourceRoot,\n sourceFileName,\n\n ...opts.generatorOpts,\n },\n };\n\n for (const plugins of config.passes) {\n for (const plugin of plugins) {\n if (plugin.manipulateOptions) {\n plugin.manipulateOptions(options, options.parserOpts);\n }\n }\n }\n\n return options;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAA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CAACA,UAAU;MACxBC,UAAU;MACVG;IAAc,GAEXI,IAAI,CAACM,aAAa;EACtB,EACF;EAED,KAAK,MAAMD,OAAO,IAAIrB,MAAM,CAAC4B,MAAM,EAAE;IACnC,KAAK,MAAMC,MAAM,IAAIR,OAAO,EAAE;MAC5B,IAAIQ,MAAM,CAACC,iBAAiB,EAAE;QAC5BD,MAAM,CAACC,iBAAiB,CAACpB,OAAO,EAAEA,OAAO,CAACS,UAAU,CAAC;MACvD;IACF;EACF;EAEA,OAAOT,OAAO;AAChB;AAAC","ignoreList":[]}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
class PluginPass {
|
|
8
|
-
constructor(file, key, options, isAsync) {
|
|
9
|
-
this._map = new Map();
|
|
10
|
-
this.key = void 0;
|
|
11
|
-
this.file = void 0;
|
|
12
|
-
this.opts = void 0;
|
|
13
|
-
this.cwd = void 0;
|
|
14
|
-
this.filename = void 0;
|
|
15
|
-
this.isAsync = void 0;
|
|
16
|
-
this.key = key;
|
|
17
|
-
this.file = file;
|
|
18
|
-
this.opts = options || {};
|
|
19
|
-
this.cwd = file.opts.cwd;
|
|
20
|
-
this.filename = file.opts.filename;
|
|
21
|
-
this.isAsync = isAsync;
|
|
22
|
-
}
|
|
23
|
-
set(key, val) {
|
|
24
|
-
this._map.set(key, val);
|
|
25
|
-
}
|
|
26
|
-
get(key) {
|
|
27
|
-
return this._map.get(key);
|
|
28
|
-
}
|
|
29
|
-
availableHelper(name, versionRange) {
|
|
30
|
-
return this.file.availableHelper(name, versionRange);
|
|
31
|
-
}
|
|
32
|
-
addHelper(name) {
|
|
33
|
-
return this.file.addHelper(name);
|
|
34
|
-
}
|
|
35
|
-
buildCodeFrameError(node, msg, _Error) {
|
|
36
|
-
return this.file.buildCodeFrameError(node, msg, _Error);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
exports.default = PluginPass;
|
|
40
|
-
PluginPass.prototype.getModuleName = function getModuleName() {
|
|
41
|
-
return this.file.getModuleName();
|
|
42
|
-
};
|
|
43
|
-
PluginPass.prototype.addImport = function addImport() {
|
|
44
|
-
this.file.addImport();
|
|
45
|
-
};
|
|
46
|
-
0 && 0;
|
|
47
|
-
|
|
48
|
-
//# sourceMappingURL=plugin-pass.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["PluginPass","constructor","file","key","options","isAsync","_map","Map","opts","cwd","filename","set","val","get","availableHelper","name","versionRange","addHelper","buildCodeFrameError","node","msg","_Error","exports","default","prototype","getModuleName","addImport"],"sources":["../../src/transformation/plugin-pass.ts"],"sourcesContent":["import type * as t from \"@babel/types\";\nimport type File from \"./file/file.ts\";\n\nexport default class PluginPass<Options = object> {\n _map = new Map<unknown, unknown>();\n key: string | undefined | null;\n file: File;\n opts: Partial<Options>;\n\n /**\n * The working directory that Babel's programmatic options are loaded\n * relative to.\n */\n cwd: string;\n\n /** The absolute path of the file being compiled. */\n filename: string | void;\n\n /**\n * Is Babel executed in async mode or not.\n */\n isAsync: boolean;\n\n constructor(\n file: File,\n key: string | null,\n options: Options | undefined,\n isAsync: boolean,\n ) {\n this.key = key;\n this.file = file;\n this.opts = options || {};\n this.cwd = file.opts.cwd;\n this.filename = file.opts.filename;\n this.isAsync = isAsync;\n }\n\n set(key: unknown, val: unknown) {\n this._map.set(key, val);\n }\n\n get(key: unknown): any {\n return this._map.get(key);\n }\n\n availableHelper(name: string, versionRange?: string | null) {\n return this.file.availableHelper(name, versionRange);\n }\n\n addHelper(name: string) {\n return this.file.addHelper(name);\n }\n\n buildCodeFrameError(\n node: t.Node | undefined | null,\n msg: string,\n _Error?: typeof Error,\n ) {\n return this.file.buildCodeFrameError(node, msg, _Error);\n }\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n (PluginPass as any).prototype.getModuleName = function getModuleName(\n this: PluginPass,\n ): string | undefined {\n // @ts-expect-error only exists in Babel 7\n return this.file.getModuleName();\n };\n (PluginPass as any).prototype.addImport = function addImport(\n this: PluginPass,\n ): void {\n // @ts-expect-error only exists in Babel 7\n this.file.addImport();\n };\n}\n"],"mappings":";;;;;;AAGe,MAAMA,UAAU,CAAmB;EAoBhDC,WAAWA,CACTC,IAAU,EACVC,GAAkB,EAClBC,OAA4B,EAC5BC,OAAgB,EAChB;IAAA,KAxBFC,IAAI,GAAG,IAAIC,GAAG,CAAmB,CAAC;IAAA,KAClCJ,GAAG;IAAA,KACHD,IAAI;IAAA,KACJM,IAAI;IAAA,KAMJC,GAAG;IAAA,KAGHC,QAAQ;IAAA,KAKRL,OAAO;IAQL,IAAI,CAACF,GAAG,GAAGA,GAAG;IACd,IAAI,CAACD,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACM,IAAI,GAAGJ,OAAO,IAAI,CAAC,CAAC;IACzB,IAAI,CAACK,GAAG,GAAGP,IAAI,CAACM,IAAI,CAACC,GAAG;IACxB,IAAI,CAACC,QAAQ,GAAGR,IAAI,CAACM,IAAI,CAACE,QAAQ;IAClC,IAAI,CAACL,OAAO,GAAGA,OAAO;EACxB;EAEAM,GAAGA,CAACR,GAAY,EAAES,GAAY,EAAE;IAC9B,IAAI,CAACN,IAAI,CAACK,GAAG,CAACR,GAAG,EAAES,GAAG,CAAC;EACzB;EAEAC,GAAGA,CAACV,GAAY,EAAO;IACrB,OAAO,IAAI,CAACG,IAAI,CAACO,GAAG,CAACV,GAAG,CAAC;EAC3B;EAEAW,eAAeA,CAACC,IAAY,EAAEC,YAA4B,EAAE;IAC1D,OAAO,IAAI,CAACd,IAAI,CAACY,eAAe,CAACC,IAAI,EAAEC,YAAY,CAAC;EACtD;EAEAC,SAASA,CAACF,IAAY,EAAE;IACtB,OAAO,IAAI,CAACb,IAAI,CAACe,SAAS,CAACF,IAAI,CAAC;EAClC;EAEAG,mBAAmBA,CACjBC,IAA+B,EAC/BC,GAAW,EACXC,MAAqB,EACrB;IACA,OAAO,IAAI,CAACnB,IAAI,CAACgB,mBAAmB,CAACC,IAAI,EAAEC,GAAG,EAAEC,MAAM,CAAC;EACzD;AACF;AAACC,OAAA,CAAAC,OAAA,GAAAvB,UAAA;AAGEA,UAAU,CAASwB,SAAS,CAACC,aAAa,GAAG,SAASA,aAAaA,CAAA,EAE9C;EAEpB,OAAO,IAAI,CAACvB,IAAI,CAACuB,aAAa,CAAC,CAAC;AAClC,CAAC;AACAzB,UAAU,CAASwB,SAAS,CAACE,SAAS,GAAG,SAASA,SAASA,CAAA,EAEpD;EAEN,IAAI,CAACxB,IAAI,CAACwB,SAAS,CAAC,CAAC;AACvB,CAAC;AAAC","ignoreList":[]}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = _default;
|
|
7
|
-
const circleSet = new Set();
|
|
8
|
-
let depth = 0;
|
|
9
|
-
function deepClone(value, cache, allowCircle) {
|
|
10
|
-
if (value !== null) {
|
|
11
|
-
if (allowCircle) {
|
|
12
|
-
if (cache.has(value)) return cache.get(value);
|
|
13
|
-
} else if (++depth > 250) {
|
|
14
|
-
if (circleSet.has(value)) {
|
|
15
|
-
depth = 0;
|
|
16
|
-
circleSet.clear();
|
|
17
|
-
throw new Error("Babel-deepClone: Cycles are not allowed in AST");
|
|
18
|
-
}
|
|
19
|
-
circleSet.add(value);
|
|
20
|
-
}
|
|
21
|
-
let cloned;
|
|
22
|
-
if (Array.isArray(value)) {
|
|
23
|
-
cloned = new Array(value.length);
|
|
24
|
-
if (allowCircle) cache.set(value, cloned);
|
|
25
|
-
for (let i = 0; i < value.length; i++) {
|
|
26
|
-
cloned[i] = typeof value[i] !== "object" ? value[i] : deepClone(value[i], cache, allowCircle);
|
|
27
|
-
}
|
|
28
|
-
} else {
|
|
29
|
-
cloned = {};
|
|
30
|
-
if (allowCircle) cache.set(value, cloned);
|
|
31
|
-
const keys = Object.keys(value);
|
|
32
|
-
for (let i = 0; i < keys.length; i++) {
|
|
33
|
-
const key = keys[i];
|
|
34
|
-
cloned[key] = typeof value[key] !== "object" ? value[key] : deepClone(value[key], cache, allowCircle || key === "leadingComments" || key === "innerComments" || key === "trailingComments" || key === "extra");
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
if (!allowCircle) {
|
|
38
|
-
if (depth-- > 250) circleSet.delete(value);
|
|
39
|
-
}
|
|
40
|
-
return cloned;
|
|
41
|
-
}
|
|
42
|
-
return value;
|
|
43
|
-
}
|
|
44
|
-
function _default(value) {
|
|
45
|
-
if (typeof value !== "object") return value;
|
|
46
|
-
try {
|
|
47
|
-
return deepClone(value, new Map(), true);
|
|
48
|
-
} catch (_) {
|
|
49
|
-
return structuredClone(value);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
0 && 0;
|
|
53
|
-
|
|
54
|
-
//# sourceMappingURL=clone-deep.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["circleSet","Set","depth","deepClone","value","cache","allowCircle","has","get","clear","Error","add","cloned","Array","isArray","length","set","i","keys","Object","key","delete","_default","Map","_","structuredClone"],"sources":["../../../src/transformation/util/clone-deep.ts"],"sourcesContent":["const circleSet = new Set();\nlet depth = 0;\n// https://github.com/babel/babel/pull/14583#discussion_r882828856\nfunction deepClone(\n value: any,\n cache: Map<any, any>,\n allowCircle: boolean,\n): any {\n if (value !== null) {\n if (allowCircle) {\n if (cache.has(value)) return cache.get(value);\n } else if (++depth > 250) {\n if (circleSet.has(value)) {\n depth = 0;\n circleSet.clear();\n throw new Error(\"Babel-deepClone: Cycles are not allowed in AST\");\n }\n circleSet.add(value);\n }\n let cloned: any;\n if (Array.isArray(value)) {\n cloned = new Array(value.length);\n if (allowCircle) cache.set(value, cloned);\n for (let i = 0; i < value.length; i++) {\n cloned[i] =\n typeof value[i] !== \"object\"\n ? value[i]\n : deepClone(value[i], cache, allowCircle);\n }\n } else {\n cloned = {};\n if (allowCircle) cache.set(value, cloned);\n const keys = Object.keys(value);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n cloned[key] =\n typeof value[key] !== \"object\"\n ? value[key]\n : deepClone(\n value[key],\n cache,\n allowCircle ||\n key === \"leadingComments\" ||\n key === \"innerComments\" ||\n key === \"trailingComments\" ||\n key === \"extra\",\n );\n }\n }\n if (!allowCircle) {\n if (depth-- > 250) circleSet.delete(value);\n }\n return cloned;\n }\n return value;\n}\n\nexport default function <T>(value: T): T {\n if (typeof value !== \"object\") return value;\n\n if (process.env.BABEL_8_BREAKING) {\n if (!process.env.IS_PUBLISH && depth > 0) {\n throw new Error(\"depth > 0\");\n }\n return deepClone(value, new Map(), false);\n } else {\n try {\n return deepClone(value, new Map(), true);\n } catch (_) {\n return structuredClone(value);\n }\n }\n}\n"],"mappings":";;;;;;AAAA,MAAMA,SAAS,GAAG,IAAIC,GAAG,CAAC,CAAC;AAC3B,IAAIC,KAAK,GAAG,CAAC;AAEb,SAASC,SAASA,CAChBC,KAAU,EACVC,KAAoB,EACpBC,WAAoB,EACf;EACL,IAAIF,KAAK,KAAK,IAAI,EAAE;IAClB,IAAIE,WAAW,EAAE;MACf,IAAID,KAAK,CAACE,GAAG,CAACH,KAAK,CAAC,EAAE,OAAOC,KAAK,CAACG,GAAG,CAACJ,KAAK,CAAC;IAC/C,CAAC,MAAM,IAAI,EAAEF,KAAK,GAAG,GAAG,EAAE;MACxB,IAAIF,SAAS,CAACO,GAAG,CAACH,KAAK,CAAC,EAAE;QACxBF,KAAK,GAAG,CAAC;QACTF,SAAS,CAACS,KAAK,CAAC,CAAC;QACjB,MAAM,IAAIC,KAAK,CAAC,gDAAgD,CAAC;MACnE;MACAV,SAAS,CAACW,GAAG,CAACP,KAAK,CAAC;IACtB;IACA,IAAIQ,MAAW;IACf,IAAIC,KAAK,CAACC,OAAO,CAACV,KAAK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