@tinacms/scripts 1.2.1 → 1.2.3
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/index.js +16 -1
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -57,6 +57,21 @@ var import_chokidar = __toESM(require("chokidar"));
|
|
|
57
57
|
var import_node_child_process = require("child_process");
|
|
58
58
|
var import_chalk = __toESM(require("chalk"));
|
|
59
59
|
var commander = __toESM(require("commander"));
|
|
60
|
+
var deepMerge = (target, source) => {
|
|
61
|
+
for (const key in source) {
|
|
62
|
+
if (!source.hasOwnProperty(key) || key === "__proto__" || key === "constructor") continue;
|
|
63
|
+
if (source[key] instanceof Object && !Array.isArray(source[key]) && target.hasOwnProperty(key)) {
|
|
64
|
+
target[key] = deepMerge(target[key], source[key]);
|
|
65
|
+
} else if (Array.isArray(source[key]) && Array.isArray(target[key])) {
|
|
66
|
+
target[key] = [.../* @__PURE__ */ new Set([...target[key], ...source[key]])];
|
|
67
|
+
} else if (Array.isArray(source[key])) {
|
|
68
|
+
target[key] = [...source[key]];
|
|
69
|
+
} else {
|
|
70
|
+
target[key] = source[key];
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return target;
|
|
74
|
+
};
|
|
60
75
|
var program = new commander.Command("Tina Build");
|
|
61
76
|
var registerCommands = (commands, noHelp = false) => {
|
|
62
77
|
commands.forEach((command, i) => {
|
|
@@ -343,7 +358,7 @@ var buildIt = async (entryPoint, packageJSON) => {
|
|
|
343
358
|
}
|
|
344
359
|
}
|
|
345
360
|
};
|
|
346
|
-
const buildConfig = packageJSON.buildConfig ?
|
|
361
|
+
const buildConfig = packageJSON.buildConfig ? deepMerge(defaultBuildConfig, packageJSON.buildConfig) : defaultBuildConfig;
|
|
347
362
|
await (0, import_vite.build)(__spreadValues({}, buildConfig));
|
|
348
363
|
await import_fs_extra.default.outputFileSync(
|
|
349
364
|
import_node_path.default.join(outInfo.outdir, `${outInfo.outfile}.d.ts`),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinacms/scripts",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@sucrase/jest-plugin": "^3.0.0",
|
|
17
|
-
"chalk": "^4.1.
|
|
18
|
-
"chokidar": "^3.
|
|
17
|
+
"chalk": "^4.1.2",
|
|
18
|
+
"chokidar": "^3.6.0",
|
|
19
19
|
"commander": "^7.2.0",
|
|
20
|
-
"esbuild": "^0.15.
|
|
21
|
-
"fs-extra": "^
|
|
22
|
-
"tsup": "^8.
|
|
23
|
-
"typescript": "^5.
|
|
24
|
-
"vite": "^4.
|
|
20
|
+
"esbuild": "^0.15.18",
|
|
21
|
+
"fs-extra": "^11.2.0",
|
|
22
|
+
"tsup": "^8.3.0",
|
|
23
|
+
"typescript": "^5.6.2",
|
|
24
|
+
"vite": "^4.5.5"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"build:all": "bin/tina-build build:all",
|