create-tina-app 0.1.3 → 0.1.4
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,17 @@
|
|
|
1
1
|
# create-tina-app
|
|
2
2
|
|
|
3
|
+
## 0.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a05546eb4: Added basic open source telemetry
|
|
8
|
+
|
|
9
|
+
See [this discussion](https://github.com/tinacms/tinacms/discussions/2451) for more information and how to opt out.
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [8bf0ac832]
|
|
12
|
+
- Updated dependencies [a05546eb4]
|
|
13
|
+
- @tinacms/metrics@0.0.2
|
|
14
|
+
|
|
3
15
|
## 0.1.3
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,26 @@
|
|
|
1
1
|
var __create = Object.create;
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
8
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
9
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
7
24
|
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
25
|
var __export = (target, all) => {
|
|
9
26
|
__markAsModule(target);
|
|
@@ -26,13 +43,14 @@ var __toModule = (module2) => {
|
|
|
26
43
|
__export(exports, {
|
|
27
44
|
run: () => run
|
|
28
45
|
});
|
|
46
|
+
var import_metrics = __toModule(require("@tinacms/metrics"));
|
|
29
47
|
var import_commander = __toModule(require("commander"));
|
|
30
48
|
var import_prompts = __toModule(require("prompts"));
|
|
31
49
|
var import_path4 = __toModule(require("path"));
|
|
32
50
|
|
|
33
51
|
// pnp:/home/runner/work/tinacms/tinacms/packages/create-tina-app/package.json
|
|
34
52
|
var name = "create-tina-app";
|
|
35
|
-
var version = "0.1.
|
|
53
|
+
var version = "0.1.4";
|
|
36
54
|
|
|
37
55
|
// pnp:/home/runner/work/tinacms/tinacms/packages/create-tina-app/src/util/fileUtil.ts
|
|
38
56
|
var import_fs = __toModule(require("fs"));
|
|
@@ -140,7 +158,7 @@ function install(root, dependencies, { useYarn, isOnline, devDependencies }) {
|
|
|
140
158
|
}
|
|
141
159
|
const child = (0, import_cross_spawn.default)(command, args, {
|
|
142
160
|
stdio: "inherit",
|
|
143
|
-
env: {
|
|
161
|
+
env: __spreadProps(__spreadValues({}, process.env), { ADBLOCK: "1", DISABLE_OPENCOLLECTIVE: "1" })
|
|
144
162
|
});
|
|
145
163
|
child.on("close", (code) => {
|
|
146
164
|
if (code !== 0) {
|
|
@@ -281,7 +299,7 @@ var downloadExample = async (example, root) => {
|
|
|
281
299
|
// pnp:/home/runner/work/tinacms/tinacms/packages/create-tina-app/src/index.ts
|
|
282
300
|
var program = new import_commander.Command(name);
|
|
283
301
|
var projectName = "";
|
|
284
|
-
program.version(version).option("-e, --example <example>", "Choose which example to start from").option("-d, --dir <dir>", "Choose which directory to run this script from").arguments("[project-directory]").usage(`${import_chalk5.default.green("<project-directory>")} [options]`).action((name2) => {
|
|
302
|
+
program.version(version).option("-e, --example <example>", "Choose which example to start from").option("-d, --dir <dir>", "Choose which directory to run this script from").option("--noTelemetry", "Disable anonymous telemetry that is collected").arguments("[project-directory]").usage(`${import_chalk5.default.green("<project-directory>")} [options]`).action((name2) => {
|
|
285
303
|
projectName = name2;
|
|
286
304
|
});
|
|
287
305
|
var run = async () => {
|
|
@@ -290,6 +308,7 @@ var run = async () => {
|
|
|
290
308
|
if (opts.dir) {
|
|
291
309
|
process.chdir(opts.dir);
|
|
292
310
|
}
|
|
311
|
+
const telemetry = new import_metrics.Telemetry({ disabled: opts == null ? void 0 : opts.noTelemetry });
|
|
293
312
|
let example = opts.example;
|
|
294
313
|
const res = await (0, import_prompts.default)({
|
|
295
314
|
message: "Which package manager would you like to use?",
|
|
@@ -329,6 +348,13 @@ var run = async () => {
|
|
|
329
348
|
if (!chosenExample) {
|
|
330
349
|
console.error(`The example provided is not a valid example. Please provide one of the following; ${EXAMPLES.map((x) => x.value)}`);
|
|
331
350
|
}
|
|
351
|
+
await telemetry.submitRecord({
|
|
352
|
+
event: {
|
|
353
|
+
name: "create-tina-app:invoke",
|
|
354
|
+
example,
|
|
355
|
+
useYarn: Boolean(useYarn)
|
|
356
|
+
}
|
|
357
|
+
});
|
|
332
358
|
const root = import_path4.default.join(process.cwd(), dirName);
|
|
333
359
|
if (!await isWriteable(import_path4.default.dirname(root))) {
|
|
334
360
|
console.error("The application path is not writable, please check folder permissions and try again.");
|
|
@@ -360,10 +386,10 @@ var run = async () => {
|
|
|
360
386
|
console.log(import_chalk5.default.bold(" Next steps:"));
|
|
361
387
|
console.log();
|
|
362
388
|
console.log("- Go to http://localhost:3000/admin to enter edit-mode");
|
|
363
|
-
console.log("- Edit some content on http://localhost:3000 (See https://tina.io/using-tina-editor )");
|
|
389
|
+
console.log("- Edit some content on http://localhost:3000 (See https://tina.io/docs/using-tina-editor )");
|
|
364
390
|
console.log("- Check out our concept docs, to learn how Tina powers the starters under the hood. (See https://tina.io/docs/schema/)");
|
|
365
391
|
console.log("- Learn how Tina can be extended to create new field components. (See https://tina.io/docs/advanced/extending-tina/) ");
|
|
366
|
-
console.log("- Make your site editable with Tina on production. (See https://tina.io/docs/tina-cloud/
|
|
392
|
+
console.log("- Make your site editable with Tina on production. (See https://tina.io/docs/tina-cloud/)");
|
|
367
393
|
};
|
|
368
394
|
run();
|
|
369
395
|
// Annotate the CommonJS export names for ESM import in node:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-tina-app",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"typescript": "^4.3.5"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
+
"@tinacms/metrics": "0.0.2",
|
|
41
42
|
"chalk": "^4.1.2",
|
|
42
43
|
"commander": "^8.3.0",
|
|
43
44
|
"cross-spawn": "^7.0.3",
|