Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grunt-mobify-cloud

Package Overview
Dependencies
Maintainers
3
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-mobify-cloud - npm Package Compare versions

Comparing version 1.0.12 to 1.1.0

upload.tar

3

Gruntfile.js

@@ -50,3 +50,4 @@ /*

settingsFile: settingsPath,
message: grunt.option('message') || ''
message: grunt.option('message') || '',
target: grunt.option('deploy-to-target') || ''
},

@@ -53,0 +54,0 @@ src: ['test/**', '!test/fixtures/creds']

@@ -28,3 +28,3 @@ var grunt = require('grunt');

destPath = srcPath.replace(/[^\/]+\//, '');
// And replace it with 'project-slug/bld/'.

@@ -80,10 +80,26 @@ destPath = path.join(projectSlug, 'bld', destPath);

exports.getProjectApiPath = function(origin, slug, path) {
// Strip trailing slash.
origin = origin.replace(/\/$/, '');
var stripLeadingAndTrailingSlashes = function(str) {
return str.replace(/^\/|\/$/g, '');
};
// Strip leading slash.
path = path.replace(/^\//, '');
// Join all segments and end with a slash
var urlJoin = function(segments) {
var isEmpty = function(x) { return !!x; }
return segments.filter(isEmpty).join('/') + '/';
};
return origin + "/api/projects/" + slug + "/" + path;
exports.getProjectApiPath = function(origin, slug, path, target) {
target = target || '';
origin = stripLeadingAndTrailingSlashes(origin);
path = stripLeadingAndTrailingSlashes(path);
target = stripLeadingAndTrailingSlashes(target);
return urlJoin([
origin,
'api/projects',
slug,
path,
target
]);
};

@@ -126,3 +142,3 @@

// Avoids DEPTH_ZERO_SELF_SIGNED_CERT error for self-signed certs
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";

@@ -132,3 +148,3 @@ var headers = this.getRequestHeaders();

var uri = this.getProjectApiPath(
options.origin, options.projectSlug, 'builds/'
options.origin, options.projectSlug, 'builds', options.target
);

@@ -151,8 +167,8 @@ var headers = this.getRequestHeaders(

throwForStatus(response);
console.log('Build uploaded!');
cb();
});
return request;
};
{
"name": "grunt-mobify-cloud",
"description": "A plugin for working with Mobify projects",
"version": "1.0.12",
"version": "1.1.0",
"homepage": "http://cloud.mobify.com",

@@ -6,0 +6,0 @@ "author": {

@@ -43,2 +43,14 @@ # mobify-upload

### deploy-to-target
> type: string
You can specify a target for the bundle and it will be auto-deployed to this
target after the upload completes. This is useful for making the latest build
of a project available automatically via a build server, for example.
```
grunt mobify-upload --deploy-to-target="ci-development"
```
# mobify-save_credentials

@@ -77,2 +89,2 @@

export GITHUB_PASSWORD='myaccesstoken'
```
```

@@ -12,3 +12,4 @@ module.exports = function(grunt) {

settingsFile: Utils.getSettingsPath(),
origin: 'https://cloud.mobify.com'
origin: 'https://cloud.mobify.com',
target: ''
});

@@ -19,3 +20,4 @@

projectSlug: options.projectSlug,
origin: options.origin
origin: options.origin,
target: options.target
};

@@ -22,0 +24,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc