@tinacms/cli 0.60.7 → 0.60.8

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # tinacms-cli
2
2
 
3
+ ## 0.60.8
4
+
5
+ ### Patch Changes
6
+
7
+ - 919f5cb6c: use standard next script names
8
+
3
9
  ## 0.60.7
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -114,7 +114,7 @@ var commander = __toModule(require("commander"));
114
114
 
115
115
  // pnp:/home/runner/work/tinacms/tinacms/packages/@tinacms/cli/package.json
116
116
  var name = "@tinacms/cli";
117
- var version = "0.60.7";
117
+ var version = "0.60.8";
118
118
 
119
119
  // pnp:/home/runner/work/tinacms/tinacms/packages/@tinacms/cli/src/utils/theme.ts
120
120
  var import_chalk = __toModule(require("chalk"));
@@ -1186,6 +1186,18 @@ const DynamicTina = ({ children }) => {
1186
1186
  export default DynamicTina
1187
1187
  `;
1188
1188
 
1189
+ // pnp:/home/runner/work/tinacms/tinacms/packages/@tinacms/cli/src/utils/script-helpers.ts
1190
+ function generateGqlScript(scriptValue) {
1191
+ return `tinacms server:start -c "${scriptValue}"`;
1192
+ }
1193
+ function extendNextScripts(scripts) {
1194
+ return __spreadProps(__spreadValues({}, scripts), {
1195
+ dev: generateGqlScript(scripts.dev || "next dev"),
1196
+ build: generateGqlScript(scripts.build || "next build"),
1197
+ start: generateGqlScript(scripts.start || "next start")
1198
+ });
1199
+ }
1200
+
1189
1201
  // pnp:/home/runner/work/tinacms/tinacms/packages/@tinacms/cli/src/cmds/init/index.ts
1190
1202
  function execShellCommand(cmd) {
1191
1203
  const exec = require("child_process").exec;
@@ -1276,11 +1288,7 @@ async function tinaSetup(_ctx, next, _options) {
1276
1288
  const pack = JSON.parse((0, import_fs_extra4.readFileSync)(packagePath).toString());
1277
1289
  const oldScripts = pack.scripts || {};
1278
1290
  const newPack = JSON.stringify(__spreadProps(__spreadValues({}, pack), {
1279
- scripts: __spreadProps(__spreadValues({}, oldScripts), {
1280
- "tina-dev": 'yarn tinacms server:start -c "next dev"',
1281
- "tina-build": 'yarn tinacms server:start -c "next build"',
1282
- "tina-start": 'yarn tinacms server:start -c "next start"'
1283
- })
1291
+ scripts: extendNextScripts(oldScripts)
1284
1292
  }), null, 2);
1285
1293
  (0, import_fs_extra4.writeFileSync)(packagePath, newPack);
1286
1294
  const adminPath = import_path5.default.join(pagesPath, "admin.js");
@@ -1294,7 +1302,7 @@ async function tinaSetup(_ctx, next, _options) {
1294
1302
  }
1295
1303
  async function successMessage(ctx, next, options) {
1296
1304
  logger.info(`Tina setup ${import_chalk2.default.underline.green("done")} \u2705
1297
- Start your dev server with ${successText(`yarn tina-dev`)} and go to http://localhost:3000/demo/blog/HelloWorld to ${successText("check it out the page that was created for you")}
1305
+ Start your dev server with ${successText(`yarn dev`)} and go to http://localhost:3000/demo/blog/HelloWorld to ${successText("check it out the page that was created for you")}
1298
1306
  Enjoy Tina \u{1F999} !
1299
1307
  `);
1300
1308
  next();
@@ -0,0 +1,19 @@
1
+ /**
2
+
3
+ Copyright 2021 Forestry.io Holdings, Inc.
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+
17
+ */
18
+ export declare function generateGqlScript(scriptValue: any): string;
19
+ export declare function extendNextScripts(scripts: any): any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/cli",
3
- "version": "0.60.7",
3
+ "version": "0.60.8",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "files": [