@tinacms/cli 1.4.0 → 1.4.1

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
@@ -31,7 +31,7 @@ module.exports = __toCommonJS(src_exports);
31
31
  var import_clipanion5 = require("clipanion");
32
32
 
33
33
  // package.json
34
- var version = "1.4.0";
34
+ var version = "1.4.1";
35
35
 
36
36
  // src/next/commands/dev-command/index.ts
37
37
  var import_clipanion = require("clipanion");
@@ -593,7 +593,7 @@ var tinaTailwind = (spaPath, configFilePath) => {
593
593
  const plugins = [];
594
594
  const content2 = [
595
595
  import_path3.default.join(spaPath, "src/**/*.{vue,js,ts,jsx,tsx,svelte}"),
596
- import_path3.default.join(configFilePath)
596
+ import_path3.default.join(configFilePath, "../**/*.{vue,js,ts,jsx,tsx,svelte}")
597
597
  ];
598
598
  const tw = (0, import_tailwindcss.default)({
599
599
  important: ".tina-tailwind",
@@ -1423,7 +1423,7 @@ var import_readable_stream = require("readable-stream");
1423
1423
  var import_net = require("net");
1424
1424
  var import_many_level = require("many-level");
1425
1425
  var import_memory_level = require("memory-level");
1426
- var createDBServer = () => {
1426
+ var createDBServer = (port) => {
1427
1427
  const levelHost = new import_many_level.ManyLevelHost(
1428
1428
  new import_memory_level.MemoryLevel({
1429
1429
  valueEncoding: "json"
@@ -1435,10 +1435,12 @@ var createDBServer = () => {
1435
1435
  });
1436
1436
  dbServer.once("error", (err) => {
1437
1437
  if ((err == null ? void 0 : err.code) === "EADDRINUSE") {
1438
- throw new Error(`Tina Dev server is already in use`);
1438
+ throw new Error(
1439
+ `Tina Dev server is already in use. Datalayer server is busy on port ${port}`
1440
+ );
1439
1441
  }
1440
1442
  });
1441
- dbServer.listen(9e3);
1443
+ dbServer.listen(port);
1442
1444
  };
1443
1445
  async function createAndInitializeDatabase(configManager, bridgeOverride) {
1444
1446
  let database;
@@ -1508,6 +1510,9 @@ var DevCommand = class extends import_clipanion.Command {
1508
1510
  this.port = import_clipanion.Option.String("-p,--port", "4001", {
1509
1511
  description: "Specify a port to run the server on. (default 4001)"
1510
1512
  });
1513
+ this.datalayerPort = import_clipanion.Option.String("--datalayer-port", "9000", {
1514
+ description: "Specify a port to run the datalayer server on. (default 4001)"
1515
+ });
1511
1516
  this.subCommand = import_clipanion.Option.String("-c,--command", {
1512
1517
  description: "The sub-command to run"
1513
1518
  });
@@ -1557,7 +1562,7 @@ var DevCommand = class extends import_clipanion.Command {
1557
1562
  }
1558
1563
  const configManager = new ConfigManager(this.rootPath);
1559
1564
  logger.info("Starting Tina Dev Server");
1560
- createDBServer();
1565
+ createDBServer(Number(this.datalayerPort));
1561
1566
  let database = null;
1562
1567
  const setup = async ({ firstTime }) => {
1563
1568
  try {
@@ -1931,6 +1936,9 @@ var BuildCommand = class extends import_clipanion2.Command {
1931
1936
  this.noSDK = import_clipanion2.Option.Boolean("--noSDK", false, {
1932
1937
  description: "Don't generate the generated client SDK"
1933
1938
  });
1939
+ this.datalayerPort = import_clipanion2.Option.String("--datalayer-port", "9000", {
1940
+ description: "Specify a port to run the datalayer server on. (default 4001)"
1941
+ });
1934
1942
  this.isomorphicGitBridge = import_clipanion2.Option.Boolean("--isomorphicGitBridge", {
1935
1943
  description: "DEPRECATED - Enable Isomorphic Git Bridge Implementation"
1936
1944
  });
@@ -1975,7 +1983,7 @@ var BuildCommand = class extends import_clipanion2.Command {
1975
1983
  logger.error("Unable to build, please fix your Tina config and try again");
1976
1984
  process.exit(1);
1977
1985
  }
1978
- createDBServer();
1986
+ createDBServer(Number(this.datalayerPort));
1979
1987
  const database = await createAndInitializeDatabase(configManager);
1980
1988
  const { queryDoc, fragDoc } = await (0, import_graphql9.buildSchema)(
1981
1989
  database,
@@ -2435,6 +2443,9 @@ var AuditCommand = class extends import_clipanion3.Command {
2435
2443
  this.noTelemetry = import_clipanion3.Option.Boolean("--noTelemetry", false, {
2436
2444
  description: "Disable anonymous telemetry that is collected"
2437
2445
  });
2446
+ this.datalayerPort = import_clipanion3.Option.String("--datalayer-port", "9000", {
2447
+ description: "Specify a port to run the datalayer server on. (default 4001)"
2448
+ });
2438
2449
  }
2439
2450
  async catch(error) {
2440
2451
  logger.error("Error occured during tinacms audit");
@@ -2452,7 +2463,7 @@ var AuditCommand = class extends import_clipanion3.Command {
2452
2463
  logger.error(e.message);
2453
2464
  process.exit(1);
2454
2465
  }
2455
- createDBServer();
2466
+ createDBServer(Number(this.datalayerPort));
2456
2467
  const database = await createAndInitializeDatabase(
2457
2468
  configManager,
2458
2469
  this.clean ? void 0 : new import_graphql14.AuditFileSystemBridge(configManager.rootPath)
@@ -6,6 +6,7 @@ export declare class AuditCommand extends Command {
6
6
  clean: boolean;
7
7
  useDefaultValues: boolean;
8
8
  noTelemetry: boolean;
9
+ datalayerPort: string;
9
10
  static usage: import("clipanion").Usage;
10
11
  catch(error: any): Promise<void>;
11
12
  execute(): Promise<number | void>;
@@ -6,6 +6,7 @@ export declare class BuildCommand extends Command {
6
6
  rootPath: string;
7
7
  verbose: boolean;
8
8
  noSDK: boolean;
9
+ datalayerPort: string;
9
10
  isomorphicGitBridge: boolean;
10
11
  localOption: boolean;
11
12
  experimentalDataLayer: boolean;
@@ -4,6 +4,7 @@ import { ConfigManager } from '../../config-manager';
4
4
  export declare class DevCommand extends Command {
5
5
  static paths: string[][];
6
6
  port: string;
7
+ datalayerPort: string;
7
8
  subCommand: string;
8
9
  rootPath: string;
9
10
  watchFolders: string;
@@ -1,4 +1,4 @@
1
1
  import { Database, Bridge } from '@tinacms/graphql';
2
2
  import { ConfigManager } from './config-manager';
3
- export declare const createDBServer: () => void;
3
+ export declare const createDBServer: (port: number) => void;
4
4
  export declare function createAndInitializeDatabase(configManager: ConfigManager, bridgeOverride?: Bridge): Promise<Database>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/cli",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "files": [
@@ -1,2 +0,0 @@
1
- /// <reference types="node" />
2
- export declare const createDBServer: () => import("net").Server;