@tinacms/cli 2.0.0 → 2.0.2
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/cmds/forestry-migrate/util/index.d.ts +4 -4
- package/dist/index.js +20 -37
- package/dist/logger/index.d.ts +7 -2
- package/dist/utils/theme.d.ts +10 -30
- package/package.json +8 -10
|
@@ -59,7 +59,6 @@ declare const forestryFieldWithoutField: z.ZodObject<{
|
|
|
59
59
|
};
|
|
60
60
|
}>>;
|
|
61
61
|
}, "strip", z.ZodTypeAny, {
|
|
62
|
-
type?: "number" | "boolean" | "file" | "text" | "color" | "include" | "list" | "datetime" | "select" | "image_gallery" | "textarea" | "tag_list" | "field_group" | "field_group_list" | "blocks";
|
|
63
62
|
default?: any;
|
|
64
63
|
name?: string;
|
|
65
64
|
config?: {
|
|
@@ -76,10 +75,10 @@ declare const forestryFieldWithoutField: z.ZodObject<{
|
|
|
76
75
|
};
|
|
77
76
|
};
|
|
78
77
|
label?: string;
|
|
78
|
+
type?: "number" | "boolean" | "text" | "color" | "file" | "include" | "list" | "datetime" | "select" | "image_gallery" | "textarea" | "tag_list" | "field_group" | "field_group_list" | "blocks";
|
|
79
79
|
template?: string;
|
|
80
80
|
template_types?: string[];
|
|
81
81
|
}, {
|
|
82
|
-
type?: "number" | "boolean" | "file" | "text" | "color" | "include" | "list" | "datetime" | "select" | "image_gallery" | "textarea" | "tag_list" | "field_group" | "field_group_list" | "blocks";
|
|
83
82
|
default?: any;
|
|
84
83
|
name?: string;
|
|
85
84
|
config?: {
|
|
@@ -96,6 +95,7 @@ declare const forestryFieldWithoutField: z.ZodObject<{
|
|
|
96
95
|
};
|
|
97
96
|
};
|
|
98
97
|
label?: string;
|
|
98
|
+
type?: "number" | "boolean" | "text" | "color" | "file" | "include" | "list" | "datetime" | "select" | "image_gallery" | "textarea" | "tag_list" | "field_group" | "field_group_list" | "blocks";
|
|
99
99
|
template?: string;
|
|
100
100
|
template_types?: string[];
|
|
101
101
|
}>;
|
|
@@ -149,12 +149,12 @@ export declare const parseSections: ({ val }: {
|
|
|
149
149
|
val: unknown;
|
|
150
150
|
}) => {
|
|
151
151
|
sections?: {
|
|
152
|
-
exclude?: string;
|
|
153
|
-
type?: "heading" | "document" | "directory" | "jekyll-pages" | "jekyll-posts";
|
|
154
152
|
match?: string;
|
|
155
153
|
templates?: string[];
|
|
156
154
|
label?: string;
|
|
157
155
|
path?: string;
|
|
156
|
+
type?: "heading" | "document" | "directory" | "jekyll-pages" | "jekyll-posts";
|
|
157
|
+
exclude?: string;
|
|
158
158
|
create?: "none" | "all" | "documents";
|
|
159
159
|
new_doc_ext?: string;
|
|
160
160
|
read_only?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
2
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
3
|
-
}) : x)(function(x) {
|
|
4
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
5
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
6
|
-
});
|
|
7
|
-
|
|
8
1
|
// src/index.ts
|
|
9
2
|
import { Cli, Builtins } from "clipanion";
|
|
10
3
|
|
|
11
4
|
// package.json
|
|
12
|
-
var version = "2.0.
|
|
5
|
+
var version = "2.0.2";
|
|
13
6
|
|
|
14
7
|
// src/next/commands/dev-command/index.ts
|
|
15
8
|
import path8 from "path";
|
|
@@ -35,15 +28,15 @@ function isUnicodeSupported() {
|
|
|
35
28
|
}
|
|
36
29
|
|
|
37
30
|
// src/logger/index.ts
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
31
|
+
var logger = {
|
|
32
|
+
level: "info",
|
|
33
|
+
info: (msg) => process.stdout.write(msg + "\n"),
|
|
34
|
+
warn: (msg) => process.stdout.write(msg + "\n"),
|
|
35
|
+
error: (msg) => process.stderr.write(msg + "\n"),
|
|
36
|
+
debug: (msg) => {
|
|
37
|
+
if (logger.level === "debug") process.stdout.write(msg + "\n");
|
|
38
|
+
}
|
|
39
|
+
};
|
|
47
40
|
function ansiRegex() {
|
|
48
41
|
const pattern = [
|
|
49
42
|
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
|
@@ -1122,20 +1115,12 @@ var ConfigManager = class {
|
|
|
1122
1115
|
this.generatedFolderPath,
|
|
1123
1116
|
"config.prebuild.jsx"
|
|
1124
1117
|
);
|
|
1125
|
-
const nativeNodeModulesPlugin = {
|
|
1126
|
-
name: "native-node-modules",
|
|
1127
|
-
setup(build3) {
|
|
1128
|
-
build3.onResolve({ filter: /^node:.*/ }, (args) => {
|
|
1129
|
-
return {
|
|
1130
|
-
path: args.path,
|
|
1131
|
-
external: true
|
|
1132
|
-
};
|
|
1133
|
-
});
|
|
1134
|
-
}
|
|
1135
|
-
};
|
|
1136
1118
|
const outfile = path3.join(tmpdir, "config.build.jsx");
|
|
1137
1119
|
const outfile2 = path3.join(tmpdir, "config.build.mjs");
|
|
1138
1120
|
const tempTSConfigFile = path3.join(tmpdir, "tsconfig.json");
|
|
1121
|
+
const esmRequireBanner = {
|
|
1122
|
+
js: `import { createRequire } from 'module';const require = createRequire(import.meta.url);`
|
|
1123
|
+
};
|
|
1139
1124
|
fs2.outputFileSync(tempTSConfigFile, "{}");
|
|
1140
1125
|
const result2 = await esbuild.build({
|
|
1141
1126
|
entryPoints: [configFilePath],
|
|
@@ -1165,12 +1150,12 @@ var ConfigManager = class {
|
|
|
1165
1150
|
platform: "node",
|
|
1166
1151
|
format: "esm",
|
|
1167
1152
|
outfile,
|
|
1168
|
-
loader: loaders
|
|
1153
|
+
loader: loaders,
|
|
1154
|
+
banner: esmRequireBanner
|
|
1169
1155
|
});
|
|
1170
1156
|
await esbuild.build({
|
|
1171
1157
|
entryPoints: [outfile],
|
|
1172
1158
|
bundle: true,
|
|
1173
|
-
// Suppress warning about comparison with -0 from client module
|
|
1174
1159
|
logLevel: "silent",
|
|
1175
1160
|
platform: "node",
|
|
1176
1161
|
target: ["esnext"],
|
|
@@ -5079,7 +5064,7 @@ var generateAllTemplates = async ({
|
|
|
5079
5064
|
});
|
|
5080
5065
|
templateMap.set(tem, { fields, templateObj });
|
|
5081
5066
|
} catch (e) {
|
|
5082
|
-
logger.
|
|
5067
|
+
logger.warn(`Error parsing template frontmatter template, ${tem}.yml`);
|
|
5083
5068
|
console.error(e);
|
|
5084
5069
|
templateMap.set(tem, { fields: [], templateObj: {} });
|
|
5085
5070
|
}
|
|
@@ -5123,7 +5108,7 @@ var generateCollectionFromForestrySection = (args) => {
|
|
|
5123
5108
|
}
|
|
5124
5109
|
if (section.type === "directory") {
|
|
5125
5110
|
if (!section?.path || section.path === "/" || section.path === "./" || section.path === ".") {
|
|
5126
|
-
logger.
|
|
5111
|
+
logger.warn(
|
|
5127
5112
|
warnText(
|
|
5128
5113
|
`Warning: Section ${section.label} is using a Root Path. Currently, Tina Does not support Root paths see ${linkText(
|
|
5129
5114
|
"https://github.com/tinacms/tinacms/issues/3768"
|
|
@@ -5260,7 +5245,7 @@ var generateCollectionFromForestrySection = (args) => {
|
|
|
5260
5245
|
fields
|
|
5261
5246
|
};
|
|
5262
5247
|
} else {
|
|
5263
|
-
logger.
|
|
5248
|
+
logger.warn(
|
|
5264
5249
|
warnText(
|
|
5265
5250
|
`Error: document section has an unsupported file extension: ${extname} in ${section.path}`
|
|
5266
5251
|
)
|
|
@@ -6127,6 +6112,7 @@ var addSelfHostedTinaAuthToConfig = async (config2, configFile) => {
|
|
|
6127
6112
|
};
|
|
6128
6113
|
|
|
6129
6114
|
// src/cmds/init/apply.ts
|
|
6115
|
+
import { exec } from "child_process";
|
|
6130
6116
|
async function apply({
|
|
6131
6117
|
env,
|
|
6132
6118
|
params,
|
|
@@ -6534,9 +6520,7 @@ ${titleText(" TinaCMS ")} has been initialized!`));
|
|
|
6534
6520
|
);
|
|
6535
6521
|
if (framework.name === "hugo") {
|
|
6536
6522
|
logger.info(
|
|
6537
|
-
focusText("Hugo is required. ")
|
|
6538
|
-
"Don't have Hugo installed? Follow this guide to set it up: ",
|
|
6539
|
-
linkText("https://gohugo.io/installation/")
|
|
6523
|
+
focusText("Hugo is required. ") + "Don't have Hugo installed? Follow this guide to set it up: " + linkText("https://gohugo.io/installation/")
|
|
6540
6524
|
);
|
|
6541
6525
|
}
|
|
6542
6526
|
logger.info(
|
|
@@ -6613,7 +6597,6 @@ var addReactiveFile = {
|
|
|
6613
6597
|
}
|
|
6614
6598
|
};
|
|
6615
6599
|
function execShellCommand(cmd) {
|
|
6616
|
-
const exec = __require("child_process").exec;
|
|
6617
6600
|
return new Promise((resolve2, reject) => {
|
|
6618
6601
|
exec(cmd, (error, stdout, stderr) => {
|
|
6619
6602
|
if (error) {
|
package/dist/logger/index.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export declare const logger: {
|
|
2
|
+
level: string;
|
|
3
|
+
info: (msg: string) => boolean;
|
|
4
|
+
warn: (msg: string) => boolean;
|
|
5
|
+
error: (msg: string) => boolean;
|
|
6
|
+
debug: (msg: string) => void;
|
|
7
|
+
};
|
|
3
8
|
export declare const note: (message?: string, title?: string) => void;
|
|
4
9
|
export declare const log: (message?: string) => void;
|
|
5
10
|
export declare const warn: (message?: string, path?: string) => void;
|
package/dist/utils/theme.d.ts
CHANGED
|
@@ -1,36 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
|
|
3
3
|
*/
|
|
4
|
-
export declare const successText: import("chalk").
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export declare const
|
|
11
|
-
supportsColor: import("chalk").ColorSupport;
|
|
12
|
-
};
|
|
13
|
-
export declare const neutralText: import("chalk").Chalk & {
|
|
14
|
-
supportsColor: import("chalk").ColorSupport;
|
|
15
|
-
};
|
|
16
|
-
export declare const linkText: import("chalk").Chalk & {
|
|
17
|
-
supportsColor: import("chalk").ColorSupport;
|
|
18
|
-
};
|
|
19
|
-
export declare const labelText: import("chalk").Chalk & {
|
|
20
|
-
supportsColor: import("chalk").ColorSupport;
|
|
21
|
-
};
|
|
22
|
-
export declare const cmdText: import("chalk").Chalk & {
|
|
23
|
-
supportsColor: import("chalk").ColorSupport;
|
|
24
|
-
};
|
|
4
|
+
export declare const successText: import("chalk").ChalkInstance;
|
|
5
|
+
export declare const focusText: import("chalk").ChalkInstance;
|
|
6
|
+
export declare const dangerText: import("chalk").ChalkInstance;
|
|
7
|
+
export declare const neutralText: import("chalk").ChalkInstance;
|
|
8
|
+
export declare const linkText: import("chalk").ChalkInstance;
|
|
9
|
+
export declare const labelText: import("chalk").ChalkInstance;
|
|
10
|
+
export declare const cmdText: import("chalk").ChalkInstance;
|
|
25
11
|
export declare const indentedCmd: (str: any) => string;
|
|
26
12
|
export declare const indentText: (str: any) => string;
|
|
27
|
-
export declare const logText: import("chalk").
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
export declare const warnText: import("chalk").Chalk & {
|
|
31
|
-
supportsColor: import("chalk").ColorSupport;
|
|
32
|
-
};
|
|
33
|
-
export declare const titleText: import("chalk").Chalk & {
|
|
34
|
-
supportsColor: import("chalk").ColorSupport;
|
|
35
|
-
};
|
|
13
|
+
export declare const logText: import("chalk").ChalkInstance;
|
|
14
|
+
export declare const warnText: import("chalk").ChalkInstance;
|
|
15
|
+
export declare const titleText: import("chalk").ChalkInstance;
|
|
36
16
|
export declare const CONFIRMATION_TEXT: string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinacms/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.2",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -36,13 +36,12 @@
|
|
|
36
36
|
"@types/jest": "26.0.4",
|
|
37
37
|
"@types/js-yaml": "^4.0.9",
|
|
38
38
|
"@types/listr": "0.14.2",
|
|
39
|
-
"@types/log4js": "^2.3.5",
|
|
40
39
|
"@types/multer": "^1.4.12",
|
|
41
40
|
"@types/node": "^22.13.1",
|
|
42
41
|
"@types/progress": "^2.0.7",
|
|
43
42
|
"@types/prompts": "^2.4.9",
|
|
44
43
|
"jest": "^29.7.0",
|
|
45
|
-
"@tinacms/scripts": "1.4.
|
|
44
|
+
"@tinacms/scripts": "1.4.2"
|
|
46
45
|
},
|
|
47
46
|
"dependencies": {
|
|
48
47
|
"@graphql-codegen/core": "^2.6.8",
|
|
@@ -64,7 +63,7 @@
|
|
|
64
63
|
"auto-bind": "^4.0.0",
|
|
65
64
|
"body-parser": "^1.20.3",
|
|
66
65
|
"busboy": "^1.6.0",
|
|
67
|
-
"chalk": "^
|
|
66
|
+
"chalk": "^5.4.1",
|
|
68
67
|
"chokidar": "^3.6.0",
|
|
69
68
|
"cli-spinner": "^0.2.10",
|
|
70
69
|
"clipanion": "^3.2.1",
|
|
@@ -75,7 +74,6 @@
|
|
|
75
74
|
"fs-extra": "^11.3.0",
|
|
76
75
|
"graphql": "15.8.0",
|
|
77
76
|
"js-yaml": "^4.1.0",
|
|
78
|
-
"log4js": "^6.9.1",
|
|
79
77
|
"many-level": "^2.0.0",
|
|
80
78
|
"memory-level": "^1.0.0",
|
|
81
79
|
"minimatch": "^5.1.6",
|
|
@@ -90,12 +88,12 @@
|
|
|
90
88
|
"vite": "^4.5.9",
|
|
91
89
|
"yup": "^1.6.1",
|
|
92
90
|
"zod": "^3.24.2",
|
|
93
|
-
"@tinacms/app": "2.3.
|
|
94
|
-
"@tinacms/metrics": "2.0.
|
|
95
|
-
"
|
|
96
|
-
"@tinacms/search": "1.1.4",
|
|
91
|
+
"@tinacms/app": "2.3.14",
|
|
92
|
+
"@tinacms/metrics": "2.0.1",
|
|
93
|
+
"tinacms": "3.0.2",
|
|
97
94
|
"@tinacms/schema-tools": "2.0.0",
|
|
98
|
-
"tinacms": "
|
|
95
|
+
"@tinacms/graphql": "2.0.1",
|
|
96
|
+
"@tinacms/search": "1.1.5"
|
|
99
97
|
},
|
|
100
98
|
"publishConfig": {
|
|
101
99
|
"registry": "https://registry.npmjs.org"
|