@capacitor/cli
Advanced tools
Comparing version 0.0.9 to 0.0.10
@@ -5,2 +5,3 @@ { | ||
"idiom" : "universal", | ||
"filename" : "splash-2732x2732-2.png", | ||
"scale" : "1x" | ||
@@ -10,2 +11,3 @@ }, | ||
"idiom" : "universal", | ||
"filename" : "splash-2732x2732-1.png", | ||
"scale" : "2x" | ||
@@ -15,3 +17,3 @@ }, | ||
"idiom" : "universal", | ||
"filename" : "Default@2x~universal~anyany.png", | ||
"filename" : "splash-2732x2732.png", | ||
"scale" : "3x" | ||
@@ -18,0 +20,0 @@ } |
@@ -29,4 +29,3 @@ "use strict"; | ||
exports.checkWebDir = checkWebDir; | ||
async function checkPackage(config) { | ||
config; | ||
async function checkPackage(_config) { | ||
if (!await fs_1.existsAsync('package.json')) { | ||
@@ -70,2 +69,6 @@ return `Capacitor needs to run at the root of a NPM package. | ||
exports.readXML = readXML; | ||
function log(...args) { | ||
console.log(...args); | ||
} | ||
exports.log = log; | ||
function logSuccess(...args) { | ||
@@ -134,2 +137,3 @@ const chalk = require('chalk'); | ||
catch (e) { | ||
spinner.fail(`${title}: ${e.message}`); | ||
spinner.stop(); | ||
@@ -136,0 +140,0 @@ throw e; |
@@ -25,3 +25,3 @@ "use strict"; | ||
webDir: 'public', | ||
avocadoRuntimePod: `pod 'Capacitor'`, | ||
capacitorRuntimePod: `pod 'Capacitor'`, | ||
nativeProjectName: 'App', | ||
@@ -85,4 +85,4 @@ assets: { | ||
// Once Capacitor library is released as a cocoapods package, this code is not needed | ||
const avocadoRuntimePath = path_1.join(this.cli.assetsDir, 'Capacitor'); | ||
this.ios.avocadoRuntimePod = `pod 'Capacitor', :path => '${avocadoRuntimePath}'`; | ||
const capacitorRuntimePath = path_1.join(this.cli.assetsDir, 'Capacitor'); | ||
this.ios.capacitorRuntimePod = `pod 'Capacitor', :path => '${capacitorRuntimePath}'`; | ||
} | ||
@@ -116,2 +116,9 @@ catch (e) { | ||
} | ||
mergeConfigData() { | ||
const extConfig = this.app.extConfig || {}; | ||
Object.assign(this.app, extConfig); | ||
if (!path_1.isAbsolute(this.app.webDir)) { | ||
this.app.webDir = path_1.join(this.app.rootDir, this.app.webDir); | ||
} | ||
} | ||
loadExternalConfig() { | ||
@@ -133,9 +140,2 @@ this.app.extConfigFilePath = path_1.join(this.app.rootDir, this.app.extConfigName); | ||
} | ||
mergeConfigData() { | ||
const extConfig = this.app.extConfig || {}; | ||
Object.assign(this.app, extConfig); | ||
if (!path_1.isAbsolute(this.app.webDir)) { | ||
this.app.webDir = path_1.join(this.app.rootDir, this.app.webDir); | ||
} | ||
} | ||
foundExternalConfig() { | ||
@@ -142,0 +142,0 @@ return !!this.app.extConfig; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const program = require("commander"); | ||
const init_1 = require("./tasks/init"); | ||
const copy_1 = require("./tasks/copy"); | ||
@@ -18,2 +19,8 @@ const create_1 = require("./tasks/create"); | ||
program | ||
.command('init') | ||
.description('Initializes a new Capacitor project in the current directory') | ||
.action(() => { | ||
return init_1.initCommand(config); | ||
}); | ||
program | ||
.command('create [directory] [name] [identifier]') | ||
@@ -20,0 +27,0 @@ .description('Creates a new Capacitor project in the given directory') |
@@ -15,3 +15,3 @@ "use strict"; | ||
}); | ||
plugin_1.printPlugins(plugins); | ||
// printPlugins(plugins); | ||
/* | ||
@@ -80,4 +80,4 @@ await autoGeneratePods(plugins); | ||
target 'AvocadoApp' do | ||
${config.ios.avocadoRuntimePod} | ||
target 'CapacitorApp' do | ||
${config.ios.capacitorRuntimePod} | ||
${pods.join('\n')} | ||
@@ -84,0 +84,0 @@ end`; |
@@ -6,4 +6,2 @@ "use strict"; | ||
const common_1 = require("../common"); | ||
const sync_1 = require("./sync"); | ||
const open_1 = require("./open"); | ||
async function addCommand(config, selectedPlatformName) { | ||
@@ -19,7 +17,6 @@ const platformName = await config.askPlatform(selectedPlatformName, `Please choose a platform to add:`); | ||
await common_1.add(config, [common_1.checkPackage, ...addChecks(config, platformName)]); | ||
await generateAvocadoConfig(config); | ||
await common_1.add(config, [common_1.checkWebDir]); | ||
await generateCapacitorConfig(config); | ||
await common_1.add(config, []); // , [checkWebDir]); | ||
await doAdd(config, platformName); | ||
await sync_1.sync(config, platformName); | ||
await open_1.open(config, platformName); | ||
// await sync(config, platformName); | ||
} | ||
@@ -31,7 +28,6 @@ catch (e) { | ||
exports.addCommand = addCommand; | ||
async function generateAvocadoConfig(config) { | ||
async function generateCapacitorConfig(config) { | ||
if (config.foundExternalConfig()) { | ||
return; | ||
} | ||
common_1.logInfo(`Remember you can change the web directory anytime by modifing ${config.app.extConfigName}`); | ||
const inquirer = await Promise.resolve().then(() => require('inquirer')); | ||
@@ -41,4 +37,4 @@ const answers = await inquirer.prompt([{ | ||
name: 'webDir', | ||
message: 'web directory:', | ||
default: 'www' | ||
message: 'What directory are your web assets in? (index.html, built JavaScript, etc.):', | ||
default: 'public' | ||
}]); | ||
@@ -51,5 +47,6 @@ const webDir = answers.webDir; | ||
}); | ||
common_1.logInfo(`💡 You can change the web directory anytime by modifing ${config.app.extConfigName}`); | ||
config.app.webDir = webDir; | ||
} | ||
exports.generateAvocadoConfig = generateAvocadoConfig; | ||
exports.generateCapacitorConfig = generateCapacitorConfig; | ||
function addChecks(config, platformName) { | ||
@@ -56,0 +53,0 @@ if (platformName === config.ios.name) { |
@@ -37,2 +37,3 @@ "use strict"; | ||
async function copyWebDir(config, nativeAbsDir) { | ||
var chalk = require('chalk'); | ||
const webAbsDir = config.app.webDir; | ||
@@ -48,7 +49,7 @@ const webRelDir = path_1.relative(config.app.rootDir, webAbsDir); | ||
else { | ||
await common_1.runTask(`Copying ${webRelDir} -> ${nativeRelDir}`, async () => { | ||
await common_1.runTask(`Copying web assets from ${chalk.bold(webRelDir)} to ${chalk.bold(nativeRelDir)}`, async () => { | ||
await fs_extra_1.remove(nativeAbsDir); | ||
await fs_extra_1.copy(webAbsDir, nativeAbsDir); | ||
return await fs_extra_1.copy(webAbsDir, nativeAbsDir); | ||
}); | ||
} | ||
} |
@@ -18,3 +18,3 @@ "use strict"; | ||
/* | ||
await generateAvocadoConfig(config); | ||
await generateCapacitorConfig(config); | ||
await add(config, [checkWebDir]); | ||
@@ -32,8 +32,8 @@ await create(config, platformName); | ||
async function createApp(config, directory, name, identifier) { | ||
await fs_1.mkdir(directory); | ||
await fs_1.mkdirAsync(directory); | ||
const templateDir = config.app.assets.templateDir; | ||
await common_1.runTask(chalk `Creating app {bold ${name}} in {bold ${directory}} with id {bold ${identifier}}`, () => { | ||
return fs_1.cp(templateDir, directory); | ||
return fs_1.cpAsync(templateDir, directory); | ||
}); | ||
} | ||
exports.createApp = createApp; |
@@ -89,3 +89,3 @@ "use strict"; | ||
dependencies: { | ||
'@avocadojs/core': 'latest' | ||
'@capacitor/core': 'latest' | ||
}, | ||
@@ -92,0 +92,0 @@ devDependencies: { |
@@ -9,4 +9,4 @@ "use strict"; | ||
}; | ||
exports.mkdir = util.promisify(fs.mkdir); | ||
exports.cp = util.promisify(fsExtra.copy); | ||
exports.mkdirAsync = util.promisify(fs.mkdir); | ||
exports.cpAsync = util.promisify(fsExtra.copy); | ||
exports.symlinkAsync = util.promisify(fs.symlink); | ||
@@ -13,0 +13,0 @@ exports.readFileAsync = util.promisify(fs.readFile); |
{ | ||
"name": "@capacitor/cli", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"description": "Capacitor: Cross-platform apps with JavaScript and the web", | ||
@@ -46,2 +46,3 @@ "homepage": "https://ionic-team.github.io/capacitor/", | ||
"dependencies": { | ||
"@types/tar": "^4.0.0", | ||
"chalk": "^2.3.0", | ||
@@ -55,2 +56,5 @@ "commander": "^2.12.2", | ||
"semver": "^5.4.1", | ||
"superagent": "^3.8.2", | ||
"superagent-proxy": "^1.0.2", | ||
"tar": "^4.2.0", | ||
"which": "^1.3.0", | ||
@@ -57,0 +61,0 @@ "xml2js": "^0.4.19" |
@@ -41,12 +41,4 @@ # Capacitor CLI | ||
## Related Projects | ||
* [AvocadoJS CLI](https://www.npmjs.com/package/@avocadojs/cli) - AvocadoJS Command-line interface | ||
* [Ionic](https://www.npmjs.com/package/@ionic/core) - UI Library | ||
* [StencilJS](https://www.npmjs.com/package/@stencil/core) - Web Component Generator | ||
### License | ||
* [MIT](https://github.com/ionic-team/capacitor/blob/master/LICENSE) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1594928
342
1872
1
14
44
11
+ Added@types/tar@^4.0.0
+ Addedsuperagent@^3.8.2
+ Addedsuperagent-proxy@^1.0.2
+ Addedtar@^4.2.0
+ Added@types/minipass@3.3.5(transitive)
+ Added@types/node@22.5.1(transitive)
+ Added@types/tar@4.0.5(transitive)
+ Addedagent-base@4.3.0(transitive)
+ Addedast-types@0.16.1(transitive)
+ Addedasynckit@0.4.0(transitive)
+ Addedbytes@3.1.2(transitive)
+ Addedcall-bind@1.0.7(transitive)
+ Addedchownr@1.1.4(transitive)
+ Addedco@4.6.0(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addedcomponent-emitter@1.3.1(transitive)
+ Addedcookiejar@2.1.4(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addeddata-uri-to-buffer@1.2.0(transitive)
+ Addeddebug@2.6.93.1.03.2.7(transitive)
+ Addeddeep-is@0.1.4(transitive)
+ Addeddefine-data-property@1.1.4(transitive)
+ Addeddegenerator@1.0.4(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addeddepd@2.0.0(transitive)
+ Addedes-define-property@1.0.0(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedes6-promise@4.2.8(transitive)
+ Addedes6-promisify@5.0.0(transitive)
+ Addedescodegen@1.14.3(transitive)
+ Addedesprima@3.1.34.0.1(transitive)
+ Addedestraverse@4.3.0(transitive)
+ Addedesutils@2.0.3(transitive)
+ Addedextend@3.0.2(transitive)
+ Addedfast-levenshtein@2.0.6(transitive)
+ Addedfile-uri-to-path@1.0.0(transitive)
+ Addedform-data@2.5.1(transitive)
+ Addedformidable@1.2.6(transitive)
+ Addedfs-minipass@1.2.7(transitive)
+ Addedftp@0.3.10(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedget-intrinsic@1.2.4(transitive)
+ Addedget-uri@2.0.4(transitive)
+ Addedgopd@1.0.1(transitive)
+ Addedhas-property-descriptors@1.0.2(transitive)
+ Addedhas-proto@1.0.3(transitive)
+ Addedhas-symbols@1.0.3(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedhttp-errors@2.0.0(transitive)
+ Addedhttp-proxy-agent@2.1.0(transitive)
+ Addedhttps-proxy-agent@2.2.4(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedip@1.1.9(transitive)
+ Addedisarray@0.0.11.0.0(transitive)
+ Addedlevn@0.3.0(transitive)
+ Addedlru-cache@4.1.5(transitive)
+ Addedmethods@1.1.2(transitive)
+ Addedmime@1.6.0(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedminipass@2.9.07.1.2(transitive)
+ Addedminizlib@1.3.3(transitive)
+ Addedmkdirp@0.5.6(transitive)
+ Addedms@2.0.02.1.3(transitive)
+ Addednetmask@1.0.6(transitive)
+ Addedobject-inspect@1.13.2(transitive)
+ Addedoptionator@0.8.3(transitive)
+ Addedpac-proxy-agent@2.0.2(transitive)
+ Addedpac-resolver@3.0.0(transitive)
+ Addedprelude-ls@1.1.2(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedproxy-agent@2.3.1(transitive)
+ Addedproxy-from-env@1.1.0(transitive)
+ Addedpseudomap@1.0.2(transitive)
+ Addedqs@6.13.0(transitive)
+ Addedraw-body@2.5.2(transitive)
+ Addedreadable-stream@1.1.142.3.8(transitive)
+ Addedsafe-buffer@5.1.25.2.1(transitive)
+ Addedset-function-length@1.2.2(transitive)
+ Addedsetprototypeof@1.2.0(transitive)
+ Addedside-channel@1.0.6(transitive)
+ Addedsmart-buffer@1.1.15(transitive)
+ Addedsocks@1.1.10(transitive)
+ Addedsocks-proxy-agent@3.0.1(transitive)
+ Addedsource-map@0.6.1(transitive)
+ Addedstatuses@2.0.1(transitive)
+ Addedstring_decoder@0.10.311.1.1(transitive)
+ Addedsuperagent@3.8.3(transitive)
+ Addedsuperagent-proxy@1.0.3(transitive)
+ Addedtar@4.4.19(transitive)
+ Addedthunkify@2.1.2(transitive)
+ Addedtoidentifier@1.0.1(transitive)
+ Addedtslib@2.7.0(transitive)
+ Addedtype-check@0.3.2(transitive)
+ Addedundici-types@6.19.8(transitive)
+ Addedunpipe@1.0.0(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedword-wrap@1.2.5(transitive)
+ Addedxregexp@2.0.0(transitive)
+ Addedyallist@2.1.23.1.1(transitive)