{"version":3,"sources":["jsdelivr-header.js","/npm/cli-xml-genx@1.0.8/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;ACJA,aAEA,IAAI,QAAU,QAAQ,aAClB,GAAK,QAAQ,WACb,OAAS,QAAQ,8BACjB,KAAO,QAAQ,QACf,GAAK,QAAQ,MAEjB,QACK,QAAQ,SACR,OAAO,YAAa,qBACpB,OAAO,WAAY,6DACnB,QAAO,SAAU,EAAK,GACnB,OAAO,SAAS,GAAI,SAAU,EAAK,GAC3B,EACA,QAAQ,IAAI,GAGhB,OAAO,YAAY,GAAS,SAAU,EAAK,GACnC,GACA,QAAQ,IAAI,GAGF,GAAG,cAAc,CAC3B,SAAU,EACV,UAAW,IACX,KAAM,IAGF,OAAO,SAAU,EAAK,GACtB,GACA,QAAQ,IAAI,GAEhB,GAAG,UAAU,KAAK,KAAK,QAAQ,MAAO,eAAgB,GAAK,SAAU,GAC7D,GACA,QAAQ,IAAI,GAEhB,QAAQ,IAAI,uBAChB,GACJ,GACJ,GACJ,GACJ,IACC,MAAM,QAAQ","file":"/npm/cli-xml-genx@1.0.8/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/cli-xml-genx@1.0.8/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","#!/usr/bin/env node\n\n'use strict';\n\nvar program = require('commander');\nvar sm = require('sitemap');\nvar optGen = require('./modules/optionsgenerator');\nvar path = require('path');\nvar fs = require('fs');\n\nprogram\n    .version('0.0.1')\n    .option('-u, --url', 'Base url for site')\n    .option('-j, --jp', 'Path to json file with list of paths to append to baseUrl')\n    .action(function (url, jp) {\n        optGen.readJson(jp, function (err, jsonObj) {\n            if (err) {\n                console.log(err);\n                return;\n            }\n            optGen.generateObj(jsonObj, function (err, arrayOfOptions) {\n                if (err) {\n                    console.log(err);\n                }\n\n                var sitemap = sm.createSitemap({\n                    hostname: url,\n                    cacheTime: 600000,        // 600 sec - cache purge period\n                    urls: arrayOfOptions\n                });\n\n                sitemap.toXML( function (err, xml) {\n                    if (err) {\n                        console.log(err);\n                    }\n                    fs.writeFile(path.join(process.cwd(), 'sitemap.xml'), xml, function (err) {\n                        if (err) {\n                            console.log(err);\n                        }\n                        console.log('Witten new file xml!');\n                    });\n                });\n            });\n        });\n    })\n    .parse(process.argv);\n\n\n"]}