verde-sync 2.0.3 → 2.0.4

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.
package/converters.js CHANGED
@@ -20,6 +20,8 @@ const KNOWN_EXTENSIONS = [
20
20
  '.server.lua', '.server.luau',
21
21
  '.client.lua', '.client.luau',
22
22
  '.model.json', '.meta.json',
23
+ '.remoteevent', '.remotefunction',
24
+ '.bindableevent', '.bindablefunction',
23
25
  '.lua', '.luau',
24
26
  '.txt', '.json'
25
27
  ];
@@ -38,8 +40,9 @@ const VALUE_CLASSES = {
38
40
  // ---------------------------------------------------------------------------
39
41
 
40
42
  function stripExtension(filename) {
43
+ const lowerFilename = filename.toLowerCase();
41
44
  for (const ext of KNOWN_EXTENSIONS) {
42
- if (filename.endsWith(ext)) {
45
+ if (lowerFilename.endsWith(ext.toLowerCase())) {
43
46
  return filename.slice(0, -ext.length);
44
47
  }
45
48
  }
@@ -141,6 +144,14 @@ function convertFile(filePath) {
141
144
  } catch (e) {
142
145
  console.error(`[WARN] Error parsing model file ${filePath}:`, e.message);
143
146
  }
147
+ } else if (filename.toLowerCase().endsWith('.remoteevent')) {
148
+ instance.ClassName = 'RemoteEvent';
149
+ } else if (filename.toLowerCase().endsWith('.remotefunction')) {
150
+ instance.ClassName = 'RemoteFunction';
151
+ } else if (filename.toLowerCase().endsWith('.bindableevent')) {
152
+ instance.ClassName = 'BindableEvent';
153
+ } else if (filename.toLowerCase().endsWith('.bindablefunction')) {
154
+ instance.ClassName = 'BindableFunction';
144
155
  } else if (filename.endsWith('.txt')) {
145
156
  instance.ClassName = 'StringValue';
146
157
  instance.Properties.Value = content;
@@ -304,6 +315,18 @@ function instanceToFile(instanceData) {
304
315
  if (className === 'StringValue') {
305
316
  return { fileName: `${name}.txt`, content: value, isDirectory: false };
306
317
  }
318
+ if (className === 'RemoteEvent') {
319
+ return { fileName: `${name}.remoteevent`, content: '', isDirectory: false };
320
+ }
321
+ if (className === 'RemoteFunction') {
322
+ return { fileName: `${name}.remotefunction`, content: '', isDirectory: false };
323
+ }
324
+ if (className === 'BindableEvent') {
325
+ return { fileName: `${name}.bindableevent`, content: '', isDirectory: false };
326
+ }
327
+ if (className === 'BindableFunction') {
328
+ return { fileName: `${name}.bindablefunction`, content: '', isDirectory: false };
329
+ }
307
330
 
308
331
  // Phase 2 - #5: Value types and other instances → .model.json
309
332
  if (VALUE_CLASSES[className] !== undefined) {
package/local-sync.js CHANGED
@@ -397,6 +397,22 @@ process.on('SIGTERM', () => shutdown('SIGTERM'));
397
397
  // Start
398
398
  // ---------------------------------------------------------------------------
399
399
  function startServer() {
400
+ const defaultFolders = [
401
+ ...ROOT_SERVICES,
402
+ 'StarterPlayer/StarterPlayerScripts',
403
+ 'StarterPlayer/StarterCharacterScripts'
404
+ ];
405
+ for (const folder of defaultFolders) {
406
+ const folderPath = path.join(PROJECT_ROOT, folder);
407
+ if (!fs.existsSync(folderPath)) {
408
+ try {
409
+ fs.mkdirSync(folderPath, { recursive: true });
410
+ } catch (e) {
411
+ // Ignore permissions/nested errors
412
+ }
413
+ }
414
+ }
415
+
400
416
  const server = app.listen(PORT, () => {
401
417
  console.log('');
402
418
  console.log(c.bold(c.green(' ╔══════════════════════════════════════════╗')));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "verde-sync",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "Bidirectional sync tool between PC and Roblox Studio",
5
5
  "main": "local-sync.js",
6
6
  "bin": {