@sunasteriskrnd/takumi 1.0.0-dev.20 → 1.0.0-dev.21

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.
Files changed (2) hide show
  1. package/dist/index.js +29 -8
  2. package/package.json +5 -3
package/dist/index.js CHANGED
@@ -8539,7 +8539,7 @@ var package_default;
8539
8539
  var init_package = __esm(() => {
8540
8540
  package_default = {
8541
8541
  name: "@sunasteriskrnd/takumi",
8542
- version: "1.0.0-dev.20",
8542
+ version: "1.0.0-dev.21",
8543
8543
  description: "CLI tool for bootstrapping and managing Takumi projects",
8544
8544
  type: "module",
8545
8545
  repository: {
@@ -8558,8 +8558,10 @@ var init_package = __esm(() => {
8558
8558
  "dist/index.js"
8559
8559
  ],
8560
8560
  scripts: {
8561
- dev: "bun run src/index.ts",
8562
- build: `bun build src/index.ts --outdir dist --target node --external @octokit/rest --external better-sqlite3 --external yauzl-promise --external @node-rs/crc32 && node -e "const fs=require('fs'),f='dist/index.js',c=fs.readFileSync(f,'utf-8');fs.writeFileSync(f,c.replace(/^#!.*\\n\\/\\/ @bun\\n/,''))"`,
8561
+ tkm: "bun scripts/run-cli.ts --",
8562
+ dev: "bun scripts/run-cli.ts --config src/lib/build-config/dev.json --",
8563
+ build: "bun scripts/build-cli.ts",
8564
+ "build:dev": "bun scripts/build-cli.ts --config src/lib/build-config/dev.json",
8563
8565
  "verify:package": "node scripts/prepublish-check.js",
8564
8566
  test: "bun test",
8565
8567
  "test:ci": "NON_INTERACTIVE=true CI_SAFE_MODE=true bun test",
@@ -49377,6 +49379,23 @@ var init_dist6 = __esm(() => {
49377
49379
  console.warn("⚠️ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");
49378
49380
  });
49379
49381
 
49382
+ // src/lib/build-config/prod.json
49383
+ var prod_default;
49384
+ var init_prod = __esm(() => {
49385
+ prod_default = {
49386
+ SERVER_URL: "https://takumi.sun-asterisk.ai",
49387
+ STATE_DIRNAME: ".takumi"
49388
+ };
49389
+ });
49390
+
49391
+ // src/lib/build-config/index.ts
49392
+ var SERVER_URL, STATE_DIRNAME;
49393
+ var init_build_config = __esm(() => {
49394
+ init_prod();
49395
+ SERVER_URL = prod_default.SERVER_URL;
49396
+ STATE_DIRNAME = prod_default.STATE_DIRNAME;
49397
+ });
49398
+
49380
49399
  // src/domains/auth/paths.ts
49381
49400
  import { homedir as homedir21 } from "node:os";
49382
49401
  import { join as join68 } from "node:path";
@@ -49384,7 +49403,7 @@ function getConfigDir() {
49384
49403
  const override = process.env.TAKUMI_HOME;
49385
49404
  if (override && override.trim().length > 0)
49386
49405
  return override;
49387
- return join68(homedir21(), TAKUMI_DIR);
49406
+ return join68(homedir21(), STATE_DIRNAME);
49388
49407
  }
49389
49408
  function getAuthDir() {
49390
49409
  return join68(getConfigDir(), "auth");
@@ -49392,8 +49411,9 @@ function getAuthDir() {
49392
49411
  function getTokenPath() {
49393
49412
  return join68(getAuthDir(), "token.json");
49394
49413
  }
49395
- var TAKUMI_DIR = ".takumi";
49396
- var init_paths2 = () => {};
49414
+ var init_paths2 = __esm(() => {
49415
+ init_build_config();
49416
+ });
49397
49417
 
49398
49418
  // src/domains/auth/config-cache.ts
49399
49419
  import { promises as fs } from "node:fs";
@@ -49528,7 +49548,7 @@ var init_token_store = __esm(() => {
49528
49548
 
49529
49549
  // src/domains/auth/auth-client.ts
49530
49550
  function getServerUrl(options2) {
49531
- return (options2?.serverUrl ?? process.env.TAKUMI_SERVER_URL ?? DEFAULT_SERVER_URL).replace(/\/+$/, "");
49551
+ return (options2?.serverUrl ?? process.env.TAKUMI_SERVER_URL ?? SERVER_URL).replace(/\/+$/, "");
49532
49552
  }
49533
49553
  async function fetchRemoteConfig(serverUrl) {
49534
49554
  const res = await fetch(`${serverUrl}/api/cli/config`, {
@@ -49679,9 +49699,10 @@ async function ensureAuthenticated(options2) {
49679
49699
  throw new NotLoggedInError;
49680
49700
  return token;
49681
49701
  }
49682
- var DEFAULT_SERVER_URL = "https://takumi.sun-asterisk.ai", NotLoggedInError, cachedClient = null, cachedConfig = null;
49702
+ var NotLoggedInError, cachedClient = null, cachedConfig = null;
49683
49703
  var init_auth_client = __esm(() => {
49684
49704
  init_dist6();
49705
+ init_build_config();
49685
49706
  init_config_cache();
49686
49707
  init_token_store();
49687
49708
  NotLoggedInError = class NotLoggedInError extends Error {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sunasteriskrnd/takumi",
3
- "version": "1.0.0-dev.20",
3
+ "version": "1.0.0-dev.21",
4
4
  "description": "CLI tool for bootstrapping and managing Takumi projects",
5
5
  "type": "module",
6
6
  "repository": {
@@ -19,8 +19,10 @@
19
19
  "dist/index.js"
20
20
  ],
21
21
  "scripts": {
22
- "dev": "bun run src/index.ts",
23
- "build": "bun build src/index.ts --outdir dist --target node --external @octokit/rest --external better-sqlite3 --external yauzl-promise --external @node-rs/crc32 && node -e \"const fs=require('fs'),f='dist/index.js',c=fs.readFileSync(f,'utf-8');fs.writeFileSync(f,c.replace(/^#!.*\\n\\/\\/ @bun\\n/,''))\"",
22
+ "tkm": "bun scripts/run-cli.ts --",
23
+ "dev": "bun scripts/run-cli.ts --config src/lib/build-config/dev.json --",
24
+ "build": "bun scripts/build-cli.ts",
25
+ "build:dev": "bun scripts/build-cli.ts --config src/lib/build-config/dev.json",
24
26
  "verify:package": "node scripts/prepublish-check.js",
25
27
  "test": "bun test",
26
28
  "test:ci": "NON_INTERACTIVE=true CI_SAFE_MODE=true bun test",