@rimori/client 2.5.37-next.3 → 2.5.37-next.5

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.
@@ -56,6 +56,9 @@ export async function sendConfiguration(config) {
56
56
  rimori_client_version: config.rimori_client_version,
57
57
  provided_languages: availableLanguages.join(','),
58
58
  };
59
+ if (config.dev_sync) {
60
+ requestBody.update_existing = true;
61
+ }
59
62
  try {
60
63
  const response = await fetch(`${config.domain}/release`, {
61
64
  method: 'POST',
@@ -18,6 +18,7 @@ declare const config: {
18
18
  token: string;
19
19
  domain: string;
20
20
  rimori_client_version: any;
21
+ dev_sync: boolean;
21
22
  };
22
23
  export type Config = typeof config;
23
24
  export {};
@@ -29,9 +29,15 @@ if (!pluginId) {
29
29
  console.error('Error: The plugin id (r_id) is not set in package.json');
30
30
  process.exit(1);
31
31
  }
32
- const [releaseChannel] = process.argv.slice(2);
32
+ const cliArgs = process.argv.slice(2);
33
+ const devSync = cliArgs.includes('--dev-sync');
34
+ const releaseChannel = cliArgs.find((a) => !a.startsWith('--'));
33
35
  if (!releaseChannel) {
34
- console.error('Usage: rimori-release <release_channel>');
36
+ console.error('Usage: rimori-release <release_channel> [--dev-sync]');
37
+ process.exit(1);
38
+ }
39
+ if (devSync && releaseChannel !== 'alpha') {
40
+ console.error('--dev-sync is only allowed with the alpha channel');
35
41
  process.exit(1);
36
42
  }
37
43
  const config = {
@@ -41,19 +47,30 @@ const config = {
41
47
  token: RIMORI_TOKEN,
42
48
  domain: process.env.RIMORI_BACKEND_URL || 'https://api.rimori.se',
43
49
  rimori_client_version: packageJson.dependencies['@rimori/client'].replace('^', ''),
50
+ dev_sync: devSync,
44
51
  };
45
52
  /**
46
53
  * Main release process
47
54
  */
48
55
  async function releaseProcess() {
49
56
  try {
50
- console.log(`🚀 Releasing ${config.plugin_id} to ${config.release_channel}...`);
57
+ if (config.dev_sync) {
58
+ console.log(`⚡ Dev-sync ${config.plugin_id} → existing alpha release`);
59
+ }
60
+ else {
61
+ console.log(`🚀 Releasing ${config.plugin_id} to ${config.release_channel}...`);
62
+ }
51
63
  console.log(`📡 Deploying to: ${config.domain}`);
52
64
  // First send the configuration
53
65
  const release_id = await sendConfiguration(config);
54
66
  // Upload prompts (if prompts.config.ts exists)
55
67
  await promptsUpload(config, release_id);
56
68
  await dbUpdate(config, release_id);
69
+ // Dev-sync only pushes metadata — skip bundle upload and finalize.
70
+ if (config.dev_sync) {
71
+ console.log('✅ Dev-sync complete');
72
+ return;
73
+ }
57
74
  // Then upload the files
58
75
  await uploadDirectory(config, release_id);
59
76
  // Then release the plugin
@@ -18,14 +18,8 @@
18
18
  */
19
19
  /**
20
20
  * 'image', 'audio', 'video' and 'file' are stored as `text` (URL) in the database.
21
- * Marking a column with one of these types causes the migration system to:
22
- * 1. Add an `updated_at` timestamp + trigger to the table.
23
- * 2. Register the column for the asset-refs cron, which links rows to bucket
24
- * files (in the `plugin-assets` Supabase bucket) and deletes orphans when
25
- * the row is deleted, the column is replaced, or the value is cleared.
26
- *
27
- * Use these types instead of `text` for any column whose value is a URL into the
28
- * `plugin-assets` bucket — that way the file is automatically cleaned up.
21
+ * The migration system adds an `updated_at` trigger and registers the column for
22
+ * the asset-refs cron, which links rows to bucket files and deletes orphans.
29
23
  */
30
24
  type DbColumnType = 'decimal' | 'integer' | 'text' | 'boolean' | 'json' | 'timestamp' | 'uuid' | 'markdown' | 'vector' | 'image' | 'audio' | 'video' | 'file';
31
25
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rimori/client",
3
- "version": "2.5.37-next.3",
3
+ "version": "2.5.37-next.5",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "repository": {