@tinacms/cli 1.9.1 → 1.9.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
CHANGED
|
@@ -35,7 +35,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
35
35
|
var import_clipanion8 = require("clipanion");
|
|
36
36
|
|
|
37
37
|
// package.json
|
|
38
|
-
var version = "1.9.
|
|
38
|
+
var version = "1.9.3";
|
|
39
39
|
|
|
40
40
|
// src/next/commands/dev-command/index.ts
|
|
41
41
|
var import_async_lock = __toESM(require("async-lock"));
|
|
@@ -1182,7 +1182,7 @@ var MediaModel = class {
|
|
|
1182
1182
|
this.rootPath,
|
|
1183
1183
|
this.publicFolder,
|
|
1184
1184
|
this.mediaRoot,
|
|
1185
|
-
args.searchPath
|
|
1185
|
+
decodeURIComponent(args.searchPath)
|
|
1186
1186
|
);
|
|
1187
1187
|
const searchPath = parseMediaFolder(args.searchPath);
|
|
1188
1188
|
if (!await import_fs_extra3.default.pathExists(folderPath)) {
|
|
@@ -1254,7 +1254,7 @@ var MediaModel = class {
|
|
|
1254
1254
|
this.rootPath,
|
|
1255
1255
|
this.publicFolder,
|
|
1256
1256
|
this.mediaRoot,
|
|
1257
|
-
args.searchPath
|
|
1257
|
+
decodeURIComponent(args.searchPath)
|
|
1258
1258
|
);
|
|
1259
1259
|
await import_fs_extra3.default.stat(file);
|
|
1260
1260
|
await import_fs_extra3.default.remove(file);
|
|
@@ -1739,7 +1739,10 @@ var Codegen = class {
|
|
|
1739
1739
|
this.noClientBuildCache = noClientBuildCache;
|
|
1740
1740
|
}
|
|
1741
1741
|
async writeConfigFile(fileName, data) {
|
|
1742
|
-
const filePath = import_path4.default.join(
|
|
1742
|
+
const filePath = import_path4.default.join(
|
|
1743
|
+
this.configManager.generatedFolderPath,
|
|
1744
|
+
fileName
|
|
1745
|
+
);
|
|
1743
1746
|
await import_fs_extra4.default.ensureFile(filePath);
|
|
1744
1747
|
await import_fs_extra4.default.outputFile(filePath, data);
|
|
1745
1748
|
if (this.configManager.hasSeparateContentRoot()) {
|
|
@@ -2339,6 +2342,9 @@ var DevCommand = class extends BaseCommand {
|
|
|
2339
2342
|
this.outputSearchIndexPath = import_clipanion2.Option.String("--outputSearchIndexPath", {
|
|
2340
2343
|
description: "Path to write the search index to"
|
|
2341
2344
|
});
|
|
2345
|
+
this.noServer = import_clipanion2.Option.Boolean("--no-server", false, {
|
|
2346
|
+
description: "Do not start the dev server"
|
|
2347
|
+
});
|
|
2342
2348
|
this.indexingLock = new import_async_lock.default();
|
|
2343
2349
|
}
|
|
2344
2350
|
async catch(error) {
|
|
@@ -2488,6 +2494,10 @@ ${dangerText(e.message)}
|
|
|
2488
2494
|
await searchIndexClient.export(this.outputSearchIndexPath);
|
|
2489
2495
|
}
|
|
2490
2496
|
}
|
|
2497
|
+
if (this.noServer) {
|
|
2498
|
+
logger.info("--no-server option specified - Dev server not started");
|
|
2499
|
+
process.exit(0);
|
|
2500
|
+
}
|
|
2491
2501
|
if (!this.noWatch) {
|
|
2492
2502
|
this.watchContentFiles(
|
|
2493
2503
|
configManager,
|
|
@@ -2992,7 +3002,9 @@ ${dangerText(e.message)}
|
|
|
2992
3002
|
`ERROR: Branch not configured in tina search configuration.`
|
|
2993
3003
|
)}`
|
|
2994
3004
|
);
|
|
2995
|
-
throw new Error(
|
|
3005
|
+
throw new Error(
|
|
3006
|
+
"Branch not configured in tina search configuration."
|
|
3007
|
+
);
|
|
2996
3008
|
}
|
|
2997
3009
|
if (!((_d = configManager.config) == null ? void 0 : _d.clientId)) {
|
|
2998
3010
|
logger.error(`${dangerText(`ERROR: clientId not configured.`)}`);
|
|
@@ -3135,7 +3147,10 @@ ${dangerText(e.message)}
|
|
|
3135
3147
|
});
|
|
3136
3148
|
throw e;
|
|
3137
3149
|
}
|
|
3138
|
-
const branchBar = new import_progress2.default(
|
|
3150
|
+
const branchBar = new import_progress2.default(
|
|
3151
|
+
"Checking branch is on Tina Cloud. :prog",
|
|
3152
|
+
1
|
|
3153
|
+
);
|
|
3139
3154
|
if (branchKnown) {
|
|
3140
3155
|
branchBar.tick({
|
|
3141
3156
|
prog: "\u2705"
|
|
@@ -3316,7 +3331,9 @@ Additional info:
|
|
|
3316
3331
|
const { clientId, branch, isLocalClient, host } = (0, import_schema_tools2.parseURL)(apiURL);
|
|
3317
3332
|
if (isLocalClient || !host || !clientId || !branch) {
|
|
3318
3333
|
if (verbose) {
|
|
3319
|
-
logger.info(
|
|
3334
|
+
logger.info(
|
|
3335
|
+
logText("Not using Tina Cloud, skipping Tina Schema check")
|
|
3336
|
+
);
|
|
3320
3337
|
}
|
|
3321
3338
|
return;
|
|
3322
3339
|
}
|
|
@@ -4838,7 +4855,6 @@ var transformForestryFieldsToTinaFields = ({
|
|
|
4838
4855
|
name: stringifyTemplateName(tem, tem)
|
|
4839
4856
|
};
|
|
4840
4857
|
if (t.name != tem) {
|
|
4841
|
-
;
|
|
4842
4858
|
t.nameOverride = tem;
|
|
4843
4859
|
}
|
|
4844
4860
|
templates2.push(t);
|
|
@@ -5983,10 +5999,13 @@ var addSelfHostedTinaAuthToConfig = async (config2, configFile) => {
|
|
|
5983
5999
|
const { configImports, configAuthProviderClass, extraTinaCollections } = config2.authProvider;
|
|
5984
6000
|
const importMap = {
|
|
5985
6001
|
// iterate over configImports and add them to the import map
|
|
5986
|
-
...configImports.reduce(
|
|
5987
|
-
acc
|
|
5988
|
-
|
|
5989
|
-
|
|
6002
|
+
...configImports.reduce(
|
|
6003
|
+
(acc, { from, imported }) => {
|
|
6004
|
+
acc[from] = imported;
|
|
6005
|
+
return acc;
|
|
6006
|
+
},
|
|
6007
|
+
{}
|
|
6008
|
+
)
|
|
5990
6009
|
};
|
|
5991
6010
|
const transformedSourceFileResult = import_typescript3.default.transform(
|
|
5992
6011
|
sourceFile,
|
|
@@ -6441,6 +6460,13 @@ ${titleText(" TinaCMS ")} has been initialized!`));
|
|
|
6441
6460
|
logger.info(
|
|
6442
6461
|
"To get started run: " + cmdText(frameworkDevCmds[framework.name]({ packageManager }))
|
|
6443
6462
|
);
|
|
6463
|
+
if (framework.name === "hugo") {
|
|
6464
|
+
logger.info(
|
|
6465
|
+
focusText("Hugo is required. "),
|
|
6466
|
+
"Don't have Hugo installed? Follow this guide to set it up: ",
|
|
6467
|
+
linkText("https://gohugo.io/installation/")
|
|
6468
|
+
);
|
|
6469
|
+
}
|
|
6444
6470
|
logger.info(
|
|
6445
6471
|
"To get your site production ready, run: " + cmdText(`tinacms init backend`)
|
|
6446
6472
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinacms/cli",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.3",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@types/prompts": "^2.4.9",
|
|
38
38
|
"@types/yup": "^0.32.0",
|
|
39
39
|
"jest": "^29.7.0",
|
|
40
|
-
"@tinacms/scripts": "1.3.
|
|
40
|
+
"@tinacms/scripts": "1.3.3"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@graphql-codegen/core": "^2.6.8",
|
|
@@ -85,12 +85,12 @@
|
|
|
85
85
|
"vite": "^4.5.9",
|
|
86
86
|
"yup": "^1.6.1",
|
|
87
87
|
"zod": "^3.24.2",
|
|
88
|
-
"@tinacms/app": "2.2.
|
|
89
|
-
"@tinacms/graphql": "1.5.
|
|
88
|
+
"@tinacms/app": "2.2.3",
|
|
89
|
+
"@tinacms/graphql": "1.5.14",
|
|
90
90
|
"@tinacms/metrics": "1.0.9",
|
|
91
|
-
"@tinacms/
|
|
92
|
-
"@tinacms/
|
|
93
|
-
"tinacms": "2.7.
|
|
91
|
+
"@tinacms/schema-tools": "1.7.2",
|
|
92
|
+
"@tinacms/search": "1.0.41",
|
|
93
|
+
"tinacms": "2.7.3"
|
|
94
94
|
},
|
|
95
95
|
"publishConfig": {
|
|
96
96
|
"registry": "https://registry.npmjs.org"
|