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

@currents/cli

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@currents/cli - npm Package Compare versions

Comparing version 3.1.3 to 4.0.0-aplha.0

4

bin/currents.js
#!/usr/bin/env node
const lib = require('../');
const lib = require("../");
lib.run().catch((error) => {
lib.spawn().catch((error) => {
console.error(error);
process.exit(1);
});

@@ -1,13 +0,15 @@

export declare function run(): Promise<void>;
/// <reference types="cypress" />
/**
* Patch Cypress to inject the Currents SDK.
*
* @param cypressPackage - the entry point to the Cypress package.
* Run Cypress via [Module API]{@link https://docs.cypress.io/guides/guides/module-api}, using Currents.dev as cloud orchestration service.
*
* @param config configuration options for Cypress
* @returns Cypress run results
*/
export declare function patch(cypressPackage?: string): Promise<void>;
export declare function run(config: CypressCommandLine.CypressRunOptions): Promise<any>;
/**
* Reset Cypress to use the original configuration.
* Spawn cypress runner as a child process using [Currents.dev]{@link https://currents.dev} as cloud orchestration service. The child process inherits the all the environment variables and CLI flags
*
* @param cypressPackage - the entry point to the Cypress package.
* @returns child process instance
*/
export declare function reset(cypressPackage?: string): Promise<void>;
export declare function spawn(): Promise<void>;

@@ -1,73 +0,1 @@

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
run: ()=>run,
patch: ()=>patch,
reset: ()=>reset
});
const _cy2 = require("cy2");
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function run() {
return _run.apply(this, arguments);
}
function _run() {
_run = _asyncToGenerator(function*() {
process.env.CYPRESS_API_URL = "https://cy.currents.dev/";
yield (0, _cy2.run)("currents");
});
return _run.apply(this, arguments);
}
function patch() {
return _patch.apply(this, arguments);
}
function _patch() {
_patch = _asyncToGenerator(function*(cypressPackage = require.resolve("cypress")) {
yield (0, _cy2.inject)(`${__dirname}/inject.js`, cypressPackage);
});
return _patch.apply(this, arguments);
}
function reset() {
return _reset.apply(this, arguments);
}
function _reset() {
_reset = _asyncToGenerator(function*(cypressPackage = require.resolve("cypress")) {
yield (0, _cy2.patch)(cypressPackage);
});
return _reset.apply(this, arguments);
}
var p=Object.create;var c=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var m=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty;var w=(n,r)=>{for(var s in r)c(n,s,{get:r[s],enumerable:!0})},i=(n,r,s,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of y(r))!f.call(n,t)&&t!==s&&c(n,t,{get:()=>r[t],enumerable:!(a=u(r,t))||a.enumerable});return n};var C=(n,r,s)=>(s=n!=null?p(m(n)):{},i(r||!n||!n.__esModule?c(s,"default",{value:n,enumerable:!0}):s,n)),d=n=>i(c({},"__esModule",{value:!0}),n);var l={};w(l,{run:()=>g,spawn:()=>h});module.exports=d(l);var e=C(require("cy2")),o="https://cy.currents.dev";async function g(n){return await e.run(o,n)}async function h(){return console.log(`[currents] Using orchestration service: ${o}`),e.spawn(o)}0&&(module.exports={run,spawn});
{
"name": "@currents/cli",
"version": "3.1.3",
"version": "4.0.0-aplha.0",
"license": "MIT",

@@ -8,7 +8,7 @@ "main": "./dist",

"author": {
"name": "Currents",
"name": "Currents Software Inc",
"email": "andrew@currents.dev"
},
"scripts": {
"build": "run-s tsc swc",
"build": "run-s esbuild tsc",
"dev": "run-p watch:*",

@@ -18,5 +18,5 @@ "release": "release-it",

"tsc": "tsc",
"swc": "swc src -d dist",
"esbuild": "esbuild ./src/index.ts --bundle --minify --platform=node --target=node14 --packages=external --outdir=dist",
"watch:tsc": "run-s \"tsc --watch --preserveWatchOutput\"",
"watch:swc": "run-s \"swc --watch\""
"watch:swc": "run-s \"esbuild --watch\""
},

@@ -32,8 +32,12 @@ "repository": {

"bin": {
"currents": "bin/currents.js",
"currents-prepare": "bin/currents-prepare.js",
"currents-reset": "bin/currents-reset.js"
"currents": "bin/currents.js"
},
"engines": {
"node": ">=14.0.0"
},
"peerDependencies": {
"cypress": ">= 6.7.0"
},
"dependencies": {
"cy2": "3.4.1"
"cy2": "4.0.0-beta.13"
},

@@ -69,5 +73,5 @@ "keywords": [

"@release-it/conventional-changelog": "^5.1.0",
"@swc/cli": "^0.1.49",
"@swc/core": "^1.2.85",
"@types/node": "^18.11.3",
"cypress": "^12.1.0",
"esbuild": "^0.16.9",
"npm-run-all": "^4.1.5",

@@ -74,0 +78,0 @@ "release-it": "^15.4.1",

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