diff --git a/bin/setup_autodeploy.js b/bin/setup_autodeploy.js index 22bfc960b..c4ac086af 100755 --- a/bin/setup_autodeploy.js +++ b/bin/setup_autodeploy.js @@ -8,4 +8,5 @@ cp $SRC_DIR/middleware.js $INSTALL_DIR/lib/middleware.js cp $SRC_DIR/nocache.js $INSTALL_DIR/lib/middleware/nocache.js cp $SRC_DIR/lib_autoreload.js $INSTALL_DIR/lib/middleware/autoreload.js cp $SRC_DIR/res_autoreload.js $INSTALL_DIR/res/middleware/autoreload.js +cp $SRC_DIR/macos-index.js $INSTALL_DIR/../macos-release/index.js echo "Finished copying files from $SRC_DIR to $INSTALL_DIR" diff --git a/package.serve.json b/package.serve.json index 11b7977c7..9a6fa9152 100644 --- a/package.serve.json +++ b/package.serve.json @@ -13,12 +13,18 @@ }, "devDependencies": { "phonegap": "9.0.0+cordova.9.0.0", - "cordova": "9.0.0", - "@ionic/cli": "6.10.1", - "bower": "1.8.8" + "cordova": "^11.1.0", + "@ionic/cli": "6.20.8", + "bower": "1.8.14" }, "dependencies": { "fs-extra": "^9.0.1", - "klaw-sync": "^6.0.0" + "klaw-sync": "^6.0.0", + "shelljs": "^0.8.5" + }, + "cordova": { + "platforms": [ + "browser" + ] } } diff --git a/setup/autoreload/macos-index.js b/setup/autoreload/macos-index.js new file mode 100644 index 000000000..4c2ad690d --- /dev/null +++ b/setup/autoreload/macos-index.js @@ -0,0 +1,38 @@ +'use strict'; +const os = require('os'); + +const nameMap = new Map([ + [22, ['Ventura', '13']], + [21, ['Monterey', '12']], + [20, ['Big Sur', '11']], + [19, ['Catalina', '10.15']], + [18, ['Mojave', '10.14']], + [17, ['High Sierra', '10.13']], + [16, ['Sierra', '10.12']], + [15, ['El Capitan', '10.11']], + [14, ['Yosemite', '10.10']], + [13, ['Mavericks', '10.9']], + [12, ['Mountain Lion', '10.8']], + [11, ['Lion', '10.7']], + [10, ['Snow Leopard', '10.6']], + [9, ['Leopard', '10.5']], + [8, ['Tiger', '10.4']], + [7, ['Panther', '10.3']], + [6, ['Jaguar', '10.2']], + [5, ['Puma', '10.1']] +]); + +const macosRelease = release => { + release = Number((release || os.release()).split('.')[0]); + + const [name, version] = nameMap.get(release); + + return { + name, + version + }; +}; + +module.exports = macosRelease; +// TODO: remove this in the next major version +module.exports.default = macosRelease;