create-ledgit-repo 0.1.1 → 0.1.2
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 +26 -3
- package/package.json +6 -5
package/dist/index.js
CHANGED
|
@@ -15385,6 +15385,11 @@ var require_axios = __commonJS((exports, module) => {
|
|
|
15385
15385
|
// src/index.ts
|
|
15386
15386
|
import { Command } from "commander";
|
|
15387
15387
|
|
|
15388
|
+
// ../../node_modules/@inquirer/core/dist/esm/lib/errors.js
|
|
15389
|
+
class ExitPromptError extends Error {
|
|
15390
|
+
name = "ExitPromptError";
|
|
15391
|
+
}
|
|
15392
|
+
|
|
15388
15393
|
// src/commands/create.ts
|
|
15389
15394
|
import { select, input, password, confirm, checkbox } from "@inquirer/prompts";
|
|
15390
15395
|
import ora from "ora";
|
|
@@ -15392,6 +15397,7 @@ import * as path8 from "node:path";
|
|
|
15392
15397
|
import * as fs11 from "node:fs/promises";
|
|
15393
15398
|
import * as os2 from "node:os";
|
|
15394
15399
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
15400
|
+
import { createRequire as createRequire2 } from "node:module";
|
|
15395
15401
|
|
|
15396
15402
|
// ../bokio-client/dist/config.js
|
|
15397
15403
|
var BOKIO_CONFIG = {
|
|
@@ -22027,6 +22033,9 @@ import { join as join6 } from "node:path";
|
|
|
22027
22033
|
import { homedir } from "node:os";
|
|
22028
22034
|
var config;
|
|
22029
22035
|
var client = null;
|
|
22036
|
+
function initialize(options) {
|
|
22037
|
+
config = options;
|
|
22038
|
+
}
|
|
22030
22039
|
function setVersion(version2) {
|
|
22031
22040
|
if (config) {
|
|
22032
22041
|
config.version = version2;
|
|
@@ -22271,7 +22280,14 @@ async function syncChartOfAccounts2(client2, repoPath) {
|
|
|
22271
22280
|
}
|
|
22272
22281
|
|
|
22273
22282
|
// src/commands/create.ts
|
|
22274
|
-
|
|
22283
|
+
var require2 = createRequire2(import.meta.url);
|
|
22284
|
+
var pkg = require2("../../package.json");
|
|
22285
|
+
initialize({
|
|
22286
|
+
apiKey: "phc_BGMrllb0D2P9DCq7ZEeLp9VYhAK0lof2eTL524dEXoU",
|
|
22287
|
+
host: "https://eu.i.posthog.com",
|
|
22288
|
+
appName: "ledgit"
|
|
22289
|
+
});
|
|
22290
|
+
setVersion(pkg.version);
|
|
22275
22291
|
var __filename2 = fileURLToPath2(import.meta.url);
|
|
22276
22292
|
var __dirname3 = path8.dirname(__filename2);
|
|
22277
22293
|
async function createAgentsFile(targetDir, options) {
|
|
@@ -22591,7 +22607,14 @@ Examples:
|
|
|
22591
22607
|
$ create-ledgit my-company-books
|
|
22592
22608
|
$ create-ledgit -p fortnox
|
|
22593
22609
|
$ create-ledgit my-repo -p bokio -c abc-123 -y
|
|
22594
|
-
`).action((name, options) => {
|
|
22595
|
-
|
|
22610
|
+
`).action(async (name, options) => {
|
|
22611
|
+
try {
|
|
22612
|
+
await createBookkeepingRepo(name, options);
|
|
22613
|
+
} catch (error) {
|
|
22614
|
+
if (error instanceof ExitPromptError) {
|
|
22615
|
+
process.exit(130);
|
|
22616
|
+
}
|
|
22617
|
+
throw error;
|
|
22618
|
+
}
|
|
22596
22619
|
});
|
|
22597
22620
|
program.parse();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-ledgit-repo",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Create a new ledgit bookkeeping repository",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -20,10 +20,11 @@
|
|
|
20
20
|
"type-check": "tsc --noEmit"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@moatless/bookkeeping": "^0.1.
|
|
24
|
-
"@moatless/telemetry": "^0.1.
|
|
25
|
-
"@moatless/bokio-client": "^0.1.
|
|
26
|
-
"@moatless/fortnox-client": "^0.1.
|
|
23
|
+
"@moatless/bookkeeping": "^0.1.2",
|
|
24
|
+
"@moatless/telemetry": "^0.1.2",
|
|
25
|
+
"@moatless/bokio-client": "^0.1.2",
|
|
26
|
+
"@moatless/fortnox-client": "^0.1.2",
|
|
27
|
+
"@inquirer/core": "^10.0.0",
|
|
27
28
|
"@inquirer/prompts": "^7.0.0",
|
|
28
29
|
"commander": "^12.1.0",
|
|
29
30
|
"ora": "^8.1.1",
|