codeplay-common 1.7.4 → 1.7.6

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.
@@ -80,6 +80,60 @@ try {
80
80
 
81
81
 
82
82
 
83
+
84
+
85
+
86
+ //@Codemirror check and install/uninstall the packages START
87
+ //const fs = require("fs");
88
+ //const path = require("path");
89
+ //const { execSync } = require("child_process");
90
+
91
+ const baseDir = path.join(__dirname, "..", "src", "js");
92
+
93
+ // Step 1: Find highest versioned folder like `editor-1.6`
94
+ const editorDirs = fs.readdirSync(baseDir)
95
+ .filter(name => /^editor-\d+\.\d+$/.test(name))
96
+ .sort((a, b) => {
97
+ const getVersion = str => str.match(/(\d+)\.(\d+)/).slice(1).map(Number);
98
+ const [aMajor, aMinor] = getVersion(a);
99
+ const [bMajor, bMinor] = getVersion(b);
100
+ return bMajor - aMajor || bMinor - aMinor;
101
+ });
102
+
103
+ if (editorDirs.length === 0) {
104
+
105
+ console.log("@Codemirror used editor(s) are not found")
106
+ //console.error("❌ No editor-x.x folders found in src/js.");
107
+ //process.exit(1);
108
+ }
109
+ else
110
+ {
111
+ const latestEditorDir = editorDirs[editorDirs.length - 1];
112
+ const runJsPath = path.join(baseDir, latestEditorDir, "run.js");
113
+
114
+ if (!fs.existsSync(runJsPath)) {
115
+ console.error(`❌ run.js not found in ${latestEditorDir}`);
116
+ process.exit(1);
117
+ }
118
+
119
+ // Step 2: Execute the run.js file
120
+ console.log(`🚀 Executing ${runJsPath}...`);
121
+ execSync(`node "${runJsPath}"`, { stdio: "inherit" });
122
+ }
123
+
124
+ //@Codemirror check and install/uninstall the packages END
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
83
137
  // saveToGalleryAndSaveAnyFile-x.x-ios.js file check for android and return error if exists START
84
138
 
85
139
  const os = require('os');
@@ -532,7 +586,7 @@ function validateAndroidBuildOptions() {
532
586
  process.exit(1);
533
587
  }
534
588
 
535
- debugger;
589
+
536
590
  const keystorePath=buildOptions.keystorePath
537
591
  const keyFileName = path.basename(keystorePath);
538
592
 
@@ -541,13 +595,12 @@ function validateAndroidBuildOptions() {
541
595
  const keystoreMap = {
542
596
  "gameskey.jks": [
543
597
  "com.cube.blaster",
544
- "com.simple.barcodescanner",
545
- "com.kids.app"
546
598
  ],
547
599
  "htmleditorkeystoke.jks": [
548
600
  "com.HTML.AngularJS.Codeplay",
549
601
  "com.html.codeplay.pro",
550
- "com.bootstrap.code.play"
602
+ "com.bootstrap.code.play",
603
+ "com.kids.learning.master"
551
604
  ]
552
605
  };
553
606
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeplay-common",
3
- "version": "1.7.4",
3
+ "version": "1.7.6",
4
4
  "description": "Common build scripts and files",
5
5
  "scripts": {
6
6
  "postinstall": "node scripts/sync-files.js",