@rimori/client 2.5.37-next.4 → 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',
|
|
@@ -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
|
|
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
|
-
|
|
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
|