@tinacms/cli 0.0.0-de1bef5-20250124020627 → 0.0.0-df15737-20250329200825
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 +1 -1
- package/dist/index.d.ts +1 -4
- package/dist/index.js +128 -71
- package/dist/next/commands/dev-command/index.d.ts +5 -2
- package/dist/next/commands/dev-command/server/index.d.ts +1 -1
- package/dist/next/vite/plugins.d.ts +2 -1
- package/package.json +26 -21
|
@@ -150,7 +150,7 @@ export declare const parseSections: ({ val }: {
|
|
|
150
150
|
}) => {
|
|
151
151
|
sections?: {
|
|
152
152
|
exclude?: string;
|
|
153
|
-
type?: "
|
|
153
|
+
type?: "document" | "heading" | "directory" | "jekyll-pages" | "jekyll-posts";
|
|
154
154
|
match?: string;
|
|
155
155
|
path?: string;
|
|
156
156
|
templates?: string[];
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -27,17 +27,18 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
28
|
|
|
29
29
|
// src/index.ts
|
|
30
|
-
var
|
|
31
|
-
__export(
|
|
32
|
-
default: () =>
|
|
30
|
+
var index_exports = {};
|
|
31
|
+
__export(index_exports, {
|
|
32
|
+
default: () => index_default
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(index_exports);
|
|
35
35
|
var import_clipanion8 = require("clipanion");
|
|
36
36
|
|
|
37
37
|
// package.json
|
|
38
|
-
var version = "1.
|
|
38
|
+
var version = "1.9.4";
|
|
39
39
|
|
|
40
40
|
// src/next/commands/dev-command/index.ts
|
|
41
|
+
var import_async_lock = __toESM(require("async-lock"));
|
|
41
42
|
var import_clipanion2 = require("clipanion");
|
|
42
43
|
var import_fs_extra6 = __toESM(require("fs-extra"));
|
|
43
44
|
var import_path5 = __toESM(require("path"));
|
|
@@ -1181,7 +1182,7 @@ var MediaModel = class {
|
|
|
1181
1182
|
this.rootPath,
|
|
1182
1183
|
this.publicFolder,
|
|
1183
1184
|
this.mediaRoot,
|
|
1184
|
-
args.searchPath
|
|
1185
|
+
decodeURIComponent(args.searchPath)
|
|
1185
1186
|
);
|
|
1186
1187
|
const searchPath = parseMediaFolder(args.searchPath);
|
|
1187
1188
|
if (!await import_fs_extra3.default.pathExists(folderPath)) {
|
|
@@ -1253,7 +1254,7 @@ var MediaModel = class {
|
|
|
1253
1254
|
this.rootPath,
|
|
1254
1255
|
this.publicFolder,
|
|
1255
1256
|
this.mediaRoot,
|
|
1256
|
-
args.searchPath
|
|
1257
|
+
decodeURIComponent(args.searchPath)
|
|
1257
1258
|
);
|
|
1258
1259
|
await import_fs_extra3.default.stat(file);
|
|
1259
1260
|
await import_fs_extra3.default.remove(file);
|
|
@@ -1329,7 +1330,8 @@ var devServerEndPointsPlugin = ({
|
|
|
1329
1330
|
configManager,
|
|
1330
1331
|
apiURL,
|
|
1331
1332
|
database,
|
|
1332
|
-
searchIndex
|
|
1333
|
+
searchIndex,
|
|
1334
|
+
databaseLock
|
|
1333
1335
|
}) => {
|
|
1334
1336
|
const plug = {
|
|
1335
1337
|
name: "graphql-endpoints",
|
|
@@ -1373,14 +1375,17 @@ var devServerEndPointsPlugin = ({
|
|
|
1373
1375
|
}
|
|
1374
1376
|
if (req.url === "/graphql") {
|
|
1375
1377
|
const { query, variables } = req.body;
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1378
|
+
let result;
|
|
1379
|
+
await databaseLock(async () => {
|
|
1380
|
+
result = await (0, import_graphql.resolve)({
|
|
1381
|
+
config: {
|
|
1382
|
+
useRelativeMedia: true
|
|
1383
|
+
},
|
|
1384
|
+
database,
|
|
1385
|
+
query,
|
|
1386
|
+
variables,
|
|
1387
|
+
verbose: false
|
|
1388
|
+
});
|
|
1384
1389
|
});
|
|
1385
1390
|
res.end(JSON.stringify(result));
|
|
1386
1391
|
return;
|
|
@@ -1439,10 +1444,16 @@ function viteTransformExtension({
|
|
|
1439
1444
|
}
|
|
1440
1445
|
|
|
1441
1446
|
// src/next/commands/dev-command/server/index.ts
|
|
1442
|
-
var createDevServer = async (configManager, database, searchIndex, apiURL, noWatch) => {
|
|
1447
|
+
var createDevServer = async (configManager, database, searchIndex, apiURL, noWatch, databaseLock) => {
|
|
1443
1448
|
const plugins = [
|
|
1444
1449
|
transformTsxPlugin({ configManager }),
|
|
1445
|
-
devServerEndPointsPlugin({
|
|
1450
|
+
devServerEndPointsPlugin({
|
|
1451
|
+
apiURL,
|
|
1452
|
+
configManager,
|
|
1453
|
+
database,
|
|
1454
|
+
searchIndex,
|
|
1455
|
+
databaseLock
|
|
1456
|
+
}),
|
|
1446
1457
|
viteTransformExtension()
|
|
1447
1458
|
];
|
|
1448
1459
|
return (0, import_vite3.createServer)(
|
|
@@ -1728,7 +1739,10 @@ var Codegen = class {
|
|
|
1728
1739
|
this.noClientBuildCache = noClientBuildCache;
|
|
1729
1740
|
}
|
|
1730
1741
|
async writeConfigFile(fileName, data) {
|
|
1731
|
-
const filePath = import_path4.default.join(
|
|
1742
|
+
const filePath = import_path4.default.join(
|
|
1743
|
+
this.configManager.generatedFolderPath,
|
|
1744
|
+
fileName
|
|
1745
|
+
);
|
|
1732
1746
|
await import_fs_extra4.default.ensureFile(filePath);
|
|
1733
1747
|
await import_fs_extra4.default.outputFile(filePath, data);
|
|
1734
1748
|
if (this.configManager.hasSeparateContentRoot()) {
|
|
@@ -2192,7 +2206,9 @@ var BaseCommand = class extends import_clipanion.Command {
|
|
|
2192
2206
|
let subProc;
|
|
2193
2207
|
if (this.subCommand) {
|
|
2194
2208
|
subProc = await startSubprocess2({ command: this.subCommand });
|
|
2195
|
-
logger.info(
|
|
2209
|
+
logger.info(
|
|
2210
|
+
`Running web application with command: ${import_chalk4.default.cyan(this.subCommand)}`
|
|
2211
|
+
);
|
|
2196
2212
|
}
|
|
2197
2213
|
function exitHandler(options, exitCode) {
|
|
2198
2214
|
if (subProc) {
|
|
@@ -2326,6 +2342,10 @@ var DevCommand = class extends BaseCommand {
|
|
|
2326
2342
|
this.outputSearchIndexPath = import_clipanion2.Option.String("--outputSearchIndexPath", {
|
|
2327
2343
|
description: "Path to write the search index to"
|
|
2328
2344
|
});
|
|
2345
|
+
this.noServer = import_clipanion2.Option.Boolean("--no-server", false, {
|
|
2346
|
+
description: "Do not start the dev server"
|
|
2347
|
+
});
|
|
2348
|
+
this.indexingLock = new import_async_lock.default();
|
|
2329
2349
|
}
|
|
2330
2350
|
async catch(error) {
|
|
2331
2351
|
logger.error("Error occured during tinacms dev");
|
|
@@ -2346,10 +2366,13 @@ var DevCommand = class extends BaseCommand {
|
|
|
2346
2366
|
rootPath: this.rootPath,
|
|
2347
2367
|
legacyNoSDK: this.noSDK
|
|
2348
2368
|
});
|
|
2349
|
-
logger.info("
|
|
2369
|
+
logger.info("\u{1F999} TinaCMS Dev Server is initializing...");
|
|
2350
2370
|
this.logDeprecationWarnings();
|
|
2351
2371
|
createDBServer(Number(this.datalayerPort));
|
|
2352
2372
|
let database = null;
|
|
2373
|
+
const dbLock = async (fn) => {
|
|
2374
|
+
return this.indexingLock.acquire("Key", fn);
|
|
2375
|
+
};
|
|
2353
2376
|
const setup = async ({ firstTime }) => {
|
|
2354
2377
|
try {
|
|
2355
2378
|
await configManager.processConfig();
|
|
@@ -2410,7 +2433,11 @@ var DevCommand = class extends BaseCommand {
|
|
|
2410
2433
|
logger.error("Re-index complete");
|
|
2411
2434
|
}
|
|
2412
2435
|
if (!this.noWatch) {
|
|
2413
|
-
this.watchQueries(
|
|
2436
|
+
this.watchQueries(
|
|
2437
|
+
configManager,
|
|
2438
|
+
dbLock,
|
|
2439
|
+
async () => await codegen2.execute()
|
|
2440
|
+
);
|
|
2414
2441
|
}
|
|
2415
2442
|
return { apiURL: apiURL2, database, graphQLSchema: graphQLSchema2, tinaSchema: tinaSchema2 };
|
|
2416
2443
|
} catch (e) {
|
|
@@ -2446,14 +2473,6 @@ ${dangerText(e.message)}
|
|
|
2446
2473
|
tokenSplitRegex: (_d = (_c = configManager.config.search) == null ? void 0 : _c.tina) == null ? void 0 : _d.tokenSplitRegex
|
|
2447
2474
|
});
|
|
2448
2475
|
await searchIndexClient.onStartIndexing();
|
|
2449
|
-
const server = await createDevServer(
|
|
2450
|
-
configManager,
|
|
2451
|
-
database,
|
|
2452
|
-
searchIndexClient.searchIndex,
|
|
2453
|
-
apiURL,
|
|
2454
|
-
this.noWatch
|
|
2455
|
-
);
|
|
2456
|
-
await server.listen(Number(this.port));
|
|
2457
2476
|
const searchIndexer = new import_search.SearchIndexer({
|
|
2458
2477
|
batchSize: ((_e = configManager.config.search) == null ? void 0 : _e.indexBatchSize) || 100,
|
|
2459
2478
|
bridge: new import_graphql10.FilesystemBridge(
|
|
@@ -2475,16 +2494,34 @@ ${dangerText(e.message)}
|
|
|
2475
2494
|
await searchIndexClient.export(this.outputSearchIndexPath);
|
|
2476
2495
|
}
|
|
2477
2496
|
}
|
|
2497
|
+
if (this.noServer) {
|
|
2498
|
+
logger.info("--no-server option specified - Dev server not started");
|
|
2499
|
+
process.exit(0);
|
|
2500
|
+
}
|
|
2478
2501
|
if (!this.noWatch) {
|
|
2479
2502
|
this.watchContentFiles(
|
|
2480
2503
|
configManager,
|
|
2481
2504
|
database,
|
|
2505
|
+
dbLock,
|
|
2482
2506
|
configManager.config.search && searchIndexer
|
|
2483
2507
|
);
|
|
2508
|
+
}
|
|
2509
|
+
const server = await createDevServer(
|
|
2510
|
+
configManager,
|
|
2511
|
+
database,
|
|
2512
|
+
searchIndexClient.searchIndex,
|
|
2513
|
+
apiURL,
|
|
2514
|
+
this.noWatch,
|
|
2515
|
+
dbLock
|
|
2516
|
+
);
|
|
2517
|
+
await server.listen(Number(this.port));
|
|
2518
|
+
if (!this.noWatch) {
|
|
2484
2519
|
import_chokidar.default.watch(configManager.watchList).on("change", async () => {
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2520
|
+
await dbLock(async () => {
|
|
2521
|
+
logger.info(`Tina config change detected, rebuilding`);
|
|
2522
|
+
await setup({ firstTime: false });
|
|
2523
|
+
server.ws.send({ type: "full-reload", path: "*" });
|
|
2524
|
+
});
|
|
2488
2525
|
});
|
|
2489
2526
|
}
|
|
2490
2527
|
const subItems = [];
|
|
@@ -2497,7 +2534,7 @@ ${dangerText(e.message)}
|
|
|
2497
2534
|
const summaryItems = [
|
|
2498
2535
|
{
|
|
2499
2536
|
emoji: "\u{1F999}",
|
|
2500
|
-
heading: "
|
|
2537
|
+
heading: "TinaCMS URLs",
|
|
2501
2538
|
subItems: [
|
|
2502
2539
|
{
|
|
2503
2540
|
key: "CMS",
|
|
@@ -2532,7 +2569,7 @@ ${dangerText(e.message)}
|
|
|
2532
2569
|
});
|
|
2533
2570
|
}
|
|
2534
2571
|
summary({
|
|
2535
|
-
heading: "
|
|
2572
|
+
heading: "\u2705 \u{1F999} TinaCMS Dev Server is active:",
|
|
2536
2573
|
items: [
|
|
2537
2574
|
...summaryItems
|
|
2538
2575
|
// {
|
|
@@ -2553,7 +2590,7 @@ ${dangerText(e.message)}
|
|
|
2553
2590
|
});
|
|
2554
2591
|
await this.startSubCommand();
|
|
2555
2592
|
}
|
|
2556
|
-
watchContentFiles(configManager, database, searchIndexer) {
|
|
2593
|
+
watchContentFiles(configManager, database, databaseLock, searchIndexer) {
|
|
2557
2594
|
const collectionContentFiles = [];
|
|
2558
2595
|
configManager.config.schema.collections.forEach((collection) => {
|
|
2559
2596
|
const collectionGlob = `${import_path5.default.join(
|
|
@@ -2569,39 +2606,42 @@ ${dangerText(e.message)}
|
|
|
2569
2606
|
if (!ready) {
|
|
2570
2607
|
return;
|
|
2571
2608
|
}
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2609
|
+
await databaseLock(async () => {
|
|
2610
|
+
const pathFromRoot = configManager.printContentRelativePath(addedFile);
|
|
2611
|
+
await database.indexContentByPaths([pathFromRoot]).catch(console.error);
|
|
2612
|
+
if (searchIndexer) {
|
|
2613
|
+
await searchIndexer.indexContentByPaths([pathFromRoot]).catch(console.error);
|
|
2614
|
+
}
|
|
2615
|
+
});
|
|
2577
2616
|
}).on("change", async (changedFile) => {
|
|
2578
2617
|
const pathFromRoot = configManager.printContentRelativePath(changedFile);
|
|
2579
|
-
await
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2618
|
+
await databaseLock(async () => {
|
|
2619
|
+
await database.indexContentByPaths([pathFromRoot]).catch(console.error);
|
|
2620
|
+
if (searchIndexer) {
|
|
2621
|
+
await searchIndexer.indexContentByPaths([pathFromRoot]).catch(console.error);
|
|
2622
|
+
}
|
|
2623
|
+
});
|
|
2583
2624
|
}).on("unlink", async (removedFile) => {
|
|
2584
2625
|
const pathFromRoot = configManager.printContentRelativePath(removedFile);
|
|
2585
|
-
await
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2626
|
+
await databaseLock(async () => {
|
|
2627
|
+
await database.deleteContentByPaths([pathFromRoot]).catch(console.error);
|
|
2628
|
+
if (searchIndexer) {
|
|
2629
|
+
await searchIndexer.deleteIndexContent([pathFromRoot]).catch(console.error);
|
|
2630
|
+
}
|
|
2631
|
+
});
|
|
2589
2632
|
});
|
|
2590
2633
|
}
|
|
2591
|
-
watchQueries(configManager, callback) {
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
await callback();
|
|
2599
|
-
}).on("unlink", async (removedFile) => {
|
|
2600
|
-
await callback();
|
|
2601
|
-
});
|
|
2634
|
+
watchQueries(configManager, databaseLock, callback) {
|
|
2635
|
+
const executeCallback = async (_) => {
|
|
2636
|
+
await databaseLock(async () => {
|
|
2637
|
+
await callback();
|
|
2638
|
+
});
|
|
2639
|
+
};
|
|
2640
|
+
import_chokidar.default.watch(configManager.userQueriesAndFragmentsGlob).on("add", executeCallback).on("change", executeCallback).on("unlink", executeCallback);
|
|
2602
2641
|
}
|
|
2603
2642
|
};
|
|
2604
2643
|
DevCommand.paths = [["dev"], ["server:start"]];
|
|
2644
|
+
// Prevent indexes and reads occurring at once
|
|
2605
2645
|
DevCommand.usage = import_clipanion2.Command.Usage({
|
|
2606
2646
|
category: `Commands`,
|
|
2607
2647
|
description: `Builds Tina and starts the dev server`,
|
|
@@ -2899,7 +2939,8 @@ ${dangerText(e.message)}
|
|
|
2899
2939
|
database,
|
|
2900
2940
|
null,
|
|
2901
2941
|
apiURL,
|
|
2902
|
-
true
|
|
2942
|
+
true,
|
|
2943
|
+
(lockedFn) => lockedFn()
|
|
2903
2944
|
);
|
|
2904
2945
|
await server.listen(Number(this.port));
|
|
2905
2946
|
console.log("server listening on port", this.port);
|
|
@@ -2961,7 +3002,9 @@ ${dangerText(e.message)}
|
|
|
2961
3002
|
`ERROR: Branch not configured in tina search configuration.`
|
|
2962
3003
|
)}`
|
|
2963
3004
|
);
|
|
2964
|
-
throw new Error(
|
|
3005
|
+
throw new Error(
|
|
3006
|
+
"Branch not configured in tina search configuration."
|
|
3007
|
+
);
|
|
2965
3008
|
}
|
|
2966
3009
|
if (!((_d = configManager.config) == null ? void 0 : _d.clientId)) {
|
|
2967
3010
|
logger.error(`${dangerText(`ERROR: clientId not configured.`)}`);
|
|
@@ -3104,7 +3147,10 @@ ${dangerText(e.message)}
|
|
|
3104
3147
|
});
|
|
3105
3148
|
throw e;
|
|
3106
3149
|
}
|
|
3107
|
-
const branchBar = new import_progress2.default(
|
|
3150
|
+
const branchBar = new import_progress2.default(
|
|
3151
|
+
"Checking branch is on Tina Cloud. :prog",
|
|
3152
|
+
1
|
|
3153
|
+
);
|
|
3108
3154
|
if (branchKnown) {
|
|
3109
3155
|
branchBar.tick({
|
|
3110
3156
|
prog: "\u2705"
|
|
@@ -3228,7 +3274,7 @@ Additional info: Branch: ${config2.branch}, Client ID: ${config2.clientId} `;
|
|
|
3228
3274
|
const localSchemaDocument = await database.getGraphQLSchemaFromBridge();
|
|
3229
3275
|
const localGraphqlSchema = (0, import_graphql12.buildASTSchema)(localSchemaDocument);
|
|
3230
3276
|
try {
|
|
3231
|
-
const diffResult = await (0, import_core3.diff)(
|
|
3277
|
+
const diffResult = await (0, import_core3.diff)(remoteGqlSchema, localGraphqlSchema);
|
|
3232
3278
|
if (diffResult.length === 0) {
|
|
3233
3279
|
bar2.tick({
|
|
3234
3280
|
prog: "\u2705"
|
|
@@ -3285,7 +3331,9 @@ Additional info:
|
|
|
3285
3331
|
const { clientId, branch, isLocalClient, host } = (0, import_schema_tools2.parseURL)(apiURL);
|
|
3286
3332
|
if (isLocalClient || !host || !clientId || !branch) {
|
|
3287
3333
|
if (verbose) {
|
|
3288
|
-
logger.info(
|
|
3334
|
+
logger.info(
|
|
3335
|
+
logText("Not using Tina Cloud, skipping Tina Schema check")
|
|
3336
|
+
);
|
|
3289
3337
|
}
|
|
3290
3338
|
return;
|
|
3291
3339
|
}
|
|
@@ -4807,7 +4855,6 @@ var transformForestryFieldsToTinaFields = ({
|
|
|
4807
4855
|
name: stringifyTemplateName(tem, tem)
|
|
4808
4856
|
};
|
|
4809
4857
|
if (t.name != tem) {
|
|
4810
|
-
;
|
|
4811
4858
|
t.nameOverride = tem;
|
|
4812
4859
|
}
|
|
4813
4860
|
templates2.push(t);
|
|
@@ -5952,10 +5999,13 @@ var addSelfHostedTinaAuthToConfig = async (config2, configFile) => {
|
|
|
5952
5999
|
const { configImports, configAuthProviderClass, extraTinaCollections } = config2.authProvider;
|
|
5953
6000
|
const importMap = {
|
|
5954
6001
|
// iterate over configImports and add them to the import map
|
|
5955
|
-
...configImports.reduce(
|
|
5956
|
-
acc
|
|
5957
|
-
|
|
5958
|
-
|
|
6002
|
+
...configImports.reduce(
|
|
6003
|
+
(acc, { from, imported }) => {
|
|
6004
|
+
acc[from] = imported;
|
|
6005
|
+
return acc;
|
|
6006
|
+
},
|
|
6007
|
+
{}
|
|
6008
|
+
)
|
|
5959
6009
|
};
|
|
5960
6010
|
const transformedSourceFileResult = import_typescript3.default.transform(
|
|
5961
6011
|
sourceFile,
|
|
@@ -6410,6 +6460,13 @@ ${titleText(" TinaCMS ")} has been initialized!`));
|
|
|
6410
6460
|
logger.info(
|
|
6411
6461
|
"To get started run: " + cmdText(frameworkDevCmds[framework.name]({ packageManager }))
|
|
6412
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
|
+
}
|
|
6413
6470
|
logger.info(
|
|
6414
6471
|
"To get your site production ready, run: " + cmdText(`tinacms init backend`)
|
|
6415
6472
|
);
|
|
@@ -6695,4 +6752,4 @@ cli.register(SearchIndexCommand);
|
|
|
6695
6752
|
cli.register(import_clipanion8.Builtins.DefinitionsCommand);
|
|
6696
6753
|
cli.register(import_clipanion8.Builtins.HelpCommand);
|
|
6697
6754
|
cli.register(import_clipanion8.Builtins.VersionCommand);
|
|
6698
|
-
var
|
|
6755
|
+
var index_default = cli;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import AsyncLock from 'async-lock';
|
|
1
2
|
import { Database } from '@tinacms/graphql';
|
|
2
3
|
import { ConfigManager } from '../../config-manager';
|
|
3
4
|
import { BaseCommand } from '../baseCommands';
|
|
@@ -7,10 +8,12 @@ export declare class DevCommand extends BaseCommand {
|
|
|
7
8
|
watchFolders: string;
|
|
8
9
|
noWatch: boolean;
|
|
9
10
|
outputSearchIndexPath: string;
|
|
11
|
+
noServer: boolean;
|
|
12
|
+
indexingLock: AsyncLock;
|
|
10
13
|
static usage: import("clipanion").Usage;
|
|
11
14
|
catch(error: any): Promise<void>;
|
|
12
15
|
logDeprecationWarnings(): void;
|
|
13
16
|
execute(): Promise<number | void>;
|
|
14
|
-
watchContentFiles(configManager: ConfigManager, database: Database, searchIndexer?: SearchIndexer): void;
|
|
15
|
-
watchQueries(configManager: ConfigManager, callback: () => Promise<string>): void;
|
|
17
|
+
watchContentFiles(configManager: ConfigManager, database: Database, databaseLock: (fn: () => Promise<void>) => Promise<void>, searchIndexer?: SearchIndexer): void;
|
|
18
|
+
watchQueries(configManager: ConfigManager, databaseLock: (fn: () => Promise<void>) => Promise<void>, callback: () => Promise<string>): void;
|
|
16
19
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Database } from '@tinacms/graphql';
|
|
2
2
|
import { ConfigManager } from '../../../config-manager';
|
|
3
|
-
export declare const createDevServer: (configManager: ConfigManager, database: Database, searchIndex: any, apiURL: string, noWatch: boolean) => Promise<import("vite").ViteDevServer>;
|
|
3
|
+
export declare const createDevServer: (configManager: ConfigManager, database: Database, searchIndex: any, apiURL: string, noWatch: boolean, databaseLock: (fn: () => Promise<void>) => Promise<void>) => Promise<import("vite").ViteDevServer>;
|
|
@@ -7,11 +7,12 @@ import type { ConfigManager } from '../config-manager';
|
|
|
7
7
|
export declare const transformTsxPlugin: ({ configManager: _configManager, }: {
|
|
8
8
|
configManager: ConfigManager;
|
|
9
9
|
}) => Plugin;
|
|
10
|
-
export declare const devServerEndPointsPlugin: ({ configManager, apiURL, database, searchIndex, }: {
|
|
10
|
+
export declare const devServerEndPointsPlugin: ({ configManager, apiURL, database, searchIndex, databaseLock, }: {
|
|
11
11
|
apiURL: string;
|
|
12
12
|
database: Database;
|
|
13
13
|
configManager: ConfigManager;
|
|
14
14
|
searchIndex: any;
|
|
15
|
+
databaseLock: (fn: () => Promise<void>) => Promise<void>;
|
|
15
16
|
}) => Plugin;
|
|
16
17
|
export interface ViteSvgrOptions {
|
|
17
18
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinacms/cli",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-df15737-20250329200825",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -20,6 +20,10 @@
|
|
|
20
20
|
}
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"react": ">=18.3.1 <20.0.0",
|
|
25
|
+
"react-dom": ">=18.3.1 <20.0.0"
|
|
26
|
+
},
|
|
23
27
|
"devDependencies": {
|
|
24
28
|
"@types/clear": "0.1.0",
|
|
25
29
|
"@types/cli-spinner": "^0.2.3",
|
|
@@ -37,24 +41,25 @@
|
|
|
37
41
|
"@types/prompts": "^2.4.9",
|
|
38
42
|
"@types/yup": "^0.32.0",
|
|
39
43
|
"jest": "^29.7.0",
|
|
40
|
-
"@tinacms/scripts": "1.3.
|
|
44
|
+
"@tinacms/scripts": "1.3.3"
|
|
41
45
|
},
|
|
42
46
|
"dependencies": {
|
|
43
47
|
"@graphql-codegen/core": "^2.6.8",
|
|
44
48
|
"@graphql-codegen/plugin-helpers": "latest",
|
|
45
|
-
"@graphql-codegen/typescript": "^4.1.
|
|
46
|
-
"@graphql-codegen/typescript-operations": "^4.
|
|
49
|
+
"@graphql-codegen/typescript": "^4.1.3",
|
|
50
|
+
"@graphql-codegen/typescript-operations": "^4.4.1",
|
|
47
51
|
"@graphql-codegen/visitor-plugin-common": "^4.1.2",
|
|
48
52
|
"@graphql-inspector/core": "^4.2.2",
|
|
49
53
|
"@graphql-tools/graphql-file-loader": "^7.5.17",
|
|
50
54
|
"@graphql-tools/load": "^7.8.14",
|
|
51
|
-
"@rollup/pluginutils": "^5.1.
|
|
55
|
+
"@rollup/pluginutils": "^5.1.4",
|
|
52
56
|
"@svgr/core": "8.1.0",
|
|
53
57
|
"@tailwindcss/aspect-ratio": "^0.4.2",
|
|
54
58
|
"@tailwindcss/container-queries": "^0.1.1",
|
|
55
|
-
"@tailwindcss/typography": "^0.5.
|
|
59
|
+
"@tailwindcss/typography": "^0.5.16",
|
|
56
60
|
"@vitejs/plugin-react": "3.1.0",
|
|
57
61
|
"altair-express-middleware": "^7.3.6",
|
|
62
|
+
"async-lock": "^1.4.1",
|
|
58
63
|
"auto-bind": "^4.0.0",
|
|
59
64
|
"body-parser": "^1.20.3",
|
|
60
65
|
"busboy": "^1.6.0",
|
|
@@ -64,9 +69,9 @@
|
|
|
64
69
|
"clipanion": "^3.2.1",
|
|
65
70
|
"cors": "^2.8.5",
|
|
66
71
|
"crypto-js": "^4.2.0",
|
|
67
|
-
"dotenv": "^16.4.
|
|
68
|
-
"esbuild": "^0.24.
|
|
69
|
-
"fs-extra": "^11.
|
|
72
|
+
"dotenv": "^16.4.7",
|
|
73
|
+
"esbuild": "^0.24.2",
|
|
74
|
+
"fs-extra": "^11.3.0",
|
|
70
75
|
"graphql": "15.8.0",
|
|
71
76
|
"js-yaml": "^4.1.0",
|
|
72
77
|
"log4js": "^6.9.1",
|
|
@@ -77,19 +82,19 @@
|
|
|
77
82
|
"prettier": "^2.8.8",
|
|
78
83
|
"progress": "^2.0.3",
|
|
79
84
|
"prompts": "^2.4.2",
|
|
80
|
-
"readable-stream": "^4.
|
|
81
|
-
"tailwindcss": "^3.4.
|
|
85
|
+
"readable-stream": "^4.7.0",
|
|
86
|
+
"tailwindcss": "^3.4.17",
|
|
82
87
|
"typanion": "3.13.0",
|
|
83
|
-
"typescript": "^5.
|
|
84
|
-
"vite": "^4.5.
|
|
85
|
-
"yup": "^1.
|
|
86
|
-
"zod": "^3.
|
|
87
|
-
"@tinacms/app": "0.0.0-
|
|
88
|
-
"@tinacms/metrics": "1.0.
|
|
89
|
-
"@tinacms/
|
|
90
|
-
"@tinacms/
|
|
91
|
-
"
|
|
92
|
-
"tinacms": "0.0.0-
|
|
88
|
+
"typescript": "^5.7.3",
|
|
89
|
+
"vite": "^4.5.9",
|
|
90
|
+
"yup": "^1.6.1",
|
|
91
|
+
"zod": "^3.24.2",
|
|
92
|
+
"@tinacms/app": "0.0.0-df15737-20250329200825",
|
|
93
|
+
"@tinacms/metrics": "1.0.9",
|
|
94
|
+
"@tinacms/graphql": "0.0.0-df15737-20250329200825",
|
|
95
|
+
"@tinacms/schema-tools": "1.7.2",
|
|
96
|
+
"tinacms": "0.0.0-df15737-20250329200825",
|
|
97
|
+
"@tinacms/search": "0.0.0-df15737-20250329200825"
|
|
93
98
|
},
|
|
94
99
|
"publishConfig": {
|
|
95
100
|
"registry": "https://registry.npmjs.org"
|