@hasna/project 0.1.8 → 0.1.10
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":"projects.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/projects.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsEzC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/projects.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsEzC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA8rB9D"}
|
package/dist/cli/index.js
CHANGED
|
@@ -46444,6 +46444,10 @@ function registerProjectCommands(program2) {
|
|
|
46444
46444
|
});
|
|
46445
46445
|
console.log(source_default.green("\u2713 Project created"));
|
|
46446
46446
|
printProject(project);
|
|
46447
|
+
if (!existsSync13(project.path)) {
|
|
46448
|
+
console.log(source_default.yellow(` \u26A0 Path does not exist yet: ${project.path}`));
|
|
46449
|
+
console.log(source_default.dim(` Create it to enable git init and workdir generation.`));
|
|
46450
|
+
}
|
|
46447
46451
|
} catch (err) {
|
|
46448
46452
|
console.error(source_default.red(`Error: ${err instanceof Error ? err.message : String(err)}`));
|
|
46449
46453
|
process.exit(1);
|
|
@@ -46942,6 +46946,7 @@ ${source_default.bold(r2.project.name)} ${source_default.dim(r2.project.slug)}`)
|
|
|
46942
46946
|
});
|
|
46943
46947
|
const cloudCmd = cmd.command("cloud").description("Cloud sync \u2014 push/pull between local SQLite and RDS PostgreSQL");
|
|
46944
46948
|
cloudCmd.command("status").description("Show cloud configuration and connection health").action(async () => {
|
|
46949
|
+
process.env["NODE_NO_WARNINGS"] = "1";
|
|
46945
46950
|
const { getCloudConfig: getCloudConfig2, getConnectionString: getConnectionString2, PgAdapterAsync: PgAdapterAsync2 } = await Promise.resolve().then(() => (init_dist(), exports_dist));
|
|
46946
46951
|
const config = getCloudConfig2();
|
|
46947
46952
|
console.log(`mode: ${config.mode}`);
|
|
@@ -46961,6 +46966,7 @@ ${source_default.bold(r2.project.name)} ${source_default.dim(r2.project.slug)}`)
|
|
|
46961
46966
|
cloudCmd.command("pull").description("Pull data from cloud PostgreSQL to local SQLite").option("--tables <tables>", "Comma-separated table names (default: all)").action(async (opts) => {
|
|
46962
46967
|
console.log(source_default.dim("Pulling from cloud..."));
|
|
46963
46968
|
try {
|
|
46969
|
+
process.env["NODE_NO_WARNINGS"] = "1";
|
|
46964
46970
|
const { syncPull: syncPull2, getCloudConfig: getCloudConfig2, getConnectionString: getConnectionString2, PgAdapterAsync: PgAdapterAsync2, SqliteAdapter: SqliteAdapter2 } = await Promise.resolve().then(() => (init_dist(), exports_dist));
|
|
46965
46971
|
const config = getCloudConfig2();
|
|
46966
46972
|
if (!config.rds?.host) {
|
|
@@ -46985,6 +46991,7 @@ ${source_default.bold(r2.project.name)} ${source_default.dim(r2.project.slug)}`)
|
|
|
46985
46991
|
cloudCmd.command("push").description("Push local SQLite data to cloud PostgreSQL").option("--tables <tables>", "Comma-separated table names (default: all)").action(async (opts) => {
|
|
46986
46992
|
console.log(source_default.dim("Pushing to cloud..."));
|
|
46987
46993
|
try {
|
|
46994
|
+
process.env["NODE_NO_WARNINGS"] = "1";
|
|
46988
46995
|
const { syncPush: syncPush2, getCloudConfig: getCloudConfig2, getConnectionString: getConnectionString2, PgAdapterAsync: PgAdapterAsync2, SqliteAdapter: SqliteAdapter2 } = await Promise.resolve().then(() => (init_dist(), exports_dist));
|
|
46989
46996
|
const { runPgMigrations: runPgMigrations2 } = await Promise.resolve().then(() => (init_pg_migrations(), exports_pg_migrations));
|
|
46990
46997
|
const config = getCloudConfig2();
|
package/dist/mcp/index.js
CHANGED
|
@@ -37372,7 +37372,9 @@ var coerce = {
|
|
|
37372
37372
|
};
|
|
37373
37373
|
var NEVER = INVALID;
|
|
37374
37374
|
// src/mcp/index.ts
|
|
37375
|
-
import { resolve as resolve3 } from "path";
|
|
37375
|
+
import { resolve as resolve3, dirname as dirname6, join as join10 } from "path";
|
|
37376
|
+
import { readFileSync as readFileSync7 } from "fs";
|
|
37377
|
+
import { fileURLToPath } from "url";
|
|
37376
37378
|
|
|
37377
37379
|
// node_modules/nanoid/index.js
|
|
37378
37380
|
import { webcrypto as crypto2 } from "crypto";
|
|
@@ -47545,9 +47547,17 @@ function generateAllWorkdirs(project, options = {}) {
|
|
|
47545
47547
|
}
|
|
47546
47548
|
|
|
47547
47549
|
// src/mcp/index.ts
|
|
47550
|
+
function getPkgVersion() {
|
|
47551
|
+
try {
|
|
47552
|
+
const p2 = join10(dirname6(fileURLToPath(import.meta.url)), "..", "..", "package.json");
|
|
47553
|
+
return JSON.parse(readFileSync7(p2, "utf-8")).version;
|
|
47554
|
+
} catch {
|
|
47555
|
+
return "0.0.0";
|
|
47556
|
+
}
|
|
47557
|
+
}
|
|
47548
47558
|
var server = new McpServer({
|
|
47549
47559
|
name: "project",
|
|
47550
|
-
version:
|
|
47560
|
+
version: getPkgVersion()
|
|
47551
47561
|
});
|
|
47552
47562
|
server.tool("projects_create", "Register a new project. Returns the project with its workingDirectory so AI agents can cd into it.", {
|
|
47553
47563
|
name: exports_external.string().describe("Project name"),
|
package/package.json
CHANGED