@tachybase/module-pdf 1.1.28 → 1.1.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/externalVersion.js +7 -7
- package/dist/node_modules/@babel/core/lib/config/files/configuration.js +5 -2
- package/dist/node_modules/@babel/core/lib/config/files/module-types.js +74 -63
- package/dist/node_modules/@babel/core/lib/config/files/plugins.js +1 -0
- package/dist/node_modules/@babel/core/lib/config/partial.js +1 -1
- package/dist/node_modules/@babel/core/lib/index.js +20 -101
- package/dist/node_modules/@babel/core/lib/transformation/file/babel-7-helpers.cjs +3 -1
- package/dist/node_modules/@babel/core/lib/transformation/file/file.js +10 -5
- package/dist/node_modules/@babel/core/lib/transformation/util/clone-deep.js +27 -7
- package/dist/node_modules/@babel/core/package.json +1 -1
- package/dist/node_modules/@babel/core/src/config/files/index-browser.ts +2 -0
- package/dist/node_modules/@babel/core/src/config/resolve-targets-browser.ts +2 -0
- package/dist/node_modules/@babel/core/src/config/resolve-targets.ts +1 -1
- package/dist/node_modules/@babel/core/src/transform-file-browser.ts +2 -0
- package/dist/node_modules/@babel/preset-env/LICENSE +22 -0
- package/dist/node_modules/@babel/preset-env/data/built-in-modules.js +3 -0
- package/dist/node_modules/@babel/preset-env/data/built-in-modules.json.js +3 -0
- package/dist/node_modules/@babel/preset-env/data/built-ins.js +4 -0
- package/dist/node_modules/@babel/preset-env/data/built-ins.json.js +4 -0
- package/dist/node_modules/@babel/preset-env/data/core-js-compat.js +3 -0
- package/dist/node_modules/@babel/preset-env/data/corejs2-built-ins.js +3 -0
- package/dist/node_modules/@babel/preset-env/data/corejs2-built-ins.json.js +3 -0
- package/dist/node_modules/@babel/preset-env/data/package.json +1 -0
- package/dist/node_modules/@babel/preset-env/data/plugins.js +3 -0
- package/dist/node_modules/@babel/preset-env/data/plugins.json.js +3 -0
- package/dist/node_modules/@babel/preset-env/data/shipped-proposals.js +4 -0
- package/dist/node_modules/@babel/preset-env/data/unreleased-labels.js +3 -0
- package/dist/node_modules/@babel/preset-env/lib/available-plugins.js +172 -0
- package/dist/node_modules/@babel/preset-env/lib/debug.js +37 -0
- package/dist/node_modules/@babel/preset-env/lib/filter-items.js +32 -0
- package/dist/node_modules/@babel/preset-env/lib/index.js +347 -0
- package/dist/node_modules/@babel/preset-env/lib/module-transformations.js +15 -0
- package/dist/node_modules/@babel/preset-env/lib/normalize-options.js +151 -0
- package/dist/node_modules/@babel/preset-env/lib/options.js +43 -0
- package/dist/node_modules/@babel/preset-env/lib/plugins-compat-data.js +28 -0
- package/dist/node_modules/@babel/preset-env/lib/polyfills/babel-7-plugins.cjs +21 -0
- package/dist/node_modules/@babel/preset-env/lib/polyfills/babel-polyfill.cjs +69 -0
- package/dist/node_modules/@babel/preset-env/lib/polyfills/regenerator.cjs +44 -0
- package/dist/node_modules/@babel/preset-env/lib/polyfills/utils.cjs +22 -0
- package/dist/node_modules/@babel/preset-env/lib/shipped-proposals.js +29 -0
- package/dist/node_modules/@babel/preset-env/lib/targets-parser.js +20 -0
- package/dist/node_modules/@babel/preset-env/node_modules/.bin/semver +21 -0
- package/dist/node_modules/@babel/preset-env/package.json +1 -0
- package/dist/node_modules/@babel/preset-react/LICENSE +22 -0
- package/dist/node_modules/@babel/preset-react/lib/index.js +231 -0
- package/dist/node_modules/@babel/preset-react/package.json +1 -0
- package/dist/node_modules/@babel/preset-typescript/LICENSE +22 -0
- package/dist/node_modules/@babel/preset-typescript/lib/index.js +227 -0
- package/dist/node_modules/@babel/preset-typescript/package.json +1 -0
- package/dist/node_modules/@react-pdf/renderer/package.json +1 -1
- package/dist/node_modules/fs-extra/package.json +1 -1
- package/dist/server/PdfInstruction.js +3 -3
- package/package.json +14 -13
- package/dist/node_modules/@babel/core/cjs-proxy.cjs +0 -68
package/dist/externalVersion.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
"@tachybase/client": "1.1.
|
|
3
|
-
"@tachybase/components": "1.1.
|
|
4
|
-
"@tachybase/module-workflow": "1.1.
|
|
5
|
-
"@tachybase/actions": "1.1.
|
|
2
|
+
"@tachybase/client": "1.1.31",
|
|
3
|
+
"@tachybase/components": "1.1.31",
|
|
4
|
+
"@tachybase/module-workflow": "1.1.31",
|
|
5
|
+
"@tachybase/actions": "1.1.31",
|
|
6
6
|
"lodash": "4.17.21",
|
|
7
|
-
"@tachybase/server": "1.1.
|
|
8
|
-
"@tachybase/logger": "1.1.
|
|
9
|
-
"@tachybase/utils": "1.1.
|
|
7
|
+
"@tachybase/server": "1.1.31",
|
|
8
|
+
"@tachybase/logger": "1.1.31",
|
|
9
|
+
"@tachybase/utils": "1.1.31",
|
|
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
|
|
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
|
|
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
|
|
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 =
|
|
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
|
-
|
|
87
|
-
|
|
88
|
-
const
|
|
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
|
|
91
|
-
case "auto
|
|
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 "
|
|
96
|
-
case "
|
|
97
|
-
|
|
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 (!(
|
|
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" ||
|
|
120
|
+
} else if (e.code === "ERR_REQUIRE_ESM" || type === "esm") {} else {
|
|
113
121
|
throw e;
|
|
114
122
|
}
|
|
115
123
|
}
|
|
116
|
-
case "auto
|
|
117
|
-
if (
|
|
118
|
-
|
|
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
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
if (
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
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
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
172
|
+
}
|
|
173
|
+
return require.extensions[".js"](m, filename);
|
|
174
|
+
};
|
|
175
|
+
require.extensions[ext] = handler;
|
|
163
176
|
try {
|
|
164
|
-
return
|
|
177
|
+
return callback();
|
|
165
178
|
} finally {
|
|
166
|
-
if (
|
|
167
|
-
|
|
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) {
|
|
@@ -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.
|
|
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":
|