@tachybase/module-cloud-component 0.23.8

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.
Files changed (109) hide show
  1. package/.turbo/turbo-build.log +9 -0
  2. package/README.md +1 -0
  3. package/client.d.ts +2 -0
  4. package/client.js +1 -0
  5. package/dist/client/CloudComponent.provider.d.ts +2 -0
  6. package/dist/client/cloud-library-manager/CloudLibrary.collection.d.ts +2 -0
  7. package/dist/client/cloud-library-manager/CloudLibraryManager.d.ts +2 -0
  8. package/dist/client/cloud-library-manager/CloudLibraryManager.fields.d.ts +82 -0
  9. package/dist/client/cloud-library-manager/CloudLibraryManager.schema.d.ts +1075 -0
  10. package/dist/client/components/CloudComponentLink.d.ts +2 -0
  11. package/dist/client/components/ComponentEditor.d.ts +6 -0
  12. package/dist/client/components/MarkdownEditor.d.ts +9 -0
  13. package/dist/client/components/Preview.d.ts +9 -0
  14. package/dist/client/index.d.ts +8 -0
  15. package/dist/client/index.js +1107 -0
  16. package/dist/client/locale.d.ts +9 -0
  17. package/dist/client/settings/CloudComponentBlock.d.ts +4 -0
  18. package/dist/client/settings/InitializerItem.d.ts +2 -0
  19. package/dist/client/settings/schema.d.ts +2 -0
  20. package/dist/client/settings/settings.d.ts +2 -0
  21. package/dist/externalVersion.js +15 -0
  22. package/dist/index.d.ts +2 -0
  23. package/dist/index.js +39 -0
  24. package/dist/locale/en-US.json +12 -0
  25. package/dist/locale/zh-CN.json +12 -0
  26. package/dist/node_modules/@babel/core/LICENSE +22 -0
  27. package/dist/node_modules/@babel/core/cjs-proxy.cjs +68 -0
  28. package/dist/node_modules/@babel/core/lib/config/cache-contexts.js +3 -0
  29. package/dist/node_modules/@babel/core/lib/config/caching.js +261 -0
  30. package/dist/node_modules/@babel/core/lib/config/config-chain.js +469 -0
  31. package/dist/node_modules/@babel/core/lib/config/config-descriptors.js +190 -0
  32. package/dist/node_modules/@babel/core/lib/config/files/configuration.js +287 -0
  33. package/dist/node_modules/@babel/core/lib/config/files/import.cjs +6 -0
  34. package/dist/node_modules/@babel/core/lib/config/files/index-browser.js +58 -0
  35. package/dist/node_modules/@babel/core/lib/config/files/index.js +78 -0
  36. package/dist/node_modules/@babel/core/lib/config/files/module-types.js +195 -0
  37. package/dist/node_modules/@babel/core/lib/config/files/package.js +61 -0
  38. package/dist/node_modules/@babel/core/lib/config/files/plugins.js +229 -0
  39. package/dist/node_modules/@babel/core/lib/config/files/types.js +3 -0
  40. package/dist/node_modules/@babel/core/lib/config/files/utils.js +36 -0
  41. package/dist/node_modules/@babel/core/lib/config/full.js +312 -0
  42. package/dist/node_modules/@babel/core/lib/config/helpers/config-api.js +84 -0
  43. package/dist/node_modules/@babel/core/lib/config/helpers/deep-array.js +23 -0
  44. package/dist/node_modules/@babel/core/lib/config/helpers/environment.js +12 -0
  45. package/dist/node_modules/@babel/core/lib/config/index.js +93 -0
  46. package/dist/node_modules/@babel/core/lib/config/item.js +67 -0
  47. package/dist/node_modules/@babel/core/lib/config/partial.js +158 -0
  48. package/dist/node_modules/@babel/core/lib/config/pattern-to-regex.js +38 -0
  49. package/dist/node_modules/@babel/core/lib/config/plugin.js +33 -0
  50. package/dist/node_modules/@babel/core/lib/config/printer.js +113 -0
  51. package/dist/node_modules/@babel/core/lib/config/resolve-targets-browser.js +41 -0
  52. package/dist/node_modules/@babel/core/lib/config/resolve-targets.js +61 -0
  53. package/dist/node_modules/@babel/core/lib/config/util.js +31 -0
  54. package/dist/node_modules/@babel/core/lib/config/validation/option-assertions.js +277 -0
  55. package/dist/node_modules/@babel/core/lib/config/validation/options.js +189 -0
  56. package/dist/node_modules/@babel/core/lib/config/validation/plugins.js +67 -0
  57. package/dist/node_modules/@babel/core/lib/config/validation/removed.js +68 -0
  58. package/dist/node_modules/@babel/core/lib/errors/config-error.js +18 -0
  59. package/dist/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js +98 -0
  60. package/dist/node_modules/@babel/core/lib/gensync-utils/async.js +90 -0
  61. package/dist/node_modules/@babel/core/lib/gensync-utils/fs.js +31 -0
  62. package/dist/node_modules/@babel/core/lib/gensync-utils/functional.js +58 -0
  63. package/dist/node_modules/@babel/core/lib/index.js +227 -0
  64. package/dist/node_modules/@babel/core/lib/parse.js +47 -0
  65. package/dist/node_modules/@babel/core/lib/parser/index.js +79 -0
  66. package/dist/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js +339 -0
  67. package/dist/node_modules/@babel/core/lib/tools/build-external-helpers.js +144 -0
  68. package/dist/node_modules/@babel/core/lib/transform-ast.js +50 -0
  69. package/dist/node_modules/@babel/core/lib/transform-file-browser.js +23 -0
  70. package/dist/node_modules/@babel/core/lib/transform-file.js +40 -0
  71. package/dist/node_modules/@babel/core/lib/transform.js +49 -0
  72. package/dist/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js +84 -0
  73. package/dist/node_modules/@babel/core/lib/transformation/file/babel-7-helpers.cjs +4 -0
  74. package/dist/node_modules/@babel/core/lib/transformation/file/file.js +214 -0
  75. package/dist/node_modules/@babel/core/lib/transformation/file/generate.js +84 -0
  76. package/dist/node_modules/@babel/core/lib/transformation/file/merge-map.js +37 -0
  77. package/dist/node_modules/@babel/core/lib/transformation/index.js +92 -0
  78. package/dist/node_modules/@babel/core/lib/transformation/normalize-file.js +129 -0
  79. package/dist/node_modules/@babel/core/lib/transformation/normalize-opts.js +59 -0
  80. package/dist/node_modules/@babel/core/lib/transformation/plugin-pass.js +50 -0
  81. package/dist/node_modules/@babel/core/lib/transformation/util/clone-deep.js +36 -0
  82. package/dist/node_modules/@babel/core/lib/vendor/import-meta-resolve.js +1043 -0
  83. package/dist/node_modules/@babel/core/node_modules/.bin/json5 +17 -0
  84. package/dist/node_modules/@babel/core/node_modules/.bin/parser +17 -0
  85. package/dist/node_modules/@babel/core/node_modules/.bin/semver +17 -0
  86. package/dist/node_modules/@babel/core/package.json +1 -0
  87. package/dist/node_modules/@babel/core/src/config/files/index-browser.ts +113 -0
  88. package/dist/node_modules/@babel/core/src/config/files/index.ts +29 -0
  89. package/dist/node_modules/@babel/core/src/config/resolve-targets-browser.ts +40 -0
  90. package/dist/node_modules/@babel/core/src/config/resolve-targets.ts +56 -0
  91. package/dist/node_modules/@babel/core/src/transform-file-browser.ts +31 -0
  92. package/dist/node_modules/@babel/core/src/transform-file.ts +55 -0
  93. package/dist/server/actions/cloud-libraries-controller.d.ts +7 -0
  94. package/dist/server/actions/cloud-libraries-controller.js +147 -0
  95. package/dist/server/collections/cloud-libraries.d.ts +2 -0
  96. package/dist/server/collections/cloud-libraries.js +98 -0
  97. package/dist/server/collections/effect-libraries.d.ts +2 -0
  98. package/dist/server/collections/effect-libraries.js +78 -0
  99. package/dist/server/index.d.ts +1 -0
  100. package/dist/server/index.js +33 -0
  101. package/dist/server/plugin.d.ts +4 -0
  102. package/dist/server/plugin.js +87 -0
  103. package/dist/server/services/cloud-compiler.d.ts +8 -0
  104. package/dist/server/services/cloud-compiler.js +116 -0
  105. package/dist/server/services/cloud-libraries-service.d.ts +11 -0
  106. package/dist/server/services/cloud-libraries-service.js +196 -0
  107. package/package.json +44 -0
  108. package/server.d.ts +2 -0
  109. package/server.js +1 -0
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.parse = void 0;
7
+ exports.parseAsync = parseAsync;
8
+ exports.parseSync = parseSync;
9
+ function _gensync() {
10
+ const data = require("gensync");
11
+ _gensync = function () {
12
+ return data;
13
+ };
14
+ return data;
15
+ }
16
+ var _index = require("./config/index.js");
17
+ var _index2 = require("./parser/index.js");
18
+ var _normalizeOpts = require("./transformation/normalize-opts.js");
19
+ var _rewriteStackTrace = require("./errors/rewrite-stack-trace.js");
20
+ const parseRunner = _gensync()(function* parse(code, opts) {
21
+ const config = yield* (0, _index.default)(opts);
22
+ if (config === null) {
23
+ return null;
24
+ }
25
+ return yield* (0, _index2.default)(config.passes, (0, _normalizeOpts.default)(config), code);
26
+ });
27
+ const parse = exports.parse = function parse(code, opts, callback) {
28
+ if (typeof opts === "function") {
29
+ callback = opts;
30
+ opts = undefined;
31
+ }
32
+ if (callback === undefined) {
33
+ {
34
+ return (0, _rewriteStackTrace.beginHiddenCallStack)(parseRunner.sync)(code, opts);
35
+ }
36
+ }
37
+ (0, _rewriteStackTrace.beginHiddenCallStack)(parseRunner.errback)(code, opts, callback);
38
+ };
39
+ function parseSync(...args) {
40
+ return (0, _rewriteStackTrace.beginHiddenCallStack)(parseRunner.sync)(...args);
41
+ }
42
+ function parseAsync(...args) {
43
+ return (0, _rewriteStackTrace.beginHiddenCallStack)(parseRunner.async)(...args);
44
+ }
45
+ 0 && 0;
46
+
47
+ //# sourceMappingURL=parse.js.map
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = parser;
7
+ function _parser() {
8
+ const data = require("@babel/parser");
9
+ _parser = function () {
10
+ return data;
11
+ };
12
+ return data;
13
+ }
14
+ function _codeFrame() {
15
+ const data = require("@babel/code-frame");
16
+ _codeFrame = function () {
17
+ return data;
18
+ };
19
+ return data;
20
+ }
21
+ var _missingPluginHelper = require("./util/missing-plugin-helper.js");
22
+ function* parser(pluginPasses, {
23
+ parserOpts,
24
+ highlightCode = true,
25
+ filename = "unknown"
26
+ }, code) {
27
+ try {
28
+ const results = [];
29
+ for (const plugins of pluginPasses) {
30
+ for (const plugin of plugins) {
31
+ const {
32
+ parserOverride
33
+ } = plugin;
34
+ if (parserOverride) {
35
+ const ast = parserOverride(code, parserOpts, _parser().parse);
36
+ if (ast !== undefined) results.push(ast);
37
+ }
38
+ }
39
+ }
40
+ if (results.length === 0) {
41
+ return (0, _parser().parse)(code, parserOpts);
42
+ } else if (results.length === 1) {
43
+ yield* [];
44
+ if (typeof results[0].then === "function") {
45
+ throw new Error(`You appear to be using an async parser plugin, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, you may need to upgrade ` + `your @babel/core version.`);
46
+ }
47
+ return results[0];
48
+ }
49
+ throw new Error("More than one plugin attempted to override parsing.");
50
+ } catch (err) {
51
+ if (err.code === "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED") {
52
+ err.message += "\nConsider renaming the file to '.mjs', or setting sourceType:module " + "or sourceType:unambiguous in your Babel config for this file.";
53
+ }
54
+ const {
55
+ loc,
56
+ missingPlugin
57
+ } = err;
58
+ if (loc) {
59
+ const codeFrame = (0, _codeFrame().codeFrameColumns)(code, {
60
+ start: {
61
+ line: loc.line,
62
+ column: loc.column + 1
63
+ }
64
+ }, {
65
+ highlightCode
66
+ });
67
+ if (missingPlugin) {
68
+ err.message = `${filename}: ` + (0, _missingPluginHelper.default)(missingPlugin[0], loc, codeFrame, filename);
69
+ } else {
70
+ err.message = `${filename}: ${err.message}\n\n` + codeFrame;
71
+ }
72
+ err.code = "BABEL_PARSE_ERROR";
73
+ }
74
+ throw err;
75
+ }
76
+ }
77
+ 0 && 0;
78
+
79
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,339 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = generateMissingPluginMessage;
7
+ const pluginNameMap = {
8
+ asyncDoExpressions: {
9
+ syntax: {
10
+ name: "@babel/plugin-syntax-async-do-expressions",
11
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-async-do-expressions"
12
+ }
13
+ },
14
+ decimal: {
15
+ syntax: {
16
+ name: "@babel/plugin-syntax-decimal",
17
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-decimal"
18
+ }
19
+ },
20
+ decorators: {
21
+ syntax: {
22
+ name: "@babel/plugin-syntax-decorators",
23
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-decorators"
24
+ },
25
+ transform: {
26
+ name: "@babel/plugin-proposal-decorators",
27
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-decorators"
28
+ }
29
+ },
30
+ doExpressions: {
31
+ syntax: {
32
+ name: "@babel/plugin-syntax-do-expressions",
33
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-do-expressions"
34
+ },
35
+ transform: {
36
+ name: "@babel/plugin-proposal-do-expressions",
37
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-do-expressions"
38
+ }
39
+ },
40
+ exportDefaultFrom: {
41
+ syntax: {
42
+ name: "@babel/plugin-syntax-export-default-from",
43
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-export-default-from"
44
+ },
45
+ transform: {
46
+ name: "@babel/plugin-proposal-export-default-from",
47
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-export-default-from"
48
+ }
49
+ },
50
+ flow: {
51
+ syntax: {
52
+ name: "@babel/plugin-syntax-flow",
53
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-flow"
54
+ },
55
+ transform: {
56
+ name: "@babel/preset-flow",
57
+ url: "https://github.com/babel/babel/tree/main/packages/babel-preset-flow"
58
+ }
59
+ },
60
+ functionBind: {
61
+ syntax: {
62
+ name: "@babel/plugin-syntax-function-bind",
63
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-function-bind"
64
+ },
65
+ transform: {
66
+ name: "@babel/plugin-proposal-function-bind",
67
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-function-bind"
68
+ }
69
+ },
70
+ functionSent: {
71
+ syntax: {
72
+ name: "@babel/plugin-syntax-function-sent",
73
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-function-sent"
74
+ },
75
+ transform: {
76
+ name: "@babel/plugin-proposal-function-sent",
77
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-function-sent"
78
+ }
79
+ },
80
+ jsx: {
81
+ syntax: {
82
+ name: "@babel/plugin-syntax-jsx",
83
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-jsx"
84
+ },
85
+ transform: {
86
+ name: "@babel/preset-react",
87
+ url: "https://github.com/babel/babel/tree/main/packages/babel-preset-react"
88
+ }
89
+ },
90
+ pipelineOperator: {
91
+ syntax: {
92
+ name: "@babel/plugin-syntax-pipeline-operator",
93
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-pipeline-operator"
94
+ },
95
+ transform: {
96
+ name: "@babel/plugin-proposal-pipeline-operator",
97
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-pipeline-operator"
98
+ }
99
+ },
100
+ recordAndTuple: {
101
+ syntax: {
102
+ name: "@babel/plugin-syntax-record-and-tuple",
103
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-record-and-tuple"
104
+ }
105
+ },
106
+ throwExpressions: {
107
+ syntax: {
108
+ name: "@babel/plugin-syntax-throw-expressions",
109
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-throw-expressions"
110
+ },
111
+ transform: {
112
+ name: "@babel/plugin-proposal-throw-expressions",
113
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-throw-expressions"
114
+ }
115
+ },
116
+ typescript: {
117
+ syntax: {
118
+ name: "@babel/plugin-syntax-typescript",
119
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-typescript"
120
+ },
121
+ transform: {
122
+ name: "@babel/preset-typescript",
123
+ url: "https://github.com/babel/babel/tree/main/packages/babel-preset-typescript"
124
+ }
125
+ }
126
+ };
127
+ {
128
+ Object.assign(pluginNameMap, {
129
+ asyncGenerators: {
130
+ syntax: {
131
+ name: "@babel/plugin-syntax-async-generators",
132
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-async-generators"
133
+ },
134
+ transform: {
135
+ name: "@babel/plugin-transform-async-generator-functions",
136
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-async-generator-functions"
137
+ }
138
+ },
139
+ classProperties: {
140
+ syntax: {
141
+ name: "@babel/plugin-syntax-class-properties",
142
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties"
143
+ },
144
+ transform: {
145
+ name: "@babel/plugin-transform-class-properties",
146
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-class-properties"
147
+ }
148
+ },
149
+ classPrivateProperties: {
150
+ syntax: {
151
+ name: "@babel/plugin-syntax-class-properties",
152
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties"
153
+ },
154
+ transform: {
155
+ name: "@babel/plugin-transform-class-properties",
156
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-class-properties"
157
+ }
158
+ },
159
+ classPrivateMethods: {
160
+ syntax: {
161
+ name: "@babel/plugin-syntax-class-properties",
162
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties"
163
+ },
164
+ transform: {
165
+ name: "@babel/plugin-transform-private-methods",
166
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-private-methods"
167
+ }
168
+ },
169
+ classStaticBlock: {
170
+ syntax: {
171
+ name: "@babel/plugin-syntax-class-static-block",
172
+ url: "https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-syntax-class-static-block"
173
+ },
174
+ transform: {
175
+ name: "@babel/plugin-transform-class-static-block",
176
+ url: "https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-class-static-block"
177
+ }
178
+ },
179
+ dynamicImport: {
180
+ syntax: {
181
+ name: "@babel/plugin-syntax-dynamic-import",
182
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-dynamic-import"
183
+ }
184
+ },
185
+ exportNamespaceFrom: {
186
+ syntax: {
187
+ name: "@babel/plugin-syntax-export-namespace-from",
188
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-export-namespace-from"
189
+ },
190
+ transform: {
191
+ name: "@babel/plugin-transform-export-namespace-from",
192
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-export-namespace-from"
193
+ }
194
+ },
195
+ importAssertions: {
196
+ syntax: {
197
+ name: "@babel/plugin-syntax-import-assertions",
198
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-assertions"
199
+ }
200
+ },
201
+ importAttributes: {
202
+ syntax: {
203
+ name: "@babel/plugin-syntax-import-attributes",
204
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-attributes"
205
+ }
206
+ },
207
+ importMeta: {
208
+ syntax: {
209
+ name: "@babel/plugin-syntax-import-meta",
210
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-meta"
211
+ }
212
+ },
213
+ logicalAssignment: {
214
+ syntax: {
215
+ name: "@babel/plugin-syntax-logical-assignment-operators",
216
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-logical-assignment-operators"
217
+ },
218
+ transform: {
219
+ name: "@babel/plugin-transform-logical-assignment-operators",
220
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-logical-assignment-operators"
221
+ }
222
+ },
223
+ moduleStringNames: {
224
+ syntax: {
225
+ name: "@babel/plugin-syntax-module-string-names",
226
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-module-string-names"
227
+ }
228
+ },
229
+ numericSeparator: {
230
+ syntax: {
231
+ name: "@babel/plugin-syntax-numeric-separator",
232
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-numeric-separator"
233
+ },
234
+ transform: {
235
+ name: "@babel/plugin-transform-numeric-separator",
236
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-numeric-separator"
237
+ }
238
+ },
239
+ nullishCoalescingOperator: {
240
+ syntax: {
241
+ name: "@babel/plugin-syntax-nullish-coalescing-operator",
242
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-nullish-coalescing-operator"
243
+ },
244
+ transform: {
245
+ name: "@babel/plugin-transform-nullish-coalescing-operator",
246
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-nullish-coalescing-opearator"
247
+ }
248
+ },
249
+ objectRestSpread: {
250
+ syntax: {
251
+ name: "@babel/plugin-syntax-object-rest-spread",
252
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-object-rest-spread"
253
+ },
254
+ transform: {
255
+ name: "@babel/plugin-transform-object-rest-spread",
256
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-object-rest-spread"
257
+ }
258
+ },
259
+ optionalCatchBinding: {
260
+ syntax: {
261
+ name: "@babel/plugin-syntax-optional-catch-binding",
262
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-optional-catch-binding"
263
+ },
264
+ transform: {
265
+ name: "@babel/plugin-transform-optional-catch-binding",
266
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-optional-catch-binding"
267
+ }
268
+ },
269
+ optionalChaining: {
270
+ syntax: {
271
+ name: "@babel/plugin-syntax-optional-chaining",
272
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-optional-chaining"
273
+ },
274
+ transform: {
275
+ name: "@babel/plugin-transform-optional-chaining",
276
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-optional-chaining"
277
+ }
278
+ },
279
+ privateIn: {
280
+ syntax: {
281
+ name: "@babel/plugin-syntax-private-property-in-object",
282
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-private-property-in-object"
283
+ },
284
+ transform: {
285
+ name: "@babel/plugin-transform-private-property-in-object",
286
+ url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-private-property-in-object"
287
+ }
288
+ },
289
+ regexpUnicodeSets: {
290
+ syntax: {
291
+ name: "@babel/plugin-syntax-unicode-sets-regex",
292
+ url: "https://github.com/babel/babel/blob/main/packages/babel-plugin-syntax-unicode-sets-regex/README.md"
293
+ },
294
+ transform: {
295
+ name: "@babel/plugin-transform-unicode-sets-regex",
296
+ url: "https://github.com/babel/babel/blob/main/packages/babel-plugin-proposalunicode-sets-regex/README.md"
297
+ }
298
+ }
299
+ });
300
+ }
301
+ const getNameURLCombination = ({
302
+ name,
303
+ url
304
+ }) => `${name} (${url})`;
305
+ function generateMissingPluginMessage(missingPluginName, loc, codeFrame, filename) {
306
+ let helpMessage = `Support for the experimental syntax '${missingPluginName}' isn't currently enabled ` + `(${loc.line}:${loc.column + 1}):\n\n` + codeFrame;
307
+ const pluginInfo = pluginNameMap[missingPluginName];
308
+ if (pluginInfo) {
309
+ const {
310
+ syntax: syntaxPlugin,
311
+ transform: transformPlugin
312
+ } = pluginInfo;
313
+ if (syntaxPlugin) {
314
+ const syntaxPluginInfo = getNameURLCombination(syntaxPlugin);
315
+ if (transformPlugin) {
316
+ const transformPluginInfo = getNameURLCombination(transformPlugin);
317
+ const sectionType = transformPlugin.name.startsWith("@babel/plugin") ? "plugins" : "presets";
318
+ helpMessage += `\n\nAdd ${transformPluginInfo} to the '${sectionType}' section of your Babel config to enable transformation.
319
+ If you want to leave it as-is, add ${syntaxPluginInfo} to the 'plugins' section to enable parsing.`;
320
+ } else {
321
+ helpMessage += `\n\nAdd ${syntaxPluginInfo} to the 'plugins' section of your Babel config ` + `to enable parsing.`;
322
+ }
323
+ }
324
+ }
325
+ const msgFilename = filename === "unknown" ? "<name of the input file>" : filename;
326
+ helpMessage += `
327
+
328
+ If you already added the plugin for this syntax to your config, it's possible that your config \
329
+ isn't being loaded.
330
+ You can re-run Babel with the BABEL_SHOW_CONFIG_FOR environment variable to show the loaded \
331
+ configuration:
332
+ \tnpx cross-env BABEL_SHOW_CONFIG_FOR=${msgFilename} <your build command>
333
+ See https://babeljs.io/docs/configuration#print-effective-configs for more info.
334
+ `;
335
+ return helpMessage;
336
+ }
337
+ 0 && 0;
338
+
339
+ //# sourceMappingURL=missing-plugin-helper.js.map
@@ -0,0 +1,144 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = _default;
7
+ function helpers() {
8
+ const data = require("@babel/helpers");
9
+ helpers = function () {
10
+ return data;
11
+ };
12
+ return data;
13
+ }
14
+ function _generator() {
15
+ const data = require("@babel/generator");
16
+ _generator = function () {
17
+ return data;
18
+ };
19
+ return data;
20
+ }
21
+ function _template() {
22
+ const data = require("@babel/template");
23
+ _template = 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
+ const {
36
+ arrayExpression,
37
+ assignmentExpression,
38
+ binaryExpression,
39
+ blockStatement,
40
+ callExpression,
41
+ cloneNode,
42
+ conditionalExpression,
43
+ exportNamedDeclaration,
44
+ exportSpecifier,
45
+ expressionStatement,
46
+ functionExpression,
47
+ identifier,
48
+ memberExpression,
49
+ objectExpression,
50
+ program,
51
+ stringLiteral,
52
+ unaryExpression,
53
+ variableDeclaration,
54
+ variableDeclarator
55
+ } = _t();
56
+ const buildUmdWrapper = replacements => _template().default.statement`
57
+ (function (root, factory) {
58
+ if (typeof define === "function" && define.amd) {
59
+ define(AMD_ARGUMENTS, factory);
60
+ } else if (typeof exports === "object") {
61
+ factory(COMMON_ARGUMENTS);
62
+ } else {
63
+ factory(BROWSER_ARGUMENTS);
64
+ }
65
+ })(UMD_ROOT, function (FACTORY_PARAMETERS) {
66
+ FACTORY_BODY
67
+ });
68
+ `(replacements);
69
+ function buildGlobal(allowlist) {
70
+ const namespace = identifier("babelHelpers");
71
+ const body = [];
72
+ const container = functionExpression(null, [identifier("global")], blockStatement(body));
73
+ const tree = program([expressionStatement(callExpression(container, [conditionalExpression(binaryExpression("===", unaryExpression("typeof", identifier("global")), stringLiteral("undefined")), identifier("self"), identifier("global"))]))]);
74
+ body.push(variableDeclaration("var", [variableDeclarator(namespace, assignmentExpression("=", memberExpression(identifier("global"), namespace), objectExpression([])))]));
75
+ buildHelpers(body, namespace, allowlist);
76
+ return tree;
77
+ }
78
+ function buildModule(allowlist) {
79
+ const body = [];
80
+ const refs = buildHelpers(body, null, allowlist);
81
+ body.unshift(exportNamedDeclaration(null, Object.keys(refs).map(name => {
82
+ return exportSpecifier(cloneNode(refs[name]), identifier(name));
83
+ })));
84
+ return program(body, [], "module");
85
+ }
86
+ function buildUmd(allowlist) {
87
+ const namespace = identifier("babelHelpers");
88
+ const body = [];
89
+ body.push(variableDeclaration("var", [variableDeclarator(namespace, identifier("global"))]));
90
+ buildHelpers(body, namespace, allowlist);
91
+ return program([buildUmdWrapper({
92
+ FACTORY_PARAMETERS: identifier("global"),
93
+ BROWSER_ARGUMENTS: assignmentExpression("=", memberExpression(identifier("root"), namespace), objectExpression([])),
94
+ COMMON_ARGUMENTS: identifier("exports"),
95
+ AMD_ARGUMENTS: arrayExpression([stringLiteral("exports")]),
96
+ FACTORY_BODY: body,
97
+ UMD_ROOT: identifier("this")
98
+ })]);
99
+ }
100
+ function buildVar(allowlist) {
101
+ const namespace = identifier("babelHelpers");
102
+ const body = [];
103
+ body.push(variableDeclaration("var", [variableDeclarator(namespace, objectExpression([]))]));
104
+ const tree = program(body);
105
+ buildHelpers(body, namespace, allowlist);
106
+ body.push(expressionStatement(namespace));
107
+ return tree;
108
+ }
109
+ function buildHelpers(body, namespace, allowlist) {
110
+ const getHelperReference = name => {
111
+ return namespace ? memberExpression(namespace, identifier(name)) : identifier(`_${name}`);
112
+ };
113
+ const refs = {};
114
+ helpers().list.forEach(function (name) {
115
+ if (allowlist && !allowlist.includes(name)) return;
116
+ const ref = refs[name] = getHelperReference(name);
117
+ const {
118
+ nodes
119
+ } = helpers().get(name, getHelperReference, namespace ? null : `_${name}`, [], namespace ? (ast, exportName, mapExportBindingAssignments) => {
120
+ mapExportBindingAssignments(node => assignmentExpression("=", ref, node));
121
+ ast.body.push(expressionStatement(assignmentExpression("=", ref, identifier(exportName))));
122
+ } : null);
123
+ body.push(...nodes);
124
+ });
125
+ return refs;
126
+ }
127
+ function _default(allowlist, outputType = "global") {
128
+ let tree;
129
+ const build = {
130
+ global: buildGlobal,
131
+ module: buildModule,
132
+ umd: buildUmd,
133
+ var: buildVar
134
+ }[outputType];
135
+ if (build) {
136
+ tree = build(allowlist);
137
+ } else {
138
+ throw new Error(`Unsupported output type ${outputType}`);
139
+ }
140
+ return (0, _generator().default)(tree).code;
141
+ }
142
+ 0 && 0;
143
+
144
+ //# sourceMappingURL=build-external-helpers.js.map
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.transformFromAst = void 0;
7
+ exports.transformFromAstAsync = transformFromAstAsync;
8
+ exports.transformFromAstSync = transformFromAstSync;
9
+ function _gensync() {
10
+ const data = require("gensync");
11
+ _gensync = function () {
12
+ return data;
13
+ };
14
+ return data;
15
+ }
16
+ var _index = require("./config/index.js");
17
+ var _index2 = require("./transformation/index.js");
18
+ var _rewriteStackTrace = require("./errors/rewrite-stack-trace.js");
19
+ const transformFromAstRunner = _gensync()(function* (ast, code, opts) {
20
+ const config = yield* (0, _index.default)(opts);
21
+ if (config === null) return null;
22
+ if (!ast) throw new Error("No AST given");
23
+ return yield* (0, _index2.run)(config, code, ast);
24
+ });
25
+ const transformFromAst = exports.transformFromAst = function transformFromAst(ast, code, optsOrCallback, maybeCallback) {
26
+ let opts;
27
+ let callback;
28
+ if (typeof optsOrCallback === "function") {
29
+ callback = optsOrCallback;
30
+ opts = undefined;
31
+ } else {
32
+ opts = optsOrCallback;
33
+ callback = maybeCallback;
34
+ }
35
+ if (callback === undefined) {
36
+ {
37
+ return (0, _rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.sync)(ast, code, opts);
38
+ }
39
+ }
40
+ (0, _rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.errback)(ast, code, opts, callback);
41
+ };
42
+ function transformFromAstSync(...args) {
43
+ return (0, _rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.sync)(...args);
44
+ }
45
+ function transformFromAstAsync(...args) {
46
+ return (0, _rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.async)(...args);
47
+ }
48
+ 0 && 0;
49
+
50
+ //# sourceMappingURL=transform-ast.js.map
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.transformFile = void 0;
7
+ exports.transformFileAsync = transformFileAsync;
8
+ exports.transformFileSync = transformFileSync;
9
+ const transformFile = exports.transformFile = function transformFile(filename, opts, callback) {
10
+ if (typeof opts === "function") {
11
+ callback = opts;
12
+ }
13
+ callback(new Error("Transforming files is not supported in browsers"), null);
14
+ };
15
+ function transformFileSync() {
16
+ throw new Error("Transforming files is not supported in browsers");
17
+ }
18
+ function transformFileAsync() {
19
+ return Promise.reject(new Error("Transforming files is not supported in browsers"));
20
+ }
21
+ 0 && 0;
22
+
23
+ //# sourceMappingURL=transform-file-browser.js.map