@tachybase/module-pdf 1.1.28 → 1.1.32

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 (54) hide show
  1. package/dist/externalVersion.js +7 -7
  2. package/dist/node_modules/@babel/core/lib/config/files/configuration.js +5 -2
  3. package/dist/node_modules/@babel/core/lib/config/files/module-types.js +74 -63
  4. package/dist/node_modules/@babel/core/lib/config/files/plugins.js +1 -0
  5. package/dist/node_modules/@babel/core/lib/config/partial.js +1 -1
  6. package/dist/node_modules/@babel/core/lib/index.js +20 -101
  7. package/dist/node_modules/@babel/core/lib/transformation/file/babel-7-helpers.cjs +3 -1
  8. package/dist/node_modules/@babel/core/lib/transformation/file/file.js +10 -5
  9. package/dist/node_modules/@babel/core/lib/transformation/util/clone-deep.js +27 -7
  10. package/dist/node_modules/@babel/core/package.json +1 -1
  11. package/dist/node_modules/@babel/core/src/config/files/index-browser.ts +2 -0
  12. package/dist/node_modules/@babel/core/src/config/resolve-targets-browser.ts +2 -0
  13. package/dist/node_modules/@babel/core/src/config/resolve-targets.ts +1 -1
  14. package/dist/node_modules/@babel/core/src/transform-file-browser.ts +2 -0
  15. package/dist/node_modules/@babel/preset-env/LICENSE +22 -0
  16. package/dist/node_modules/@babel/preset-env/data/built-in-modules.js +3 -0
  17. package/dist/node_modules/@babel/preset-env/data/built-in-modules.json.js +3 -0
  18. package/dist/node_modules/@babel/preset-env/data/built-ins.js +4 -0
  19. package/dist/node_modules/@babel/preset-env/data/built-ins.json.js +4 -0
  20. package/dist/node_modules/@babel/preset-env/data/core-js-compat.js +3 -0
  21. package/dist/node_modules/@babel/preset-env/data/corejs2-built-ins.js +3 -0
  22. package/dist/node_modules/@babel/preset-env/data/corejs2-built-ins.json.js +3 -0
  23. package/dist/node_modules/@babel/preset-env/data/package.json +1 -0
  24. package/dist/node_modules/@babel/preset-env/data/plugins.js +3 -0
  25. package/dist/node_modules/@babel/preset-env/data/plugins.json.js +3 -0
  26. package/dist/node_modules/@babel/preset-env/data/shipped-proposals.js +4 -0
  27. package/dist/node_modules/@babel/preset-env/data/unreleased-labels.js +3 -0
  28. package/dist/node_modules/@babel/preset-env/lib/available-plugins.js +172 -0
  29. package/dist/node_modules/@babel/preset-env/lib/debug.js +37 -0
  30. package/dist/node_modules/@babel/preset-env/lib/filter-items.js +32 -0
  31. package/dist/node_modules/@babel/preset-env/lib/index.js +347 -0
  32. package/dist/node_modules/@babel/preset-env/lib/module-transformations.js +15 -0
  33. package/dist/node_modules/@babel/preset-env/lib/normalize-options.js +151 -0
  34. package/dist/node_modules/@babel/preset-env/lib/options.js +43 -0
  35. package/dist/node_modules/@babel/preset-env/lib/plugins-compat-data.js +28 -0
  36. package/dist/node_modules/@babel/preset-env/lib/polyfills/babel-7-plugins.cjs +21 -0
  37. package/dist/node_modules/@babel/preset-env/lib/polyfills/babel-polyfill.cjs +69 -0
  38. package/dist/node_modules/@babel/preset-env/lib/polyfills/regenerator.cjs +44 -0
  39. package/dist/node_modules/@babel/preset-env/lib/polyfills/utils.cjs +22 -0
  40. package/dist/node_modules/@babel/preset-env/lib/shipped-proposals.js +29 -0
  41. package/dist/node_modules/@babel/preset-env/lib/targets-parser.js +20 -0
  42. package/dist/node_modules/@babel/preset-env/node_modules/.bin/semver +21 -0
  43. package/dist/node_modules/@babel/preset-env/package.json +1 -0
  44. package/dist/node_modules/@babel/preset-react/LICENSE +22 -0
  45. package/dist/node_modules/@babel/preset-react/lib/index.js +231 -0
  46. package/dist/node_modules/@babel/preset-react/package.json +1 -0
  47. package/dist/node_modules/@babel/preset-typescript/LICENSE +22 -0
  48. package/dist/node_modules/@babel/preset-typescript/lib/index.js +227 -0
  49. package/dist/node_modules/@babel/preset-typescript/package.json +1 -0
  50. package/dist/node_modules/@react-pdf/renderer/package.json +1 -1
  51. package/dist/node_modules/fs-extra/package.json +1 -1
  52. package/dist/server/PdfInstruction.js +3 -3
  53. package/package.json +14 -13
  54. package/dist/node_modules/@babel/core/cjs-proxy.cjs +0 -68
@@ -1,11 +1,11 @@
1
1
  module.exports = {
2
- "@tachybase/client": "1.1.28",
3
- "@tachybase/components": "1.1.28",
4
- "@tachybase/module-workflow": "1.1.28",
5
- "@tachybase/actions": "1.1.28",
2
+ "@tachybase/client": "1.1.32",
3
+ "@tachybase/components": "1.1.32",
4
+ "@tachybase/module-workflow": "1.1.32",
5
+ "@tachybase/actions": "1.1.32",
6
6
  "lodash": "4.17.21",
7
- "@tachybase/server": "1.1.28",
8
- "@tachybase/logger": "1.1.28",
9
- "@tachybase/utils": "1.1.28",
7
+ "@tachybase/server": "1.1.32",
8
+ "@tachybase/logger": "1.1.32",
9
+ "@tachybase/utils": "1.1.32",
10
10
  "axios": "1.7.7"
11
11
  };
@@ -51,6 +51,7 @@ var _moduleTypes = require("./module-types.js");
51
51
  var _patternToRegex = require("../pattern-to-regex.js");
52
52
  var _configError = require("../../errors/config-error.js");
53
53
  var fs = require("../../gensync-utils/fs.js");
54
+ require("module");
54
55
  var _rewriteStackTrace = require("../../errors/rewrite-stack-trace.js");
55
56
  var _async = require("../../gensync-utils/async.js");
56
57
  const debug = _debug()("babel:config:loading:files:configuration");
@@ -102,7 +103,7 @@ function buildConfigFileObject(options, filepath) {
102
103
  return configFile;
103
104
  }
104
105
  const packageToBabelConfig = (0, _caching.makeWeakCacheSync)(file => {
105
- const babel = file.options["babel"];
106
+ const babel = file.options.babel;
106
107
  if (babel === undefined) return null;
107
108
  if (typeof babel !== "object" || Array.isArray(babel) || babel === null) {
108
109
  throw new _configError.default(`.babel property must be an object`, file.filepath);
@@ -127,7 +128,7 @@ const readConfigJSON5 = (0, _utils.makeStaticFileCache)((filepath, content) => {
127
128
  if (Array.isArray(options)) {
128
129
  throw new _configError.default(`Expected config object but found array`, filepath);
129
130
  }
130
- delete options["$schema"];
131
+ delete options.$schema;
131
132
  return {
132
133
  filepath,
133
134
  dirname: _path().dirname(filepath),
@@ -225,7 +226,9 @@ function readConfig(filepath, envName, caller) {
225
226
  case ".js":
226
227
  case ".cjs":
227
228
  case ".mjs":
229
+ case ".ts":
228
230
  case ".cts":
231
+ case ".mts":
229
232
  return readConfigCode(filepath, {
230
233
  envName,
231
234
  caller
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = loadCodeDefault;
7
7
  exports.supportsESM = void 0;
8
- var _async3 = require("../../gensync-utils/async.js");
8
+ var _async = require("../../gensync-utils/async.js");
9
9
  function _path() {
10
10
  const data = require("path");
11
11
  _path = function () {
@@ -20,6 +20,7 @@ function _url() {
20
20
  };
21
21
  return data;
22
22
  }
23
+ require("module");
23
24
  function _semver() {
24
25
  const data = require("semver");
25
26
  _semver = function () {
@@ -78,95 +79,105 @@ const loadMjsFromPath = (0, _rewriteStackTrace.endHiddenCallStack)(function () {
78
79
  }
79
80
  return loadMjsFromPath;
80
81
  }());
81
- const SUPPORTED_EXTENSIONS = new Set([".js", ".mjs", ".cjs", ".cts"]);
82
+ const SUPPORTED_EXTENSIONS = {
83
+ ".js": "unknown",
84
+ ".mjs": "esm",
85
+ ".cjs": "cjs",
86
+ ".ts": "unknown",
87
+ ".mts": "esm",
88
+ ".cts": "cjs"
89
+ };
82
90
  const asyncModules = new Set();
83
91
  function* loadCodeDefault(filepath, loader, esmError, tlaError) {
84
- var _async2;
85
92
  let async;
86
- let ext = _path().extname(filepath);
87
- if (!SUPPORTED_EXTENSIONS.has(ext)) ext = ".js";
88
- const pattern = `${loader} ${ext}`;
93
+ const ext = _path().extname(filepath);
94
+ const isTS = ext === ".ts" || ext === ".cts" || ext === ".mts";
95
+ const type = SUPPORTED_EXTENSIONS[hasOwnProperty.call(SUPPORTED_EXTENSIONS, ext) ? ext : ".js"];
96
+ const pattern = `${loader} ${type}`;
89
97
  switch (pattern) {
90
- case "require .cjs":
91
- case "auto .cjs":
92
- {
98
+ case "require cjs":
99
+ case "auto cjs":
100
+ if (isTS) {
101
+ return ensureTsSupport(filepath, ext, () => loadCjsDefault(filepath));
102
+ } else {
93
103
  return loadCjsDefault(filepath, arguments[2]);
94
104
  }
95
- case "require .cts":
96
- case "auto .cts":
97
- return loadCtsDefault(filepath);
98
- case "auto .js":
99
- case "require .js":
100
- case "require .mjs":
105
+ case "auto unknown":
106
+ case "require unknown":
107
+ case "require esm":
101
108
  try {
102
- {
109
+ if (isTS) {
110
+ return ensureTsSupport(filepath, ext, () => loadCjsDefault(filepath));
111
+ } else {
103
112
  return loadCjsDefault(filepath, arguments[2]);
104
113
  }
105
114
  } catch (e) {
106
115
  if (e.code === "ERR_REQUIRE_ASYNC_MODULE" || e.code === "ERR_REQUIRE_CYCLE_MODULE" && asyncModules.has(filepath)) {
107
- var _async;
108
116
  asyncModules.add(filepath);
109
- if (!((_async = async) != null ? _async : async = yield* (0, _async3.isAsync)())) {
117
+ if (!(async != null ? async : async = yield* (0, _async.isAsync)())) {
110
118
  throw new _configError.default(tlaError, filepath);
111
119
  }
112
- } else if (e.code === "ERR_REQUIRE_ESM" || ext === ".mjs") {} else {
120
+ } else if (e.code === "ERR_REQUIRE_ESM" || type === "esm") {} else {
113
121
  throw e;
114
122
  }
115
123
  }
116
- case "auto .mjs":
117
- if ((_async2 = async) != null ? _async2 : async = yield* (0, _async3.isAsync)()) {
118
- return (yield* (0, _async3.waitFor)(loadMjsFromPath(filepath))).default;
124
+ case "auto esm":
125
+ if (async != null ? async : async = yield* (0, _async.isAsync)()) {
126
+ const promise = isTS ? ensureTsSupport(filepath, ext, () => loadMjsFromPath(filepath)) : loadMjsFromPath(filepath);
127
+ return (yield* (0, _async.waitFor)(promise)).default;
119
128
  }
120
129
  throw new _configError.default(esmError, filepath);
121
130
  default:
122
131
  throw new Error("Internal Babel error: unreachable code.");
123
132
  }
124
133
  }
125
- function loadCtsDefault(filepath) {
126
- const ext = ".cts";
127
- const hasTsSupport = !!(require.extensions[".ts"] || require.extensions[".cts"] || require.extensions[".mts"]);
128
- let handler;
129
- if (!hasTsSupport) {
130
- const opts = {
131
- babelrc: false,
132
- configFile: false,
133
- sourceType: "unambiguous",
134
- sourceMaps: "inline",
135
- sourceFileName: _path().basename(filepath),
136
- presets: [[getTSPreset(filepath), Object.assign({
137
- onlyRemoveTypeImports: true,
138
- optimizeConstEnums: true
139
- }, {
140
- allowDeclareFields: true
141
- })]]
142
- };
143
- handler = function (m, filename) {
144
- if (handler && filename.endsWith(ext)) {
145
- try {
146
- return m._compile((0, _transformFile.transformFileSync)(filename, Object.assign({}, opts, {
147
- filename
148
- })).code, filename);
149
- } catch (error) {
150
- if (!hasTsSupport) {
151
- const packageJson = require("@babel/preset-typescript/package.json");
152
- if (_semver().lt(packageJson.version, "7.21.4")) {
153
- console.error("`.cts` configuration file failed to load, please try to update `@babel/preset-typescript`.");
154
- }
155
- }
156
- throw error;
134
+ function ensureTsSupport(filepath, ext, callback) {
135
+ if (require.extensions[".ts"] || require.extensions[".cts"] || require.extensions[".mts"]) {
136
+ return callback();
137
+ }
138
+ if (ext !== ".cts") {
139
+ throw new _configError.default(`\
140
+ You are using a ${ext} config file, but Babel only supports transpiling .cts configs. Either:
141
+ - Use a .cts config file
142
+ - Update to Node.js 23.6.0, which has native TypeScript support
143
+ - Install ts-node to transpile ${ext} files on the fly\
144
+ `, filepath);
145
+ }
146
+ const opts = {
147
+ babelrc: false,
148
+ configFile: false,
149
+ sourceType: "unambiguous",
150
+ sourceMaps: "inline",
151
+ sourceFileName: _path().basename(filepath),
152
+ presets: [[getTSPreset(filepath), Object.assign({
153
+ onlyRemoveTypeImports: true,
154
+ optimizeConstEnums: true
155
+ }, {
156
+ allowDeclareFields: true
157
+ })]]
158
+ };
159
+ let handler = function (m, filename) {
160
+ if (handler && filename.endsWith(".cts")) {
161
+ try {
162
+ return m._compile((0, _transformFile.transformFileSync)(filename, Object.assign({}, opts, {
163
+ filename
164
+ })).code, filename);
165
+ } catch (error) {
166
+ const packageJson = require("@babel/preset-typescript/package.json");
167
+ if (_semver().lt(packageJson.version, "7.21.4")) {
168
+ console.error("`.cts` configuration file failed to load, please try to update `@babel/preset-typescript`.");
157
169
  }
170
+ throw error;
158
171
  }
159
- return require.extensions[".js"](m, filename);
160
- };
161
- require.extensions[ext] = handler;
162
- }
172
+ }
173
+ return require.extensions[".js"](m, filename);
174
+ };
175
+ require.extensions[ext] = handler;
163
176
  try {
164
- return loadCjsDefault(filepath);
177
+ return callback();
165
178
  } finally {
166
- if (!hasTsSupport) {
167
- if (require.extensions[ext] === handler) delete require.extensions[ext];
168
- handler = undefined;
169
- }
179
+ if (require.extensions[ext] === handler) delete require.extensions[ext];
180
+ handler = undefined;
170
181
  }
171
182
  }
172
183
  function getTSPreset(filepath) {
@@ -30,6 +30,7 @@ function _url() {
30
30
  return data;
31
31
  }
32
32
  var _importMetaResolve = require("../../vendor/import-meta-resolve.js");
33
+ require("module");
33
34
  function _fs() {
34
35
  const data = require("fs");
35
36
  _fs = function () {
@@ -21,7 +21,7 @@ var _options = require("./validation/options.js");
21
21
  var _index = require("./files/index.js");
22
22
  var _resolveTargets = require("./resolve-targets.js");
23
23
  const _excluded = ["showIgnoredFiles"];
24
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
24
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
25
25
  function resolveRootMode(rootDir, rootMode) {
26
26
  switch (rootMode) {
27
27
  case "root":