@nshiab/setup-data-project 1.0.33 → 1.0.34

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.
@@ -1 +1 @@
1
- {"version":3,"file":"createFolderStructure.d.ts","sourceRoot":"","sources":["../../src/helpers/createFolderStructure.ts"],"names":[],"mappings":"AAGA,wBAAgB,qBAAqB,CAAC,gBAAgB,EAAE,MAAM,EAAE,UA6C/D"}
1
+ {"version":3,"file":"createFolderStructure.d.ts","sourceRoot":"","sources":["../../src/helpers/createFolderStructure.ts"],"names":[],"mappings":"AAIA,wBAAgB,qBAAqB,CAAC,gBAAgB,EAAE,MAAM,EAAE,UA8C/D"}
@@ -1,5 +1,6 @@
1
1
  import { existsSync, lstatSync, mkdirSync, writeFileSync } from "node:fs";
2
2
  import { join } from "node:path";
3
+ import { log } from "@clack/prompts";
3
4
  export function createFolderStructure(selectedPackages) {
4
5
  const sdaFolder = "sda";
5
6
  const folders = ["data", "helpers", "output"];
@@ -34,6 +35,7 @@ await sdb.done();
34
35
  }
35
36
  if (lstatSync(mainTsPath, { throwIfNoEntry: false }) === undefined) {
36
37
  writeFileSync(mainTsPath, mainTsContent);
38
+ log.info(`Created ${mainTsPath}`);
37
39
  }
38
40
  return sdaFolder;
39
41
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ensureAgents.d.ts","sourceRoot":"","sources":["../../src/helpers/ensureAgents.ts"],"names":[],"mappings":"AAOA,wBAAgB,YAAY,CAC1B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACnC,OAAO,EAAE,MAAM,EACf,iBAAiB,GAAE,MAAM,EAA6B,QAuHvD"}
1
+ {"version":3,"file":"ensureAgents.d.ts","sourceRoot":"","sources":["../../src/helpers/ensureAgents.ts"],"names":[],"mappings":"AAOA,wBAAgB,YAAY,CAC1B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACnC,OAAO,EAAE,MAAM,EACf,iBAAiB,GAAE,MAAM,EAA6B,QAyHvD"}
@@ -101,7 +101,10 @@ ${sdaClassesAndMethods}`;
101
101
  content,
102
102
  createContent: (managedSection) => managedSection,
103
103
  });
104
- if (status === "created" || status === "updated") {
104
+ if (status === "created") {
105
+ log.info("Created AGENTS.md");
106
+ }
107
+ else if (status === "updated") {
105
108
  log.info("Updated AGENTS.md");
106
109
  }
107
110
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ensureEnvFile.d.ts","sourceRoot":"","sources":["../../src/helpers/ensureEnvFile.ts"],"names":[],"mappings":"AAEA,wBAAgB,aAAa,SAI5B"}
1
+ {"version":3,"file":"ensureEnvFile.d.ts","sourceRoot":"","sources":["../../src/helpers/ensureEnvFile.ts"],"names":[],"mappings":"AAGA,wBAAgB,aAAa,SAK5B"}
@@ -1,6 +1,8 @@
1
1
  import { lstatSync, writeFileSync } from "node:fs";
2
+ import { log } from "@clack/prompts";
2
3
  export function ensureEnvFile() {
3
4
  if (lstatSync(".env", { throwIfNoEntry: false }) === undefined) {
4
5
  writeFileSync(".env", "");
6
+ log.info("Created .env");
5
7
  }
6
8
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ensureGitignore.d.ts","sourceRoot":"","sources":["../../src/helpers/ensureGitignore.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB,4DAC4B,CAAC;AAE5D,wBAAgB,eAAe,SA4B9B"}
1
+ {"version":3,"file":"ensureGitignore.d.ts","sourceRoot":"","sources":["../../src/helpers/ensureGitignore.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB,4DAC4B,CAAC;AAE5D,wBAAgB,eAAe,SA0B9B"}
@@ -20,7 +20,5 @@ export function ensureGitignore() {
20
20
  : "\n\n";
21
21
  const block = `${GITIGNORE_SENTINEL}\n${GITIGNORE_ENTRIES.join("\n")}\n`;
22
22
  writeFileSync(path, content + separator + block);
23
- if (stats !== undefined) {
24
- log.info(`Updated ${path}`);
25
- }
23
+ log.info(`${stats === undefined ? "Created" : "Updated"} ${path}`);
26
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ensureReadme.d.ts","sourceRoot":"","sources":["../../src/helpers/ensureReadme.ts"],"names":[],"mappings":"AAIA,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,EACf,iBAAiB,GAAE,MAAM,EAAO,QAwDjC"}
1
+ {"version":3,"file":"ensureReadme.d.ts","sourceRoot":"","sources":["../../src/helpers/ensureReadme.ts"],"names":[],"mappings":"AAIA,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,EACf,iBAAiB,GAAE,MAAM,EAAO,QA0DjC"}
@@ -46,7 +46,10 @@ When working on your project, use the following command:
46
46
 
47
47
  Have fun!`,
48
48
  });
49
- if (status === "created" || status === "updated") {
49
+ if (status === "created") {
50
+ log.info("Created README.md");
51
+ }
52
+ else if (status === "updated") {
50
53
  log.info("Updated README.md");
51
54
  }
52
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nshiab/setup-data-project",
3
- "version": "1.0.33",
3
+ "version": "1.0.34",
4
4
  "description": "Quickly kick off your data project using the simple-data-analysis and journalism libraries.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1 +1 @@
1
- {"version":3,"file":"createFolderStructure.d.ts","sourceRoot":"","sources":["../../src/helpers/createFolderStructure.ts"],"names":[],"mappings":"AAGA,wBAAgB,qBAAqB,CAAC,gBAAgB,EAAE,MAAM,EAAE,UA6C/D"}
1
+ {"version":3,"file":"createFolderStructure.d.ts","sourceRoot":"","sources":["../../src/helpers/createFolderStructure.ts"],"names":[],"mappings":"AAIA,wBAAgB,qBAAqB,CAAC,gBAAgB,EAAE,MAAM,EAAE,UA8C/D"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createFolderStructure = createFolderStructure;
4
4
  const node_fs_1 = require("node:fs");
5
5
  const node_path_1 = require("node:path");
6
+ const prompts_1 = require("@clack/prompts");
6
7
  function createFolderStructure(selectedPackages) {
7
8
  const sdaFolder = "sda";
8
9
  const folders = ["data", "helpers", "output"];
@@ -37,6 +38,7 @@ await sdb.done();
37
38
  }
38
39
  if ((0, node_fs_1.lstatSync)(mainTsPath, { throwIfNoEntry: false }) === undefined) {
39
40
  (0, node_fs_1.writeFileSync)(mainTsPath, mainTsContent);
41
+ prompts_1.log.info(`Created ${mainTsPath}`);
40
42
  }
41
43
  return sdaFolder;
42
44
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ensureAgents.d.ts","sourceRoot":"","sources":["../../src/helpers/ensureAgents.ts"],"names":[],"mappings":"AAOA,wBAAgB,YAAY,CAC1B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACnC,OAAO,EAAE,MAAM,EACf,iBAAiB,GAAE,MAAM,EAA6B,QAuHvD"}
1
+ {"version":3,"file":"ensureAgents.d.ts","sourceRoot":"","sources":["../../src/helpers/ensureAgents.ts"],"names":[],"mappings":"AAOA,wBAAgB,YAAY,CAC1B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACnC,OAAO,EAAE,MAAM,EACf,iBAAiB,GAAE,MAAM,EAA6B,QAyHvD"}
@@ -104,7 +104,10 @@ ${sdaClassesAndMethods}`;
104
104
  content,
105
105
  createContent: (managedSection) => managedSection,
106
106
  });
107
- if (status === "created" || status === "updated") {
107
+ if (status === "created") {
108
+ prompts_1.log.info("Created AGENTS.md");
109
+ }
110
+ else if (status === "updated") {
108
111
  prompts_1.log.info("Updated AGENTS.md");
109
112
  }
110
113
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ensureEnvFile.d.ts","sourceRoot":"","sources":["../../src/helpers/ensureEnvFile.ts"],"names":[],"mappings":"AAEA,wBAAgB,aAAa,SAI5B"}
1
+ {"version":3,"file":"ensureEnvFile.d.ts","sourceRoot":"","sources":["../../src/helpers/ensureEnvFile.ts"],"names":[],"mappings":"AAGA,wBAAgB,aAAa,SAK5B"}
@@ -2,8 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ensureEnvFile = ensureEnvFile;
4
4
  const node_fs_1 = require("node:fs");
5
+ const prompts_1 = require("@clack/prompts");
5
6
  function ensureEnvFile() {
6
7
  if ((0, node_fs_1.lstatSync)(".env", { throwIfNoEntry: false }) === undefined) {
7
8
  (0, node_fs_1.writeFileSync)(".env", "");
9
+ prompts_1.log.info("Created .env");
8
10
  }
9
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ensureGitignore.d.ts","sourceRoot":"","sources":["../../src/helpers/ensureGitignore.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB,4DAC4B,CAAC;AAE5D,wBAAgB,eAAe,SA4B9B"}
1
+ {"version":3,"file":"ensureGitignore.d.ts","sourceRoot":"","sources":["../../src/helpers/ensureGitignore.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB,4DAC4B,CAAC;AAE5D,wBAAgB,eAAe,SA0B9B"}
@@ -24,7 +24,5 @@ function ensureGitignore() {
24
24
  : "\n\n";
25
25
  const block = `${exports.GITIGNORE_SENTINEL}\n${gitignoreEntries_js_1.GITIGNORE_ENTRIES.join("\n")}\n`;
26
26
  (0, node_fs_1.writeFileSync)(path, content + separator + block);
27
- if (stats !== undefined) {
28
- prompts_1.log.info(`Updated ${path}`);
29
- }
27
+ prompts_1.log.info(`${stats === undefined ? "Created" : "Updated"} ${path}`);
30
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ensureReadme.d.ts","sourceRoot":"","sources":["../../src/helpers/ensureReadme.ts"],"names":[],"mappings":"AAIA,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,EACf,iBAAiB,GAAE,MAAM,EAAO,QAwDjC"}
1
+ {"version":3,"file":"ensureReadme.d.ts","sourceRoot":"","sources":["../../src/helpers/ensureReadme.ts"],"names":[],"mappings":"AAIA,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,EACf,iBAAiB,GAAE,MAAM,EAAO,QA0DjC"}
@@ -49,7 +49,10 @@ When working on your project, use the following command:
49
49
 
50
50
  Have fun!`,
51
51
  });
52
- if (status === "created" || status === "updated") {
52
+ if (status === "created") {
53
+ prompts_1.log.info("Created README.md");
54
+ }
55
+ else if (status === "updated") {
53
56
  prompts_1.log.info("Updated README.md");
54
57
  }
55
58
  }