calabasas 0.0.6 → 0.0.8

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 +14 -10
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3282,7 +3282,7 @@ function generateHttpHandler(type, validator) {
3282
3282
  });
3283
3283
  }
3284
3284
 
3285
- await ctx.runMutation(internal.calabasasSync.sync${type.charAt(0).toUpperCase() + type.slice(1)}, { ${type}, operation });
3285
+ await ctx.runMutation(internal.calabasas.sync.sync${type.charAt(0).toUpperCase() + type.slice(1)}, { ${type}, operation });
3286
3286
 
3287
3287
  return new Response(JSON.stringify({ success: true }), {
3288
3288
  status: 200,
@@ -3351,8 +3351,8 @@ export {};
3351
3351
  * Editing this file directly will cause your changes to be overwritten.
3352
3352
  */
3353
3353
 
3354
- import { httpAction, internalMutation } from "./_generated/server";
3355
- import { internal } from "./_generated/api";
3354
+ import { httpAction, internalMutation } from "../_generated/server";
3355
+ import { internal } from "../_generated/api";
3356
3356
  import { v } from "convex/values";
3357
3357
 
3358
3358
  // Validators
@@ -3373,7 +3373,7 @@ ${httpHandlers.join(`
3373
3373
  /**
3374
3374
  * Register these routes in your http.ts file:
3375
3375
  *
3376
- * import { calabasasSyncRoutes } from "./calabasas.sync.generated";
3376
+ * import { calabasasSyncRoutes } from "./calabasas/sync";
3377
3377
  *
3378
3378
  * // Add routes to your HTTP router
3379
3379
  * calabasasSyncRoutes.forEach(route => {
@@ -3801,20 +3801,24 @@ async function generate(options) {
3801
3801
  const syncConfig = config.sync ?? {};
3802
3802
  const hasSyncEnabled = syncConfig.guilds || syncConfig.channels || syncConfig.roles || syncConfig.members;
3803
3803
  if (hasSyncEnabled) {
3804
- const schemaPath = path5.join(convexDir, "calabasas.schema.generated.ts");
3804
+ const calabasasDir = path5.join(convexDir, "calabasas");
3805
+ if (!fs9.existsSync(calabasasDir)) {
3806
+ fs9.mkdirSync(calabasasDir, { recursive: true });
3807
+ }
3808
+ const schemaPath = path5.join(calabasasDir, "schema.ts");
3805
3809
  const schemaCode = generateSchemaFile(syncConfig);
3806
3810
  fs9.writeFileSync(schemaPath, schemaCode);
3807
- console.log("Generated convex/calabasas.schema.generated.ts");
3808
- const syncPath = path5.join(convexDir, "calabasas.sync.generated.ts");
3811
+ console.log("Generated convex/calabasas/schema.ts");
3812
+ const syncPath = path5.join(calabasasDir, "sync.ts");
3809
3813
  const syncCode = generateSyncFile(syncConfig);
3810
3814
  fs9.writeFileSync(syncPath, syncCode);
3811
- console.log("Generated convex/calabasas.sync.generated.ts");
3815
+ console.log("Generated convex/calabasas/sync.ts");
3812
3816
  }
3813
3817
  console.log("");
3814
3818
  console.log("Next steps:");
3815
3819
  if (hasSyncEnabled) {
3816
3820
  console.log("1. Add tables to your convex/schema.ts:");
3817
- console.log(' import { calabasasTables } from "./calabasas.schema.generated";');
3821
+ console.log(' import { calabasasTables } from "./calabasas/schema";');
3818
3822
  console.log("");
3819
3823
  console.log(" export default defineSchema({");
3820
3824
  console.log(" ...calabasasTables,");
@@ -3822,7 +3826,7 @@ async function generate(options) {
3822
3826
  console.log(" });");
3823
3827
  console.log("");
3824
3828
  console.log("2. Register sync routes in your convex/http.ts:");
3825
- console.log(' import { calabasasSyncRoutes } from "./calabasas.sync.generated";');
3829
+ console.log(' import { calabasasSyncRoutes } from "./calabasas/sync";');
3826
3830
  console.log("");
3827
3831
  console.log(" calabasasSyncRoutes.forEach(route => http.route(route));");
3828
3832
  console.log("");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "calabasas",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "CLI for Calabasas - Discord Gateway as a Service for Convex",
5
5
  "type": "module",
6
6
  "bin": {