conflict_resolution
stringlengths
27
16k
<<<<<<< ======= /** * Webpack Plugins */ var CopyWebpackPlugin = require('copy-webpack-plugin'); var HtmlWebpackPlugin = require('html-webpack-plugin'); var ForkCheckerPlugin = require('awesome-typescript-loader').ForkCheckerPlugin; /** * Webpack Constants */ const ENV = process.env.ENV = process.env.NODE_ENV = 'development'; const HMR = helpers.hasProcessFlag('hot'); const METADATA = { title: 'Angular2 Webpack Starter by @gdi2990 from @AngularClass', baseUrl: '/', host: process.env.HOST || 'localhost', port: process.env.PORT || 3000, ENV: ENV, HMR: HMR }; /** * Webpack configuration * * See: http://webpack.github.io/docs/configuration.html#cli */ module.exports = { // Static metadata for index.html // // See: (custom attribute) metadata: METADATA, >>>>>>> /** * Webpack configuration * * See: http://webpack.github.io/docs/configuration.html#cli */
<<<<<<< "status": "状态", "no_notifications": "没有通知", "enable_desktop_notifications": "Enable Desktop Notifications", "desktop_notification_enabled": "Desktop Notifications Enabled!", "notifications_enabled": "Notifications Enabled", "contract_type": "合同类型", "filters": "过滤器", "send_tokens": "Send Tokens", ======= "status": "状态", "no_notifications": "没有通知", "enable_desktop_notifications": "启用桌面通知", "desktop_notification_enabled": "桌面通知启用!", "notifications_enabled": "通知启用", "contract_type": "合约类型", >>>>>>> "status": "状态", "no_notifications": "没有通知", "enable_desktop_notifications": "启用桌面通知", "desktop_notification_enabled": "桌面通知启用!", "notifications_enabled": "通知启用", "contract_type": "合同类型", "filters": "过滤器", "send_tokens": "Send Tokens", <<<<<<< "token_created": "Token created", "witness": "见证", ======= "token_created": "通证已创建", "witness": "超级代表", >>>>>>> "token_created": "通证已创建", "witness": "超级代表", <<<<<<< "loading_transaction": "加载交易", ======= "loading_transaction": "交易加载中", >>>>>>> "loading_transaction": "交易加载中", <<<<<<< "unable_to_rename_message": "Something went wrong while updating your account name, please try again later", "unfreeze_trx_confirm_message": "Are you sure you want to unfreeze TRX?", "unfreeze_assets": "Unfreeze Assets", "sure_to_unfreeze_unlocked_tokens_message": "Are you sure you want to unfreeze unlocked tokens?", ======= "unable_to_rename_message": "更新名字时出现错误,请稍后重试", "unfreeze_trx_confirm_message": "确定要解冻TRX?", >>>>>>> "unable_to_rename_message": "更新名字时出现错误,请稍后重试", "unfreeze_trx_confirm_message": "确定要解冻TRX?", "unfreeze_assets": "Unfreeze Assets", "sure_to_unfreeze_unlocked_tokens_message": "Are you sure you want to unfreeze unlocked tokens?", <<<<<<< "apply_representative_error_message_0": "Something went wrong while trying to apply for representative.", "apply_representative_error_message_1": "Make sure you have enough TRX for the fee, or try again later.", "open_external_link":"You are opening an external link", "private_key_untrusted_website_message_0": "Never enter your private key on an untrusted website.", "no_official_tron_website": "is not an official Tron site.", "continue_to_external_website": "Continue to external site", "url_changed": "URL changed", "successfully_changed_website_message": "Successfully changed website to ", "unable_to_change_website_title": "Unable to change URL", "unable_to_change_website_message": "Something went wrong while updating the website, please try again later", "successfully_linked_github": "Successfully linked to Github!", "github_linked": "Github linked!", "unable_to_link_github_message": "Could not link to Github, make sure your username is correct!", "could_not_link_github": "Could not link Github", "enter_your_github_username": "Enter your Github username", "link_to_github": "Link to Github", "link_github": "Link Github", "you_must_enter_a_url": "You must enter a URL", "success": "Success", "successfully_appied_sr_canidate_message_0": "Successfully applied to be Super Representative Candidate.", "successfully_appied_sr_canidate_message_1": "Your account will be upgraded shortly.", "landing_page": "Landing Page", "show_more_information_publish_sr_page": "Show more Information on how to publish a page", "create_sr_landing_page_message_0": "Super Representatives can create a landing page on which they can share more information about their team and plans", "set_github_url_message_0": "Did you already configure your Github template? Then set the URL by using the button below", "set_github_link": "Set Github Link", "could_not_claim_rewards": "Could not claim rewards", "claim_rewards_error_message": "Something went wrong while trying to claim rewards, please try again later.", "rewards_claimed": "Rewards Claimed!", "successfully_claimed_rewards": "Successfully claimed rewards", "claim_rewards": "Claim Rewards", "sr_receive_reward_message_0": "As a representative you receive rewards for producing blocks. These rewards can be claimed every 24 hours", ======= "apply_representative_error_message_0": "当你试图申请超级代表时出错了.", "apply_representative_error_message_1": "确保有足够的TRX来支付费用或者稍后再尝试.", >>>>>>> "apply_representative_error_message_0": "当你试图申请超级代表时出错了.", "apply_representative_error_message_1": "确保有足够的TRX来支付费用或者稍后再尝试.", "open_external_link":"You are opening an external link", "private_key_untrusted_website_message_0": "Never enter your private key on an untrusted website.", "no_official_tron_website": "is not an official Tron site.", "continue_to_external_website": "Continue to external site", "url_changed": "URL changed", "successfully_changed_website_message": "Successfully changed website to ", "unable_to_change_website_title": "Unable to change URL", "unable_to_change_website_message": "Something went wrong while updating the website, please try again later", "successfully_linked_github": "Successfully linked to Github!", "github_linked": "Github linked!", "unable_to_link_github_message": "Could not link to Github, make sure your username is correct!", "could_not_link_github": "Could not link Github", "enter_your_github_username": "Enter your Github username", "link_to_github": "Link to Github", "link_github": "Link Github", "you_must_enter_a_url": "You must enter a URL", "success": "Success", "successfully_appied_sr_canidate_message_0": "Successfully applied to be Super Representative Candidate.", "successfully_appied_sr_canidate_message_1": "Your account will be upgraded shortly.", "landing_page": "Landing Page", "show_more_information_publish_sr_page": "Show more Information on how to publish a page", "create_sr_landing_page_message_0": "Super Representatives can create a landing page on which they can share more information about their team and plans", "set_github_url_message_0": "Did you already configure your Github template? Then set the URL by using the button below", "set_github_link": "Set Github Link", "could_not_claim_rewards": "Could not claim rewards", "claim_rewards_error_message": "Something went wrong while trying to claim rewards, please try again later.", "rewards_claimed": "Rewards Claimed!", "successfully_claimed_rewards": "Successfully claimed rewards", "claim_rewards": "Claim Rewards", "sr_receive_reward_message_0": "As a representative you receive rewards for producing blocks. These rewards can be claimed every 24 hours",
<<<<<<< const DOWN_SAMPLE_FRAG = require('./shaders/post-processing/down-sample.frag.js') ======= const DOF_FRAG = require('./shaders/post-processing/dof.frag.js') >>>>>>> const DOWN_SAMPLE_FRAG = require('./shaders/post-processing/down-sample.frag.js') const DOF_FRAG = require('./shaders/post-processing/dof.frag.js')
<<<<<<< ======= pointLights.forEach((light, i) => { sharedUniforms['uPointLights[' + i + '].position'] = light.entity.transform.worldPosition sharedUniforms['uPointLights[' + i + '].color'] = light.color sharedUniforms['uPointLights[' + i + '].range'] = light.range sharedUniforms['uPointLights[' + i + '].castShadows'] = light.castShadows sharedUniforms['uPointLightShadowMaps[' + i + ']'] = light.castShadows ? light._shadowCubemap : this._dummyTextureCube }) >>>>>>> pointLights.forEach((light, i) => { sharedUniforms['uPointLights[' + i + '].position'] = light.entity.transform.worldPosition sharedUniforms['uPointLights[' + i + '].color'] = light.color sharedUniforms['uPointLights[' + i + '].range'] = light.range sharedUniforms['uPointLights[' + i + '].castShadows'] = light.castShadows sharedUniforms['uPointLightShadowMaps[' + i + ']'] = light.castShadows ? light._shadowCubemap : this._dummyTextureCube })
<<<<<<< vec3 position; vec3 direction; vec4 color; float angle; float range; mat4 projectionMatrix; mat4 viewMatrix; bool castShadows; float near; float far; float bias; vec2 shadowMapSize; ======= vec3 position; vec3 direction; vec4 color; float innerAngle; float angle; float range; >>>>>>> vec3 position; vec3 direction; vec4 color; float innerAngle; float angle; float range; mat4 projectionMatrix; mat4 viewMatrix; bool castShadows; float near; float far; float bias; vec2 shadowMapSize; <<<<<<< ======= void EvaluateSpotLight(inout PBRData data, SpotLight light, int i) { float illuminated = 1.0; // no shadows yet >>>>>>> <<<<<<< data.lightWorld = light.position - data.positionWorld; float dist = length(data.lightWorld); data.lightWorld /= dist; vec3 N = data.normalWorld; vec3 V = data.viewWorld; vec3 L = data.lightWorld; vec3 H = normalize(V + L); data.NdotL = clamp(dot(N, L), 0.001, 1.0); data.HdotV = max(0.0, dot(H, V)); data.NdotH = max(0.0, dot(N, H)); data.LdotH = max(0.0, dot(L, H)); vec3 F = SpecularReflection(data); float D = MicrofacetDistribution(data); float G = GeometricOcclusion(data); vec3 nominator = F * G * D; float denominator = 4.0 * data.NdotV * data.NdotL + 0.001; vec3 specularBrdf = nominator / denominator; vec3 lightColor = decode(light.color, 3).rgb; lightColor *= light.color.a; // intensity // Compute falloff and cutOff float distanceRatio = clamp(1.0 - pow(dist / light.range, 4.0), 0.0, 1.0); float distanceFalloff = (distanceRatio * distanceRatio) / (max(dist * dist, 0.01)); float fCosine = max(0.0, dot(light.direction, -L)); float cutOff = cos(light.angle); float fDif = 1.0 - cutOff; float falloff = clamp((fCosine - cutOff)/fDif, 0.0, 1.0); falloff = pow(falloff, 2.0) * distanceFalloff; //TODO: (1 - F) comes from glTF spec, three.js doesn't have it? Schlick BRDF vec3 irradiance = data.NdotL * lightColor * illuminated; irradiance *= falloff; data.directDiffuse += (1.0 - F) * DiffuseLambert(data.diffuseColor) * irradiance; data.directSpecular += specularBrdf * irradiance; ======= vec3 posToLight = light.position - data.positionWorld; float invSqrFalloff = 1.0 / pow(light.range, 2.0); float attenuation = getDistanceAttenuation(posToLight, invSqrFalloff); // TODO: luminous power to intensity float innerAngle = light.innerAngle; float cosOuter = cos(light.angle); float cosInner = cos(innerAngle); float cosOuterSquared = cosOuter * cosOuter; float scale = 1.0 / max(1.0 / 1024.0, cosInner - cosOuter); float offset = -cosOuter * scale; vec2 scaleOffset = vec2(scale, offset); attenuation *= getAngleAttenuation(-light.direction, normalize(posToLight), scaleOffset); Light l; l.l = normalize(posToLight); l.color = light.color; l.attenuation = attenuation; getSurfaceShading(data, l, illuminated); >>>>>>> vec3 posToLight = light.position - data.positionWorld; float invSqrFalloff = 1.0 / pow(light.range, 2.0); float attenuation = getDistanceAttenuation(posToLight, invSqrFalloff); // TODO: luminous power to intensity float innerAngle = light.innerAngle; float cosOuter = cos(light.angle); float cosInner = cos(innerAngle); float cosOuterSquared = cosOuter * cosOuter; float scale = 1.0 / max(1.0 / 1024.0, cosInner - cosOuter); float offset = -cosOuter * scale; vec2 scaleOffset = vec2(scale, offset); attenuation *= getAngleAttenuation(-light.direction, normalize(posToLight), scaleOffset); Light l; l.l = normalize(posToLight); l.color = light.color; l.attenuation = attenuation; getSurfaceShading(data, l, illuminated);
<<<<<<< ${SHADERS.depthUnpack} ======= ${SHADERS.normalPerturb} ${SHADERS.irradiance} >>>>>>> ${SHADERS.depthUnpack} ${SHADERS.normalPerturb} ${SHADERS.irradiance} <<<<<<< EvaluateAmbientLight(data, light); ======= EvaluateAmbientLight(data, light, i, ao); >>>>>>> EvaluateAmbientLight(data, light, ao);
<<<<<<< // TODO: how fast is building these flag strings every frame for every object? Renderer.prototype.getMaterialProgram = function (geometry, material, skin, options) { ======= var PBRVert = require('./glsl/PBR.vert.js') var PBRFrag = require('./glsl/PBR.frag.js') Renderer.prototype.getMaterialProgramAndFlags = function (geometry, material, skin, options) { >>>>>>> Renderer.prototype.getMaterialProgramAndFlags = function (geometry, material, skin, options) {
<<<<<<< import { Icon, Divider } from 'react-native-elements'; import Colors from '../../theme/colors'; ======= >>>>>>> import { Icon, Divider } from 'react-native-elements'; import Colors from '../../theme/colors';
<<<<<<< {expand: true, cwd: 'bower_components/animate.css/', src: 'animate.css', dest: 'lib/'}, {expand: true, cwd: 'bower_components/kdbxweb/dist/', src: 'kdbxweb.js', dest: 'lib/'} ======= {expand: true, cwd: 'bower_components/animate.css/', src: 'animate.css', dest: 'lib/'}, {expand: true, cwd: 'bower_components/components-font-awesome/', src:"fonts/*", dest:"build/"} >>>>>>> {expand: true, cwd: 'bower_components/animate.css/', src: 'animate.css', dest: 'lib/'}, {expand: true, cwd: 'bower_components/kdbxweb/dist/', src: 'kdbxweb.js', dest: 'lib/'}, {expand: true, cwd: 'bower_components/components-font-awesome/', src:"fonts/*", dest:"build/"}
<<<<<<< infixpat, function(op) { return new InfixSymbol(op); ======= /^([\w|\.]|[^\u0000-\u0080])+|'((\\.)|[^\\'])+'|"((\\.)|[^\\"])+"/, function(name) { return new Symbol(name); >>>>>>> infixpat, function(op) { return new InfixSymbol(op); <<<<<<< key = poly.parser.unbracket(filter.expr.name); spec = _.pick(filter, 'lt', 'gt', 'le', 'ge', 'in'); return _.each(spec, function(value, predicate) { ======= if (!(predicate in filters)) { return; } >>>>>>> key = poly.parser.unbracket(filter.expr.name); spec = _.pick(filter, 'lt', 'gt', 'le', 'ge', 'in'); return _.each(spec, function(value, predicate) { if (!(predicate in filters)) { return; }
<<<<<<< cell = $("<td>" + (poly.parser.unbracket(v["var"])) + "</td>"); ======= cell = $("<td class='heading'>" + v["var"] + "</td>"); >>>>>>> cell = $("<td class='heading'>" + (poly.parser.unbracket(v["var"])) + "</td>"); <<<<<<< name = poly.parser.unbracket(val["var"]); v = pivotData.get(rows, cols, name); v = v ? formatters[name](v) : '-'; row.append($("<td>" + v + "</td>").attr('align', 'right')); ======= v = pivotData.get(rows, cols, val["var"]); v = v ? formatters[val["var"]](v) : '-'; row.append($("<td class='value'>" + v + "</td>").attr('align', 'right')); >>>>>>> name = poly.parser.unbracket(val["var"]); v = pivotData.get(rows, cols, name); v = v ? formatters[name](v) : '-'; row.append($("<td class='value'>" + v + "</td>").attr('align', 'right'));
<<<<<<< for (var i in selection_records) { var dragfeat = selection_records[i].feature; var is_subfeature = (!!dragfeat.parent); // !! is shorthand for returning true if value is defined and non-null var parentId = is_subfeature ? dragfeat.parent() : dragfeat.id(); ======= for (var i in feats) { var dragfeat = feats[i]; var is_subfeature = !! dragfeat.parent(); // !! is shorthand for returning true if value is defined and non-null var parentId = is_subfeature ? dragfeat.parent().id() : dragfeat.id(); >>>>>>> for (var i in selection_records) { var dragfeat = selection_records[i].feature; var is_subfeature = !! dragfeat.parent(); // !! is shorthand for returning true if value is defined and non-null var parentId = is_subfeature ? dragfeat.parent().id() : dragfeat.id();
<<<<<<< this.indexToChr.push({ name: name, length: lRef }); p = p + 8 + lName; } ======= var headLen = readInt(uncba, 4); // var header = ''; // for (var i = 0; i < headLen; ++i) { // header += String.fromCharCode(uncba[i + 8]); // } var nRef = readInt(uncba, headLen + 8); var p = headLen + 12; this.chrToIndex = {}; this.indexToChr = []; for (var i = 0; i < nRef; ++i) { var lName = readInt(uncba, p); var name = ''; for (var j = 0; j < lName-1; ++j) { name += String.fromCharCode(uncba[p + 4 + j]); } var lRef = readInt(uncba, p + lName + 4); // dlog(name + ': ' + lRef); this.chrToIndex[name] = i; if (name.indexOf('chr') == 0) { this.chrToIndex[name.substring(3)] = i; } else { this.chrToIndex['chr' + name] = i; } this.indexToChr.push(name); p = p + 8 + lName; } >>>>>>> var headLen = readInt(uncba, 4); // var header = ''; // for (var i = 0; i < headLen; ++i) { // header += String.fromCharCode(uncba[i + 8]); // } var nRef = readInt(uncba, headLen + 8); var p = headLen + 12; this.chrToIndex = {}; this.indexToChr = []; for (var i = 0; i < nRef; ++i) { var lName = readInt(uncba, p); var name = ''; for (var j = 0; j < lName-1; ++j) { name += String.fromCharCode(uncba[p + 4 + j]); } var lRef = readInt(uncba, p + lName + 4); // dlog(name + ': ' + lRef); this.chrToIndex[name] = i; if (name.indexOf('chr') == 0) { this.chrToIndex[name.substring(3)] = i; } else { this.chrToIndex['chr' + name] = i; } this.indexToChr.push({ name: name, length: lRef }); p = p + 8 + lName; }
<<<<<<< var offset = this.config.data_offset || 0; var origin = (function() { if ( 'bicolor_pivot' in this.config ) { if ( this.config.bicolor_pivot == 'mean' ) { return s.mean || 0; } else if ( this.config.bicolor_pivot == 'zero' ) { return 0; } else { return parseFloat( this.config.bicolor_pivot ); } } else if ( this.config.scale == 'z_score' ) { return s.mean || 0; } else if ( this.config.scale == 'log' ) { return 1; } else { return 0; } }).call(this) ======= var offset = parseFloat( this.config.data_offset ) || 0; >>>>>>> var offset = parseFloat( this.config.data_offset ) || 0; var origin = (function() { if ( 'bicolor_pivot' in this.config ) { if ( this.config.bicolor_pivot == 'mean' ) { return s.mean || 0; } else if ( this.config.bicolor_pivot == 'zero' ) { return 0; } else { return parseFloat( this.config.bicolor_pivot ); } } else if ( this.config.scale == 'z_score' ) { return s.mean || 0; } else if ( this.config.scale == 'log' ) { return 1; } else { return 0; } }).call(this)
<<<<<<< p.js = resolved+"/js"; ======= p.js = p.location+"/js"; //URL resolution for this is taken care of by the JS loader >>>>>>> p.js = p.location+"/js"; //URL resolution for this is taken care of by the JS loader <<<<<<< navigateTo: function(loc) { this.afterMilestone( 'completely initialized', dojo.hitch( this, function() { ======= Browser.prototype.navigateTo = function(loc) { this.afterMilestone( 'initView', dojo.hitch( this, function() { >>>>>>> navigateTo: function(loc) { this.afterMilestone( 'initView', dojo.hitch( this, function() { <<<<<<< navigateToLocation: function( location ) { ======= Browser.prototype.navigateToLocation = function( location ) { this.afterMilestone( 'initView', dojo.hitch( this, function() { // validate the ref seq we were passed var ref = location.ref ? Util.matchRefSeqName( location.ref, this.allRefs ) : this.refSeq; if( !ref ) return; location.ref = ref.name; >>>>>>> navigateToLocation: function( location ) { this.afterMilestone( 'initView', dojo.hitch( this, function() { // validate the ref seq we were passed var ref = location.ref ? Util.matchRefSeqName( location.ref, this.allRefs ) : this.refSeq; if( !ref ) return; location.ref = ref.name; <<<<<<< return; }, ======= this.showTracks( curTracks ); } })); }; >>>>>>> this.showTracks( curTracks ); } })); }, <<<<<<< showTracks: function( trackNames ) { this.afterMilestone('completely initialized', dojo.hitch( this, function() { ======= Browser.prototype.showTracks = function( trackNames ) { this.afterMilestone('initView', dojo.hitch( this, function() { >>>>>>> showTracks: function( trackNames ) { this.afterMilestone('initView', dojo.hitch( this, function() {
<<<<<<< _fillSequenceBlock: function( block, scale, feature ) { var seq = feature.get('seq'); var start = feature.get('start'); var end = feature.get('end'); // fill with leading blanks if the // sequence does not extend all the way ======= _fillSequenceBlock: function( block, scale, start, end, seq ) { // pad with blanks if the sequence does not extend all the way >>>>>>> _fillSequenceBlock: function( block, scale, feature ) { var seq = feature.get('seq'); var start = feature.get('start'); var end = feature.get('end'); // fill with leading blanks if the // sequence does not extend all the way // pad with blanks if the sequence does not extend all the way
<<<<<<< define( [ 'dojo/_base/declare', 'JBrowse/Store', 'JBrowse/Util'], function( declare, Store, Util ) { return declare( null, ======= define( ['JBrowse/Store', 'JBrowse/Util', 'JBrowse/Digest/Crc32' ], function( Store, Util, Crc32 ) { >>>>>>> define( ['JBrowse/Store', 'JBrowse/Util', 'JBrowse/Digest/Crc32' ], function( Store, Util, Crc32 ) { return declare( null, <<<<<<< var sequrl = Util.resolveUrl( this.baseUrl, Util.fillTemplate( this.urlTemplate, {'refseq': seq.name} )); ======= var sequrl = Util.resolveUrl( this.baseUrl, Util.fillTemplate( this.urlTemplate, { 'refseq': seq.name, 'refseq_dirpath': function() { var hex = Crc32.crc32( seq.name ) .toString(16) .toLowerCase() .replace('-','n'); // zero-pad the hex string to be 8 chars if necessary while( hex.length < 8 ) hex = '0'+hex; var dirpath = []; for( var i = 0; i < hex.length; i += 3 ) { dirpath.push( hex.substring( i, i+3 ) ); } return dirpath.join('/'); } }) ); >>>>>>> var sequrl = Util.resolveUrl( this.baseUrl, Util.fillTemplate( this.urlTemplate, { 'refseq': seq.name, 'refseq_dirpath': function() { var hex = Crc32.crc32( seq.name ) .toString(16) .toLowerCase() .replace('-','n'); // zero-pad the hex string to be 8 chars if necessary while( hex.length < 8 ) hex = '0'+hex; var dirpath = []; for( var i = 0; i < hex.length; i += 3 ) { dirpath.push( hex.substring( i, i+3 ) ); } return dirpath.join('/'); } }) );
<<<<<<< "sign_in_with_ledger":"LEDGER", ======= "TRC20_under_maintenance":"TRC20 under maintenance", "transaction_fewer_than_100000":"1. When there are fewer than 100,000 (including 100,000) transaction data entries, all the data will be displayed.", "transaction_more_than_100000":"2. When there are more than 100,000 transaction data entries, data of the latest 7 days will be displayed. ", >>>>>>> "sign_in_with_ledger":"LEDGER", "TRC20_under_maintenance":"TRC20 under maintenance", "transaction_fewer_than_100000":"1. When there are fewer than 100,000 (including 100,000) transaction data entries, all the data will be displayed.", "transaction_more_than_100000":"2. When there are more than 100,000 transaction data entries, data of the latest 7 days will be displayed. ",
<<<<<<< var blocks = wp.data.select( "core/block-editor" ).getBlocks(); var blockFields = _.map( _.filter( blocks, function( block ) { return block.name.startsWith( "acf/" ) && ( block.attributes.mode === "preview" || block.attributes.mode === "auto" ); } ), function( block ) { var fieldData = { $el: jQuery( `[data-block="${block.clientId}"] .acf-block-preview` ), key: block.attributes.id, type: "block_preview", name: block.name, post_meta_key: block.name, }; innerFields.push( fieldData ); return fieldData; } ); fields = _.union( fields, blockFields ); ======= // First check if we can use Gutenberg. if ( wp.data.select( "core/block-editor" ) ) { // Gutenberg is available. var blocks = wp.data.select( "core/block-editor" ).getBlocks(); var blockFields = _.map( _.filter( blocks, function( block ) { return block.name.startsWith( "acf/" ) && block.attributes.mode === "preview"; } ), function( block ) { var fieldData = { $el: jQuery( `[data-block="${block.clientId}"] .acf-block-preview` ), key: block.attributes.id, type: "block_preview", name: block.name, post_meta_key: block.name, }; innerFields.push( fieldData ); return fieldData; } ); fields = _.union( fields, blockFields ); } >>>>>>> // First check if we can use Gutenberg. if ( wp.data.select( "core/block-editor" ) ) { // Gutenberg is available. var blocks = wp.data.select( "core/block-editor" ).getBlocks(); var blockFields = _.map( _.filter( blocks, function( block ) { return block.name.startsWith( "acf/" ) && ( block.attributes.mode === "preview" || block.attributes.mode === "auto" ); } ), function( block ) { var fieldData = { $el: jQuery( `[data-block="${block.clientId}"] .acf-block-preview` ), key: block.attributes.id, type: "block_preview", name: block.name, post_meta_key: block.name, }; innerFields.push( fieldData ); return fieldData; } ); fields = _.union( fields, blockFields ); }
<<<<<<< // ATTENTION: // binding to :: only receives IPv4 connections if the bindv6only // sysctl is set 0, which is the default on many operating systems. self._httpServer && self._httpServer.listen(port.http || port, '::') self._udpServer && self._udpServer.bind(port.udp || port) ======= self._httpServer && self._httpServer.listen(port.http || port) self._udpSocket && self._udpSocket.bind(port.udp || port) >>>>>>> // ATTENTION: // binding to :: only receives IPv4 connections if the bindv6only // sysctl is set 0, which is the default on many operating systems. self._httpServer && self._httpServer.listen(port.http || port, '::') self._udpSocket && self._udpSocket.bind(port.udp || port)
<<<<<<< var id = params.type === common.PEER_TYPES.websocket ? params.peer_id : params.addr this.peers[id] = null ======= delete this.peers[params.addr || params.peer_id] >>>>>>> var id = params.type === common.PEER_TYPES.websocket ? params.peer_id : params.addr delete this.peers[id]
<<<<<<< ======= web3.extend({ property: 'test', methods: [ { name: 'setChainParams', call: 'test_setChainParams', params: 1, outputFormatter: web3.extend.formatters.formatOutputBool }, { name: 'mineBlocks', call: 'test_mineBlocks', params: 1, inputFormatter: [web3.extend.utils.formatInputInt], outputFormatter: web3.extend.formatters.formatOutputBool }, { name: 'modifyTimestamp', call: 'test_modifyTimestamp', params: 1, inputFormatter: [web3.extend.utils.formatInputInt], outputFormatter: web3.extend.formatters.formatOutputBool }, { name: 'addBlock', call: 'test_addBlock', params: 1, inputFormatter: [web3.extend.utils.formatInputString], outputFormatter: web3.extend.formatters.formatOutputBool }, { name: 'rewindToBlock', call: 'test_rewindToBlock', params: 1, inputFormatter: [web3.extend.utils.formatInputInt], outputFormatter: web3.extend.formatters.formatOutputBool } ] }); >>>>>>>
<<<<<<< const os = require('os') const fs = require('fs') const path = require('path') const mkdirp = require('mkdirp') const rimraf = require('rimraf') const zip = require('cross-zip') const minimist = require('minimist') const packager = require('electron-packager') const installer = require('electron-installer-windows') const pkg = require('../package.json') const config = { ======= var os = require('os') var fs = require('fs') var path = require('path') var mkdirp = require('mkdirp') var rimraf = require('rimraf') var zip = require('cross-zip') var targz = require('tar.gz') var minimist = require('minimist') var packager = require('electron-packager') var pkg = require('../package.json') var config = { >>>>>>> const os = require('os') const fs = require('fs') const path = require('path') const mkdirp = require('mkdirp') const rimraf = require('rimraf') const zip = require('cross-zip') const targz = require('tar.gz') const minimist = require('minimist') const packager = require('electron-packager') const installer = require('electron-installer-windows') const pkg = require('../package.json') const config = { <<<<<<< const platform = argv._[0] ======= var platform = argv._[0] if (!platform) { buildDarwin(printDone) buildLinux(printDone) } >>>>>>> const platform = argv._[0] if (!platform) { buildDarwin(printDone) buildLinux(printDone) buildWin(printDone) } <<<<<<< function buildWin (cb) { console.log('Windows: Packaging electron...') packager(Object.assign({}, all, win32), function (err, buildPath) { if (err) return cb(err) console.log('Windows: Packaged electron. ' + buildPath) var exePath = path.join(buildPath[0], config.APP_NAME + '.exe') pack(cb) function pack (cb) { packageZip() packageExe(cb) } function packageZip () { console.log('Windows: Creating zip...') var inPath = path.join(buildPath[0], config.APP_NAME + '.exe') var outPath = path.join(DIST_PATH, BUILD_NAME + '-darwin.zip') zip.zipSync(inPath, outPath) console.log('Windows: Created zip.') } function packageExe () { console.log('Windows: creating installer...') const opts = { src: 'dist/ScienceFair-win32-x64', dest: 'dist/installers' } installer(opts, err => { if (err) return cb(err) console.log('Windows: created installer.') cb() }) } }) } ======= function buildLinux (cb) { console.log('Linux: Packaging electron...') packager(Object.assign({}, all, linux), function (err, buildPath) { if (err) return cb(err); console.log('Linux: Packaged electron. ' + buildPath); var targetPath = path.join(DIST_PATH, BUILD_NAME + '_linux-x64.tar.gz'); rimraf.sync(targetPath); targz().compress(buildPath[0], targetPath).then(function() { console.log('Linux: Created tarball ' + targetPath); }).catch(cb); }) } >>>>>>> function buildWin (cb) { console.log('Windows: Packaging electron...') packager(Object.assign({}, all, win32), function (err, buildPath) { if (err) return cb(err) console.log('Windows: Packaged electron. ' + buildPath) var exePath = path.join(buildPath[0], config.APP_NAME + '.exe') pack(cb) function pack (cb) { packageZip() packageExe(cb) } function packageZip () { console.log('Windows: Creating zip...') var inPath = path.join(buildPath[0], config.APP_NAME + '.exe') var outPath = path.join(DIST_PATH, BUILD_NAME + '-darwin.zip') zip.zipSync(inPath, outPath) console.log('Windows: Created zip.') } function packageExe () { console.log('Windows: creating installer...') const opts = { src: 'dist/ScienceFair-win32-x64', dest: 'dist/installers' } installer(opts, err => { if (err) return cb(err) console.log('Windows: created installer.') cb() }) } } } function buildLinux (cb) { console.log('Linux: Packaging electron...') packager(Object.assign({}, all, linux), function (err, buildPath) { if (err) return cb(err); console.log('Linux: Packaged electron. ' + buildPath); var targetPath = path.join(DIST_PATH, BUILD_NAME + '_linux-x64.tar.gz'); rimraf.sync(targetPath); targz().compress(buildPath[0], targetPath).then(function() { console.log('Linux: Created tarball ' + targetPath); }).catch(cb); }) }
<<<<<<< version: `1.0.0`, date: `10/??/2020`, changes: [ `Expanded Interdimensional content, delve deep into the hell dimension.`, `New Magic Universe.`, `Fling asteroids into the blackhole with the Asteroid Redirect ARPA project.`, `The same monument type will no longer be chosen twice in a row.`, `Evil races can now construct a Pillar of Bones monument type.`, `Democracy now only affects Entertainers.`, `Some government bonuses now scale with tech era.`, `Races with Detritivore can now build Windmills.`, `Beast of Burden now grants an extra loot roll instead of a 10% boost.`, `Revamped combat loot formulas.`, `Build queue resource highlighting.`, `Low Contrast Dark Night Theme.`, `Ewnay igpay atinlay anguagelay.` ] }, { ======= version: `0.9.21`, date: `10/27/2020`, changes: [ `Trick or Treat Event, runs from 10/28 - 11/4.`, ] }, { >>>>>>> version: `1.0.0`, date: `10/??/2020`, changes: [ `Expanded Interdimensional content, delve deep into the hell dimension.`, `New Magic Universe.`, `Fling asteroids into the blackhole with the Asteroid Redirect ARPA project.`, `The same monument type will no longer be chosen twice in a row.`, `Evil races can now construct a Pillar of Bones monument type.`, `Democracy now only affects Entertainers.`, `Some government bonuses now scale with tech era.`, `Races with Detritivore can now build Windmills.`, `Beast of Burden now grants an extra loot roll instead of a 10% boost.`, `Revamped combat loot formulas.`, `Build queue resource highlighting.`, `Low Contrast Dark Night Theme.`, `Ewnay igpay atinlay anguagelay.` ] }, { version: `0.9.21`, date: `10/27/2020`, changes: [ `Trick or Treat Event, runs from 10/28 - 11/4.`, ] }, {
<<<<<<< level += global.stats.achieve[achievement].l > 5 ? 5 : global.stats.achieve[achievement].l; if (global.stats.achieve[achievement][affix]){ ulevel += global.stats.achieve[achievement][affix] > 5 ? 5 : global.stats.achieve[achievement][affix]; } if (achievement === 'joyless'){ level += global.stats.achieve[achievement].l > 5 ? 5 : global.stats.achieve[achievement].l; if (global.stats.achieve[achievement][affix]){ ulevel += global.stats.achieve[achievement][affix] > 5 ? 5 : global.stats.achieve[achievement][affix]; } } ======= level += global.stats.achieve[achievement].l; >>>>>>> level += global.stats.achieve[achievement].l > 5 ? 5 : global.stats.achieve[achievement].l; if (global.stats.achieve[achievement][affix]){ ulevel += global.stats.achieve[achievement][affix] > 5 ? 5 : global.stats.achieve[achievement][affix]; }
<<<<<<< reqs: { gravity: 1, science: 15 }, ======= category: 'research', reqs: { gravity: 1, locked: 1 }, >>>>>>> category: 'research', reqs: { gravity: 1, science: 15 },
<<<<<<< import { global, keyMultiplier, breakdown, sizeApproximation, p_on, red_on, achieve_level } from './vars.js'; import { vBind, clearElement, modRes, calc_mastery, calcPillar, easterEgg, trickOrTreat, popover, harmonyEffect, darkEffect } from './functions.js'; ======= import { global, keyMultiplier, poppers, breakdown, sizeApproximation, p_on, red_on, achieve_level } from './vars.js'; import { vBind, clearElement, modRes, calc_mastery, easterEgg, getHalloween, trickOrTreat, popover, harmonyEffect, darkEffect } from './functions.js'; >>>>>>> import { global, keyMultiplier, breakdown, sizeApproximation, p_on, red_on, achieve_level } from './vars.js'; import { vBind, clearElement, modRes, calc_mastery, calcPillar, easterEgg, getHalloween, trickOrTreat, popover, harmonyEffect, darkEffect } from './functions.js';
<<<<<<< "Side_Chain":"Side chain browser(DappChain)", "Main_Chain":"Main chain browser(MainChain)", ======= "7day": "one week", "14day": "two weeks", "30day": "one month", "select_tip": "To view data other than 2000 You can manually adjust the time window", "date_number_tip": "{total} records in the current time range", "date_list_tip": "Only the first 2000 data are displayed", >>>>>>> "Side_Chain":"Side chain browser(DappChain)", "Main_Chain":"Main chain browser(MainChain)", "7day": "one week", "14day": "two weeks", "30day": "one month", "select_tip": "To view data other than 2000 You can manually adjust the time window", "date_number_tip": "{total} records in the current time range", "date_list_tip": "Only the first 2000 data are displayed",
<<<<<<< version: `0.9.10`, date: `7/??/2020`, changes: [ `Expanded list of potential enemy city names.`, ] },{ ======= version: `0.9.10`, date: `7/27/2020`, changes: [ `Internal bugfix re: "ogre" name` ] }, { >>>>>>> version: `0.9.10`, date: `7/??/2020`, changes: [ `Expanded list of potential enemy city names.`, ] }, {
<<<<<<< import { global, keyMultiplier, breakdown, sizeApproximation, p_on, red_on, achieve_level } from './vars.js'; import { vBind, clearElement, modRes, calc_mastery, calcPillar, easterEgg, popover, harmonyEffect, darkEffect } from './functions.js'; ======= import { global, keyMultiplier, poppers, breakdown, sizeApproximation, p_on, red_on, achieve_level } from './vars.js'; import { vBind, clearElement, modRes, calc_mastery, easterEgg, trickOrTreat, popover, harmonyEffect, darkEffect } from './functions.js'; >>>>>>> import { global, keyMultiplier, breakdown, sizeApproximation, p_on, red_on, achieve_level } from './vars.js'; import { vBind, clearElement, modRes, calc_mastery, calcPillar, easterEgg, trickOrTreat, popover, harmonyEffect, darkEffect } from './functions.js';
<<<<<<< ======= "trc20_fire_token":"50 lucky draws to win 100,000 VENA!", "trc20_vena_tip":"Due to the particularity of VENA contract, extra 0.1 VENA will be authorized but not deducted.", >>>>>>>
<<<<<<< return User.findOne({_id: this.currentUser}) ======= console.log(this.currentUserId) return User.findOne({_id: this.currentUserId}) >>>>>>> return User.findOne({_id: this.currentUserId})
<<<<<<< import * as geneTypes from '../geneTypes'; ======= import {menu} from '../../../utilities'; >>>>>>> import * as geneTypes from '../geneTypes'; import {menu} from '../../../utilities';
<<<<<<< // Start a subtest... t.test(dir, t => { // Failing tests that we will skip at present if (['input', 'output', 'execute', 'simple'].indexOf(dir) >= 0) { t.skip('TODO Skipping') t.end() return } ======= // Get list of files fs.readdir(path.join('tests/document/documents', dir), (err, files) => { // Start a subtest... t.test(dir, t => { // Failing tests that we will skip at present if (['input', 'output', 'execute', 'include', 'simple'].indexOf(dir) >= 0) { t.skip('TODO') t.end() return } >>>>>>> // Get list of files fs.readdir(path.join('tests/document/documents', dir), (err, files) => { // Start a subtest... t.test(dir, t => { // Failing tests that we will skip at present if (['input', 'output', 'execute', 'simple'].indexOf(dir) >= 0) { t.skip('TODO') t.end() return }
<<<<<<< const randXML = ` <function> <name>rand</name> <params> </params> <implems> <implem language="js" /> </implems> </function> ` let RAND_COUNT = 1 function rand() { // very pseudo random return RAND_COUNT++ } // used in tests to reset the pseudo random generator export function _reset_rand() { RAND_COUNT = 1 } const no_paramsXML = ` <function> <name>no_params</name> <implems> <implem language="js" /> </implems> </function> ` function no_params() { return 5 ======= const no_params = { type: 'function', name: 'no_params', methods: { default: {} }, body: function () { return 5 } >>>>>>> let RAND_COUNT = 1 const rand = { type: 'function', name: 'rand', methods: { default: {} }, body: function () { // very pseudo random return RAND_COUNT++ } } // used in tests to reset the pseudo random generator export function _reset_rand() { RAND_COUNT = 1 } const no_params = { type: 'function', name: 'no_params', methods: { default: {} }, body: function () { return 5 } <<<<<<< export const libtestXML = ` <!DOCTYPE function PUBLIC "StencilaFunctionLibrary 1.0" "StencilaFunctionLibrary.dtd"> <library name="test"> ${addXML} ${sumXML} ${multiplyXML} ${randXML} ${no_paramsXML} ${one_paramXML} ${one_param_with_defaultXML} </library> ` ======= >>>>>>> <<<<<<< add, sum, multiply, rand, no_params, one_param, one_param_with_default, ======= type: 'library', name: 'test', funcs: { add, sum: sum_, multiply, no_params, one_param, one_param_with_default } >>>>>>> type: 'library', name: 'test', funcs: { add, sum: sum_, multiply, rand, no_params, one_param, one_param_with_default }
<<<<<<< ======= , _handleStartShouldSetPanResponder: function(e: Object, gestureState: Object): boolean { return true; } , _handleMoveShouldSetPanResponder: function(e: Object, gestureState: Object): boolean { if (gestureState.dx === 0 || gestureState.dy === 0) { return false; } return true; } >>>>>>>
<<<<<<< luaL_argcheck(L, 1 <= posi && --posi <= len, 2, to_luastring("initial position out of string")); luaL_argcheck(L, --posj < len, 3, to_luastring("final position out of string")); ======= lauxlib.luaL_argcheck(L, 1 <= posi && --posi <= len, 2, "initial position out of string"); lauxlib.luaL_argcheck(L, --posj < len, 3, "final position out of string"); >>>>>>> luaL_argcheck(L, 1 <= posi && --posi <= len, 2, "initial position out of string"); luaL_argcheck(L, --posj < len, 3, "final position out of string"); <<<<<<< let code = luaL_checkinteger(L, arg); luaL_argcheck(L, 0 <= code && code <= MAXUNICODE, arg, to_luastring("value out of range", true)); lua_pushfstring(L, p_U, code); ======= let code = lauxlib.luaL_checkinteger(L, arg); lauxlib.luaL_argcheck(L, 0 <= code && code <= MAXUNICODE, arg, "value out of range"); lua.lua_pushstring(L, lua.to_luastring(String.fromCodePoint(code))); >>>>>>> let code = luaL_checkinteger(L, arg); luaL_argcheck(L, 0 <= code && code <= MAXUNICODE, arg, "value out of range"); lua_pushfstring(L, p_U, code); <<<<<<< luaL_argcheck(L, 1 <= posi && --posi <= s.length, 3, to_luastring("position out of range", true)); ======= lauxlib.luaL_argcheck(L, 1 <= posi && --posi <= s.length, 3, "position out of range"); >>>>>>> luaL_argcheck(L, 1 <= posi && --posi <= s.length, 3, "position out of range"); <<<<<<< luaL_error(L, to_luastring("initial position is a continuation byte", true)); ======= lauxlib.luaL_error(L, "initial position is a continuation byte"); >>>>>>> luaL_error(L, "initial position is a continuation byte"); <<<<<<< luaL_argcheck(L, posi >= 1, 2, to_luastring("out of range", true)); luaL_argcheck(L, pose <= s.length, 3, to_luastring("out of range", true)); ======= lauxlib.luaL_argcheck(L, posi >= 1, 2, "out of range"); lauxlib.luaL_argcheck(L, pose <= s.length, 3, "out of range"); >>>>>>> luaL_argcheck(L, posi >= 1, 2, "out of range"); luaL_argcheck(L, pose <= s.length, 3, "out of range"); <<<<<<< return luaL_error(L, to_luastring("string slice too long", true)); ======= return lauxlib.luaL_error(L, "string slice too long"); >>>>>>> return luaL_error(L, "string slice too long"); <<<<<<< luaL_checkstack(L, n, to_luastring("string slice too long", true)); ======= lauxlib.luaL_checkstack(L, n, "string slice too long"); >>>>>>> luaL_checkstack(L, n, "string slice too long"); <<<<<<< return luaL_error(L, to_luastring("invalid UTF-8 code", true)); lua_pushinteger(L, dec.code); ======= return lauxlib.luaL_error(L, "invalid UTF-8 code"); lua.lua_pushinteger(L, dec.code); >>>>>>> return luaL_error(L, "invalid UTF-8 code"); lua_pushinteger(L, dec.code);
<<<<<<< let t = lua_type(L, 2); luaL_checktype(L, 1, LUA_TTABLE); luaL_argcheck(L, t === LUA_TNIL || t === LUA_TTABLE, 2, to_luastring("nil or table expected", true)); if (luaL_getmetafield(L, 1, to_luastring("__metatable", true)) !== LUA_TNIL) return luaL_error(L, to_luastring("cannot change a protected metatable")); lua_settop(L, 2); lua_setmetatable(L, 1); ======= let t = lua.lua_type(L, 2); lauxlib.luaL_checktype(L, 1, lua.LUA_TTABLE); lauxlib.luaL_argcheck(L, t === lua.LUA_TNIL || t === lua.LUA_TTABLE, 2, "nil or table expected"); if (lauxlib.luaL_getmetafield(L, 1, lua.to_luastring("__metatable", true)) !== lua.LUA_TNIL) return lauxlib.luaL_error(L, lua.to_luastring("cannot change a protected metatable", true)); lua.lua_settop(L, 2); lua.lua_setmetatable(L, 1); >>>>>>> let t = lua_type(L, 2); luaL_checktype(L, 1, LUA_TTABLE); luaL_argcheck(L, t === LUA_TNIL || t === LUA_TTABLE, 2, "nil or table expected"); if (luaL_getmetafield(L, 1, to_luastring("__metatable", true)) !== LUA_TNIL) return luaL_error(L, to_luastring("cannot change a protected metatable")); lua_settop(L, 2); lua_setmetatable(L, 1); <<<<<<< let t = lua_type(L, 1); luaL_argcheck(L, t === LUA_TTABLE || t === LUA_TSTRING, 1, to_luastring("table or string expected", true)); lua_pushinteger(L, lua_rawlen(L, 1)); ======= let t = lua.lua_type(L, 1); lauxlib.luaL_argcheck(L, t === lua.LUA_TTABLE || t === lua.LUA_TSTRING, 1, "table or string expected"); lua.lua_pushinteger(L, lua.lua_rawlen(L, 1)); >>>>>>> let t = lua_type(L, 1); luaL_argcheck(L, t === LUA_TTABLE || t === LUA_TSTRING, 1, "table or string expected"); lua_pushinteger(L, lua_rawlen(L, 1)); <<<<<<< luaL_checkoption(L, 1, to_luastring("collect"), opts); luaL_optinteger(L, 2, 0); luaL_error(L, to_luastring("lua_gc not implemented")); ======= lauxlib.luaL_checkoption(L, 1, "collect", opts); lauxlib.luaL_optinteger(L, 2, 0); lauxlib.luaL_error(L, lua.to_luastring("lua_gc not implemented")); >>>>>>> luaL_checkoption(L, 1, "collect", opts); luaL_optinteger(L, 2, 0); luaL_error(L, to_luastring("lua_gc not implemented")); <<<<<<< let t = lua_type(L, 1); luaL_argcheck(L, t !== LUA_TNONE, 1, to_luastring("value expected", true)); lua_pushstring(L, lua_typename(L, t)); ======= let t = lua.lua_type(L, 1); lauxlib.luaL_argcheck(L, t !== lua.LUA_TNONE, 1, "value expected"); lua.lua_pushstring(L, lua.lua_typename(L, t)); >>>>>>> let t = lua_type(L, 1); luaL_argcheck(L, t !== LUA_TNONE, 1, "value expected"); lua_pushstring(L, lua_typename(L, t)); <<<<<<< let base = luaL_checkinteger(L, 2); luaL_checktype(L, 1, LUA_TSTRING); /* no numbers as strings */ let s = lua_tostring(L, 1); luaL_argcheck(L, 2 <= base && base <= 36, 2, to_luastring("base out of range", true)); ======= let base = lauxlib.luaL_checkinteger(L, 2); lauxlib.luaL_checktype(L, 1, lua.LUA_TSTRING); /* no numbers as strings */ let s = lua.lua_tostring(L, 1); lauxlib.luaL_argcheck(L, 2 <= base && base <= 36, 2, "base out of range"); >>>>>>> let base = luaL_checkinteger(L, 2); luaL_checktype(L, 1, LUA_TSTRING); /* no numbers as strings */ let s = lua_tostring(L, 1); luaL_argcheck(L, 2 <= base && base <= 36, 2, "base out of range"); <<<<<<< luaL_argcheck(L, 1 <= i, 1, to_luastring("index out of range", true)); ======= lauxlib.luaL_argcheck(L, 1 <= i, 1, "index out of range"); >>>>>>> luaL_argcheck(L, 1 <= i, 1, "index out of range"); <<<<<<< let s = lua_tostring(L, 1); let mode = luaL_optstring(L, 3, to_luastring("bt", true)); let env = !lua_isnone(L, 4) ? 4 : 0; /* 'env' index or 0 if no 'env' */ ======= let s = lua.lua_tostring(L, 1); let mode = lauxlib.luaL_optstring(L, 3, "bt"); let env = !lua.lua_isnone(L, 4) ? 4 : 0; /* 'env' index or 0 if no 'env' */ >>>>>>> let s = lua_tostring(L, 1); let mode = luaL_optstring(L, 3, "bt"); let env = !lua_isnone(L, 4) ? 4 : 0; /* 'env' index or 0 if no 'env' */ <<<<<<< let chunkname = luaL_optstring(L, 2, to_luastring("=(load)", true)); luaL_checktype(L, 1, LUA_TFUNCTION); lua_settop(L, RESERVEDSLOT); /* create reserved slot */ status = lua_load(L, generic_reader, null, chunkname, mode); ======= let chunkname = lauxlib.luaL_optstring(L, 2, "=(load)"); lauxlib.luaL_checktype(L, 1, lua.LUA_TFUNCTION); lua.lua_settop(L, RESERVEDSLOT); /* create reserved slot */ status = lua.lua_load(L, generic_reader, null, chunkname, mode); >>>>>>> let chunkname = luaL_optstring(L, 2, "=(load)"); luaL_checktype(L, 1, LUA_TFUNCTION); lua_settop(L, RESERVEDSLOT); /* create reserved slot */ status = lua_load(L, generic_reader, null, chunkname, mode);
<<<<<<< default: return luaL_error(L, to_luastring("wrong number of arguments", true)); ======= default: return lauxlib.luaL_error(L, "wrong number of arguments"); >>>>>>> default: return luaL_error(L, "wrong number of arguments"); <<<<<<< luaL_argcheck(L, low <= up, 1, to_luastring("interval is empty", true)); luaL_argcheck(L, low >= 0 || up <= LUA_MAXINTEGER + low, 1, to_luastring("interval too large", true)); ======= lauxlib.luaL_argcheck(L, low <= up, 1, "interval is empty"); lauxlib.luaL_argcheck(L, low >= 0 || up <= luaconf.LUA_MAXINTEGER + low, 1, "interval too large"); >>>>>>> luaL_argcheck(L, low <= up, 1, "interval is empty"); luaL_argcheck(L, low >= 0 || up <= LUA_MAXINTEGER + low, 1, "interval too large"); <<<<<<< luaL_argcheck(L, n >= 1, 1, to_luastring("value expected", true)); ======= lauxlib.luaL_argcheck(L, n >= 1, 1, "value expected"); >>>>>>> luaL_argcheck(L, n >= 1, 1, "value expected"); <<<<<<< luaL_argcheck(L, n >= 1, 1, to_luastring("value expected", true)); ======= lauxlib.luaL_argcheck(L, n >= 1, 1, "value expected"); >>>>>>> luaL_argcheck(L, n >= 1, 1, "value expected"); <<<<<<< luaL_argerror(L, 2, to_luastring("zero", true)); ======= lauxlib.luaL_argerror(L, 2, "zero"); >>>>>>> luaL_argerror(L, 2, "zero");
<<<<<<< for (; lisdigit(s[i]); i++) { let d = s[i] - 48 /* ('0').charCodeAt(0) */; ======= for (; i < s.length && ljstype.lisdigit(s[i]); i++) { let d = s[i] - char['0']; >>>>>>> for (; i < s.length && lisdigit(s[i]); i++) { let d = s[i] - 48 /* ('0').charCodeAt(0) */; <<<<<<< while (lisspace(s[i])) i++; /* skip trailing spaces */ ======= while (i < s.length && ljstype.lisspace(s[i])) i++; /* skip trailing spaces */ >>>>>>> while (i < s.length && lisspace(s[i])) i++; /* skip trailing spaces */
<<<<<<< pos = luaL_checkinteger(L, 2); /* 2nd argument is the position */ luaL_argcheck(L, 1 <= pos && pos <= e, 2, to_luastring("position out of bounds", true)); ======= pos = lauxlib.luaL_checkinteger(L, 2); /* 2nd argument is the position */ lauxlib.luaL_argcheck(L, 1 <= pos && pos <= e, 2, "position out of bounds"); >>>>>>> pos = luaL_checkinteger(L, 2); /* 2nd argument is the position */ luaL_argcheck(L, 1 <= pos && pos <= e, 2, "position out of bounds"); <<<<<<< return luaL_error(L, to_luastring("wrong number of arguments to 'insert'", true)); ======= return lauxlib.luaL_error(L, "wrong number of arguments to 'insert'"); >>>>>>> return luaL_error(L, "wrong number of arguments to 'insert'"); <<<<<<< luaL_argcheck(L, 1 <= pos && pos <= size + 1, 1, to_luastring("position out of bounds", true)); lua_geti(L, 1, pos); /* result = t[pos] */ ======= lauxlib.luaL_argcheck(L, 1 <= pos && pos <= size + 1, 1, "position out of bounds"); lua.lua_geti(L, 1, pos); /* result = t[pos] */ >>>>>>> luaL_argcheck(L, 1 <= pos && pos <= size + 1, 1, "position out of bounds"); lua_geti(L, 1, pos); /* result = t[pos] */ <<<<<<< luaL_argcheck(L, f > 0 || e < LUA_MAXINTEGER + f, 3, to_luastring("too many elements to move", true)); ======= lauxlib.luaL_argcheck(L, f > 0 || e < luaconf.LUA_MAXINTEGER + f, 3, "too many elements to move"); >>>>>>> luaL_argcheck(L, f > 0 || e < LUA_MAXINTEGER + f, 3, "too many elements to move"); <<<<<<< luaL_argcheck(L, t <= LUA_MAXINTEGER - n + 1, 4, to_luastring("destination wrap around", true)); ======= lauxlib.luaL_argcheck(L, t <= luaconf.LUA_MAXINTEGER - n + 1, 4, "destination wrap around"); >>>>>>> luaL_argcheck(L, t <= LUA_MAXINTEGER - n + 1, 4, "destination wrap around"); <<<<<<< let sep = luaL_optlstring(L, 2, to_luastring("")); let lsep = sep.length; let i = luaL_optinteger(L, 3, 1); last = luaL_optinteger(L, 4, last); ======= let sep = lauxlib.luaL_optlstring(L, 2, ""); let i = lauxlib.luaL_optinteger(L, 3, 1); last = lauxlib.luaL_optinteger(L, 4, last); >>>>>>> let sep = luaL_optlstring(L, 2, ""); let lsep = sep.length; let i = luaL_optinteger(L, 3, 1); last = luaL_optinteger(L, 4, last); <<<<<<< luaL_argcheck(L, n < LUA_MAXINTEGER, 1, to_luastring("array too big", true)); if (!lua_isnoneornil(L, 2)) /* is there a 2nd argument? */ luaL_checktype(L, 2, LUA_TFUNCTION); /* must be a function */ lua_settop(L, 2); /* make sure there are two arguments */ ======= lauxlib.luaL_argcheck(L, n < luaconf.LUA_MAXINTEGER, 1, "array too big"); if (!lua.lua_isnoneornil(L, 2)) /* is there a 2nd argument? */ lauxlib.luaL_checktype(L, 2, lua.LUA_TFUNCTION); /* must be a function */ lua.lua_settop(L, 2); /* make sure there are two arguments */ >>>>>>> luaL_argcheck(L, n < LUA_MAXINTEGER, 1, "array too big"); if (!lua_isnoneornil(L, 2)) /* is there a 2nd argument? */ luaL_checktype(L, 2, LUA_TFUNCTION); /* must be a function */ lua_settop(L, 2); /* make sure there are two arguments */
<<<<<<< // Allow refund for accounts with orders or "order/fulfillment" permissions. // When called internally by another plugin, context.isInternalCall // can be set to `true` to disable this check. if (!isInternalCall) { await context.validatePermissions( `reaction:legacy:orders:${order._id}`, "refund:payment", { shopId: order.shopId, legacyRoles: ["orders", "order/fulfillment"] } ); } ======= // Allow refund for accounts with orders or "order/fulfillment" permissions await context.validatePermissions(`reaction:orders:${order._id}`, "refund:payment", { shopId: order.shopId, legacyRoles: ["orders", "order/fulfillment"] }); >>>>>>> // Allow refund for accounts with orders or "order/fulfillment" permissions await context.validatePermissions( `reaction:legacy:orders:${order._id}`, "refund:payment", { shopId: order.shopId, legacyRoles: ["orders", "order/fulfillment"] } );
<<<<<<< import updateOrderFulfillmentGroup from "./updateOrderFulfillmentGroup"; ======= import updateOrder from "./updateOrder"; >>>>>>> import updateOrder from "./updateOrder"; import updateOrderFulfillmentGroup from "./updateOrderFulfillmentGroup"; <<<<<<< placeOrder, updateOrderFulfillmentGroup ======= cancelOrderItem, placeOrder, updateOrder >>>>>>> cancelOrderItem, placeOrder, updateOrder, updateOrderFulfillmentGroup
<<<<<<< import registerInventoryPlugin from "./plugins/inventory/index.js"; ======= import registerSurchargesPlugin from "./plugins/surcharges/index.js"; >>>>>>> import registerInventoryPlugin from "./plugins/inventory/index.js"; import registerSurchargesPlugin from "./plugins/surcharges/index.js";
<<<<<<< import { Meteor } from "meteor/meteor"; ======= import { Assets } from "/lib/collections"; >>>>>>> import { Meteor } from "meteor/meteor"; import { Assets } from "/lib/collections";
<<<<<<< const hydratedCart = await getShippingRestrictionAttributes(context, fulfillmentGroup); // TODO: possibly change function name const isCartShippingRestricted = await cartShippingRestricted(context, hydratedCart); ======= const hydratedCart = await getShippingRestrictionAttributes(context, cartWithSummary, fulfillmentGroup); // TODO: possibly change function name >>>>>>> const hydratedCart = await getShippingRestrictionAttributes(context, cartWithSummary, fulfillmentGroup); // TODO: possibly change function name const isCartShippingRestricted = await cartShippingRestricted(context, hydratedCart);
<<<<<<< expect(mockContext.userHasPermissionLegacy).toHaveBeenCalledWith(["owner", "admin"], mockShopId); expect(mockContext.collections.Tags.find).toHaveBeenCalledWith({ shopId: mockShopId, isVisible: true, isDeleted: { $in: [false, true] } }); ======= expect(mockContext.userHasPermission).toHaveBeenCalledWith(["owner", "admin"], mockShopId); expect(mockContext.collections.Tags.find).toHaveBeenCalledWith({ shopId: mockShopId, isVisible: true }); >>>>>>> expect(mockContext.userHasPermissionLegacy).toHaveBeenCalledWith(["owner", "admin"], mockShopId); expect(mockContext.collections.Tags.find).toHaveBeenCalledWith({ shopId: mockShopId, isVisible: true }); <<<<<<< expect(mockContext.userHasPermissionLegacy).toHaveBeenCalledWith(["owner", "admin"], mockShopId); expect(mockContext.collections.Tags.find).toHaveBeenCalledWith({ shopId: mockShopId, isTopLevel: true, isVisible: true, isDeleted: { $in: [false, true] } }); ======= expect(mockContext.userHasPermission).toHaveBeenCalledWith(["owner", "admin"], mockShopId); expect(mockContext.collections.Tags.find).toHaveBeenCalledWith({ shopId: mockShopId, isTopLevel: true, isVisible: true }); >>>>>>> expect(mockContext.userHasPermissionLegacy).toHaveBeenCalledWith(["owner", "admin"], mockShopId); expect(mockContext.collections.Tags.find).toHaveBeenCalledWith({ shopId: mockShopId, isTopLevel: true, isVisible: true }); <<<<<<< expect(mockContext.userHasPermissionLegacy).toHaveBeenCalledWith(["owner", "admin"], mockShopId); expect(mockContext.collections.Tags.find).toHaveBeenCalledWith({ shopId: mockShopId, isTopLevel: false, isVisible: true, isDeleted: { $in: [false, true] } }); ======= expect(mockContext.userHasPermission).toHaveBeenCalledWith(["owner", "admin"], mockShopId); expect(mockContext.collections.Tags.find).toHaveBeenCalledWith({ shopId: mockShopId, isTopLevel: false, isVisible: true }); >>>>>>> expect(mockContext.userHasPermissionLegacy).toHaveBeenCalledWith(["owner", "admin"], mockShopId); expect(mockContext.collections.Tags.find).toHaveBeenCalledWith({ shopId: mockShopId, isTopLevel: false, isVisible: true }); <<<<<<< expect(mockContext.userHasPermissionLegacy).toHaveBeenCalledWith(["owner", "admin"], mockContext.shopId); expect(mockContext.collections.Tags.find).toHaveBeenCalledWith({ shopId: mockContext.shopId, isDeleted: false, isVisible: { $in: [false, true] } }); ======= expect(mockContext.userHasPermission).toHaveBeenCalledWith(["owner", "admin"], mockContext.shopId); expect(mockContext.collections.Tags.find).toHaveBeenCalledWith({ shopId: mockContext.shopId, isDeleted: false }); >>>>>>> expect(mockContext.userHasPermissionLegacy).toHaveBeenCalledWith(["owner", "admin"], mockContext.shopId); expect(mockContext.collections.Tags.find).toHaveBeenCalledWith({ shopId: mockContext.shopId, isDeleted: false }); <<<<<<< expect(mockContext.userHasPermissionLegacy).toHaveBeenCalledWith(["owner", "admin"], mockShopId); expect(mockContext.collections.Tags.find).toHaveBeenCalledWith({ shopId: mockShopId, isDeleted: false, isTopLevel: true, isVisible: { $in: [false, true] } }); ======= expect(mockContext.userHasPermission).toHaveBeenCalledWith(["owner", "admin"], mockShopId); expect(mockContext.collections.Tags.find).toHaveBeenCalledWith({ shopId: mockShopId, isDeleted: false, isTopLevel: true }); >>>>>>> expect(mockContext.userHasPermissionLegacy).toHaveBeenCalledWith(["owner", "admin"], mockShopId); expect(mockContext.collections.Tags.find).toHaveBeenCalledWith({ shopId: mockShopId, isDeleted: false, isTopLevel: true });
<<<<<<< import registerProductPlugin from "./core-services/product/index.js"; ======= import registerInventoryPlugin from "./core-services/inventory/index.js"; >>>>>>> import registerInventoryPlugin from "./core-services/inventory/index.js"; import registerProductPlugin from "./core-services/product/index.js"; <<<<<<< import registerTaxesPlugin from "/imports/plugins/core/taxes/server/no-meteor/register"; import registerTaxesRatesPlugin from "/imports/plugins/included/taxes-rates/server/no-meteor/register"; ======= import registerProductPlugin from "/imports/plugins/core/product/server/no-meteor/register"; import registerProductVariantPlugin from "/imports/plugins/included/product-variant/server/no-meteor/register"; >>>>>>>
<<<<<<< // Allow update if the account has "admin" permission. When called internally by another // plugin, context.isInternalCall can be set to `true` to disable this check. await context.validatePermissions(`reaction:legacy:inventory:${foundProduct._id}`, "update", { shopId, legacyRoles: ["admin"] }); ======= await context.validatePermissions(`reaction:inventory:${foundProduct._id}`, "update", { shopId, legacyRoles: ["admin"] }); >>>>>>> await context.validatePermissions(`reaction:legacy:inventory:${foundProduct._id}`, "update", { shopId, legacyRoles: ["admin"] });
<<<<<<< "stripe/payment/capture": function (paymentMethod) { // Call both check and validate because by calling `clean`, the audit pkg // thinks that we haven't checked paymentMethod arg check(paymentMethod, Object); PaymentMethodArgument.validate(PaymentMethodArgument.clean(paymentMethod)); ======= "stripe/payment/capture"(paymentMethod) { check(paymentMethod, Reaction.Schemas.PaymentMethod); >>>>>>> "stripe/payment/capture"(paymentMethod) { // Call both check and validate because by calling `clean`, the audit pkg // thinks that we haven't checked paymentMethod arg check(paymentMethod, Object); PaymentMethodArgument.validate(PaymentMethodArgument.clean(paymentMethod)); <<<<<<< "stripe/refund/create": function (paymentMethod, amount, reason = "requested_by_customer") { ======= "stripe/refund/create"(paymentMethod, amount, reason = "requested_by_customer") { check(paymentMethod, Reaction.Schemas.PaymentMethod); >>>>>>> "stripe/refund/create"(paymentMethod, amount, reason = "requested_by_customer") { <<<<<<< "stripe/refund/list": function (paymentMethod) { // Call both check and validate because by calling `clean`, the audit pkg // thinks that we haven't checked paymentMethod arg check(paymentMethod, Object); PaymentMethodArgument.validate(PaymentMethodArgument.clean(paymentMethod)); ======= "stripe/refund/list"(paymentMethod) { check(paymentMethod, Reaction.Schemas.PaymentMethod); >>>>>>> "stripe/refund/list"(paymentMethod) { // Call both check and validate because by calling `clean`, the audit pkg // thinks that we haven't checked paymentMethod arg check(paymentMethod, Object); PaymentMethodArgument.validate(PaymentMethodArgument.clean(paymentMethod));
<<<<<<< import { Badge, ClickToCopy, Icon, RolloverCheckbox } from "@reactioncommerce/reaction-ui"; import { getOrderRiskBadge, getOrderRiskStatus } from "../helpers"; ======= import { Badge, ClickToCopy, Icon, RolloverCheckbox, Checkbox } from "@reactioncommerce/reaction-ui"; >>>>>>> import { Badge, ClickToCopy, Icon, RolloverCheckbox, Checkbox } from "@reactioncommerce/reaction-ui"; import { getOrderRiskBadge, getOrderRiskStatus } from "../helpers";
<<<<<<< ======= import { SimpleSchema } from "meteor/aldeed:simple-schema"; import { registerSchema } from "@reactioncommerce/reaction-collections"; >>>>>>> import { registerSchema } from "@reactioncommerce/reaction-collections";
<<<<<<< /** * getShopSettings * @return {Object} returns current shop settings */ export function getShopSettings() { return Core.Reaction.getShopSettings(); } ======= >>>>>>> /** * getShopSettings * @return {Object} returns current shop settings */ export function getShopSettings() { return Core.Reaction.getShopSettings(); }
<<<<<<< * @property {Number} taxRate optional * @property {String} title Cart Item title * @property {Object} transaction Transaction associated with this item * @property {String} updatedAt required * @property {String} variantId required * @property {String} variantTitle Title from the selected variant ======= * @property {Number} taxRate optional totalTax/subTotal of the item * @property {Object} shippingMethod Shipping Method associated with this item >>>>>>> * @property {Number} taxRate optional totalTax/subTotal of the item * @property {String} title Cart Item title * @property {Object} transaction Transaction associated with this item * @property {String} updatedAt required * @property {String} variantId required * @property {String} variantTitle Title from the selected variant
<<<<<<< // 03-26 tag account_tags_list:'Список вкладок', account_tags_add:'Добавить', account_tags_desc:'Функция тегов: вы можете прикрепить личные теги к аккаунтам, чтобы их было легче идентифицировать', account_tags_number:'{total} всего аккаунтов', account_tags_table_1:'тег', account_tags_table_2:'Заметка', account_tags_add_title:'Добавить тег', account_tags_edit_title:'edit tag', account_tags_add_success:'The tag has been successfully added', account_tags_edit_success:'The tag has been successfully edited', account_tags_number_rec:'{number} accounts mark', account_tags_tip:'Приватный тег. Виден только мне', account_tags_edit: "edit", account_tags_delete: "remove", account_tags_delete_is: "Вы уверены, что хотите удалить тег?", account_tags_delete_succss: "Тег был удален.", account_address_name_tag:'(Верефицированый тег)', account_tags_address_placehold:'请输入正确的地址', account_tags_tag_placehold:'Пожалуйста, введите тег (не более 20 символов).', account_tags_note_placehold:'Необязательно, не более 100 символов.', account_tags_tag_valid:'Only Chinese, English or Arabic numbers can be entered', account_tags_rec:"Рекомендуемый тег", account_tags_my_tag:'Мои теги', account_tags_my_tag_update:'Обновления', account_tags_my_tag_login_show:'Содержание будет отображаться после входа.', account_tags_my_tag_not_available:'Not Available', ======= address_token_less_than_10:'tokens with a value less than 10 TRX', address_total_tron_power:'Total TRON Power', address_total_tron_power_remain:'Available TORN Power', address_total_tron_power_used:'Used TRON Power' >>>>>>> // 03-26 tag account_tags_list:'Список вкладок', account_tags_add:'Добавить', account_tags_desc:'Функция тегов: вы можете прикрепить личные теги к аккаунтам, чтобы их было легче идентифицировать', account_tags_number:'{total} всего аккаунтов', account_tags_table_1:'тег', account_tags_table_2:'Заметка', account_tags_add_title:'Добавить тег', account_tags_edit_title:'edit tag', account_tags_add_success:'The tag has been successfully added', account_tags_edit_success:'The tag has been successfully edited', account_tags_number_rec:'{number} accounts mark', account_tags_tip:'Приватный тег. Виден только мне', account_tags_edit: "edit", account_tags_delete: "remove", account_tags_delete_is: "Вы уверены, что хотите удалить тег?", account_tags_delete_succss: "Тег был удален.", account_address_name_tag:'(Верефицированый тег)', account_tags_address_placehold:'请输入正确的地址', account_tags_tag_placehold:'Пожалуйста, введите тег (не более 20 символов).', account_tags_note_placehold:'Необязательно, не более 100 символов.', account_tags_tag_valid:'Only Chinese, English or Arabic numbers can be entered', account_tags_rec:"Рекомендуемый тег", account_tags_my_tag:'Мои теги', account_tags_my_tag_update:'Обновления', account_tags_my_tag_login_show:'Содержание будет отображаться после входа.', account_tags_my_tag_not_available:'Not Available', address_token_less_than_10:'tokens with a value less than 10 TRX', address_total_tron_power:'Total TRON Power', address_total_tron_power_remain:'Available TORN Power', address_total_tron_power_used:'Used TRON Power'
<<<<<<< fileRecords.forEach((fileRecord) => { // Copy File and insert fileRecord .fullClone({ productId: newId, variantId: variantNewId }) .catch((error) => { Logger.error(`Error in copyMedia for product ${newId}`, error); }); }); ======= // Copy File and insert directly, bypassing revision control const promises = fileRecords.map((fileRecord) => ( fileRecord.fullClone({ productId: newId, variantId: variantNewId }) )); return Promise.all(promises); >>>>>>> // Copy File and insert const promises = fileRecords.map((fileRecord) => ( fileRecord.fullClone({ productId: newId, variantId: variantNewId }) )); return Promise.all(promises);
<<<<<<< const { currentRoute } = this.props; const routeOptions = currentRoute.route && currentRoute.route.options || {}; const routeData = routeOptions && routeOptions.structure || {}; ======= const currentRoute = this.props.currentRoute; const routeOptions = (currentRoute.route && currentRoute.route.options) || {}; const routeData = (routeOptions && routeOptions.structure) || {}; >>>>>>> const { currentRoute } = this.props; const routeOptions = (currentRoute.route && currentRoute.route.options) || {}; const routeData = (routeOptions && routeOptions.structure) || {}; <<<<<<< const { currentRoute } = this.props; const layout = currentRoute && currentRoute.route && currentRoute.route.options && currentRoute.route.options.layout; ======= const currentRoute = this.props.currentRoute; const layout = currentRoute && currentRoute.route && currentRoute.route.options && currentRoute.route.options.layout; >>>>>>> const { currentRoute } = this.props; const layout = currentRoute && currentRoute.route && currentRoute.route.options && currentRoute.route.options.layout;
<<<<<<< ======= const errorDetails = new SimpleSchema({ message: { type: String }, description: { type: String, optional: true } }); // Validate that whenever we return an error, we return the same format const ErrorObject = new SimpleSchema({ "type": { type: String }, "errorCode": { type: Number }, "errorDetails": { type: Array, optional: true }, "errorDetails.$": { type: errorDetails, optional: true } }); >>>>>>>
<<<<<<< if (!context.isInternalCall) { await context.validatePermissions(`reaction:legacy:accounts:${account._id}`, "remove:address-books", { shopId: account.shopId, owner: account.userId, legacyRoles: ["reaction-accounts"] }); } ======= await context.validatePermissions(`reaction:accounts:${account._id}`, "remove:address-books", { shopId: account.shopId, owner: account.userId, legacyRoles: ["reaction-accounts"] }); >>>>>>> await context.validatePermissions(`reaction:legacy:accounts:${account._id}`, "remove:address-books", { shopId: account.shopId, owner: account.userId, legacyRoles: ["reaction-accounts"] });
<<<<<<< Sitemap, ======= Surcharge, >>>>>>> Sitemap, Surcharge,
<<<<<<< const { shopId, userId } = account; ======= const userEmail = account.emails && account.emails[0]; // Verify that we have an account and it has an email address that isn't yet verified if (!userEmail || userEmail.verified) return false; const { userId } = account; >>>>>>> const { userId } = account;
<<<<<<< import "./41_set_should_appear_in_sitemap"; import "./43_stripe_marketplace_pkg"; ======= import "./41_set_should_appear_in_sitemap"; import "./42_payment_methods"; >>>>>>> import "./41_set_should_appear_in_sitemap"; import "./42_payment_methods"; import "./43_stripe_marketplace_pkg";
<<<<<<< // afterCartUpdateCalculateDiscount 4 times. assert.equal(updateSpy.callCount, 4, "update should be called four times"); const updatedCart = Collections.Cart.findOne({ _id: cart._id }); ======= // afterCartUpdateCalculateDiscount 2 times. assert.equal(updateSpy.callCount, 2, "update should be called two times"); const updatedCart = Collections.Cart.findOne(cart._id); >>>>>>> // afterCartUpdateCalculateDiscount 2 times. assert.equal(updateSpy.callCount, 2, "update should be called two times"); const updatedCart = Collections.Cart.findOne({ _id: cart._id });
<<<<<<< /** * Functions and objects related to file upload, download, and storage * @namespace Files */ // lazy loading sharp package let sharp; async function lazyLoadSharp() { if (sharp) return; sharp = await import("sharp"); } FileRecord.downloadEndpointPrefix = "/assets/files"; FileRecord.absoluteUrlPrefix = Meteor.absoluteUrl(); // 1024*1024*2 is the GridFSStore default chunk size, and 256k is default GridFS chunk size, but performs terribly const gridFSStoresChunkSize = 1 * 1024 * 1024; ======= >>>>>>> /** * Functions and objects related to file upload, download, and storage * @namespace Files */ <<<<<<< /** * Image files are resized to 4 different sizes: * 1. `large` - 1000px by 1000px - preserves aspect ratio * 2. `medium` - 600px by 600px - preserves aspect ratio * 3. `small` - 235px by 235px - crops to square - creates png version * 4. `thumbnail` - 100px by 100px - crops to square - creates png version * @name imgTransforms * @memberof Files * @constant {Array} * @property {string} name - transform name that will be used as GridFS name * @property {object|undefined} transform - object with image transform settings * @property {number} size - transform size, only one number needed for both width & height * @property {string} mod - transform modifier function call, * for example the `large` & `medium` image transforms want to preserve * the image's aspect ratio and resize based on the larger width or height * so we use the `max` Sharp modifier function. * Check out the {@link http://sharp.pixelplumbing.com/en/stable/|Sharp Docs} for more helper functions. * {@link http://sharp.pixelplumbing.com/en/stable/api-resize/#max|Sharp max()} * {@link http://sharp.pixelplumbing.com/en/stable/api-resize/#crop|Sharp crop()} * @property {string} format - output image format * @summary Defines all image transforms * @ignore */ const imgTransforms = [ { name: "image", transform: { size: 1600, mod: "max", format: "jpg", type: "image/jpeg" } }, { name: "large", transform: { size: 1000, mod: "max", format: "jpg", type: "image/jpeg" } }, { name: "medium", transform: { size: 600, mod: "max", format: "jpg", type: "image/jpeg" } }, { name: "small", transform: { size: 235, mod: "crop", format: "png", type: "image/png" } }, { name: "thumbnail", transform: { size: 100, mod: "crop", format: "png", type: "image/png" } } ]; /** * @name buildGFS * @method * @memberof Files * @param {object} imgTransform * @summary buildGFS returns a fresh GridFSStore instance from provided image transform settings. */ const buildGFS = ({ name, transform }) => ( new GridFSStore({ chunkSize: gridFSStoresChunkSize, collectionPrefix: "cfs_gridfs.", db, mongodb, name, async transformWrite(fileRecord) { if (!transform) return; try { await lazyLoadSharp(); } catch (error) { Logger.warn("Problem lazy loading Sharp lib in image transformWrite", error.message); } if (!sharp) { Logger.warn("In transformWrite, sharp does not seem to be available"); return; } const { size, mod, format, type } = transform; // Need to update the content type and extension of the file info, too. // The new size gets set correctly automatically by FileCollections package. fileRecord.type(type, { store: name }); fileRecord.extension(format, { store: name }); // resizing image, adding mod, setting output format return sharp().resize(size, size)[mod]().toFormat(format); } }) ); /** * @name stores * @memberof Files * @constant {Array} * @summary Defines an array of GridFSStore by mapping the imgTransform settings over the buildGFS function */ const stores = imgTransforms.map(buildGFS); /** * @name tempStore * @type TempFileStore * @memberof Files * @summary Defines the temporary store where chunked uploads from browsers go * initially, until the chunks are eventually combined into one complete file * which the worker will then store to the permanant stores. * @see {@link https://github.com/reactioncommerce/reaction-file-collections} */ const tempStore = new TempFileStore({ shouldAllowRequest(req) { const { type } = req.uploadMetadata; if (typeof type !== "string" || !type.startsWith("image/")) { Logger.info(`shouldAllowRequest received request to upload file of type "${type}" and denied it`); return false; } return true; } ======= const { downloadManager, Media: NoMeteorMedia, stores, tempStore } = setUpFileCollections({ absoluteUrlPrefix: Meteor.absoluteUrl(), db, Logger, MediaRecords: MediaRecords.rawCollection(), mongodb >>>>>>> const { downloadManager, Media: NoMeteorMedia, stores, tempStore } = setUpFileCollections({ absoluteUrlPrefix: Meteor.absoluteUrl(), db, Logger, MediaRecords: MediaRecords.rawCollection(), mongodb <<<<<<< /** * @name downloadManager * @type FileDownloadManager * @memberof Files * @summary Set up a URL for downloading the files * @see https://github.com/reactioncommerce/reaction-file-collections */ const downloadManager = new FileDownloadManager({ collections: [Media], headers: { get: { "Cache-Control": "public, max-age=31536000" } } }); ======= >>>>>>>
<<<<<<< "shipping/getShippingRates": function (cart) { CartSchema.validate(cart); ======= "shipping/getShippingRates"(cart) { check(cart, CartSchema); >>>>>>> "shipping/getShippingRates"(cart) { CartSchema.validate(cart);
<<<<<<< splitOrderItem, updateOrder ======= updateOrder, updateOrderFulfillmentGroup >>>>>>> splitOrderItem, updateOrder, updateOrderFulfillmentGroup
<<<<<<< const order = Orders.findOne({ cartId: cartId }); taxCalc.recordOrder(order, (result) => { ======= const order = Orders.findOne({ cartId }); taxCalc.recordOrder(order, function (result) { >>>>>>> const order = Orders.findOne({ cartId }); taxCalc.recordOrder(order, (result) => {
<<<<<<< "shipping/rates/update": function (method) { ShippingMethod.validate(method); ======= "shipping/rates/update"(method) { check(method, ShippingMethod); >>>>>>> "shipping/rates/update"(method) { ShippingMethod.validate(method);
<<<<<<< autoValue: function () { if (this.isInsert || (this.isUpdate && !this.isSet)) { return new Date; ======= autoValue() { if (this.isInsert || this.isUpdate && !this.isSet) { return new Date(); >>>>>>> autoValue() { if (this.isInsert || (this.isUpdate && !this.isSet)) { return new Date();
<<<<<<< return ReactionCore.Collections.Packages.update(self.packageId, { $set: { enabled: true } }, function (error, result) { if (result === 1) { Alerts.toast( i18next.t("gridPackage.pkgEnabled", { app: i18next.t(self.i18nKeyLabel) }), "error", { type: "pkg-enabled-" + self.name ======= Meteor.call("shop/togglePackage", self.packageId, false, (error, result) => { if (result === 1) { Alerts.toast( i18n.t( "gridPackage.pkgEnabled", { app: i18n.t(self.i18nKeyLabel) } ), "error", { type: "pkg-enabled-" + self.name } ); if (self.name || self.route) { const route = self.name || self.route; return ReactionRouter.go(route); >>>>>>> return ReactionCore.Collections.Packages.update(self.packageId, { $set: { enabled: true } }, function (error, result) { if (result === 1) { Alerts.toast( i18next.t("gridPackage.pkgEnabled", { app: i18next.t(self.i18nKeyLabel) }), "error", { type: "pkg-enabled-" + self.name } ); } }); Meteor.call("shop/togglePackage", self.packageId, false, (error, result) => { if (result === 1) { Alerts.toast( i18n.t( "gridPackage.pkgEnabled", { app: i18n.t(self.i18nKeyLabel) } ), "error", { type: "pkg-enabled-" + self.name } ); if (self.name || self.route) { const route = self.name || self.route; return ReactionRouter.go(route); <<<<<<< } else if (error) { return Alerts.toast( i18next.t("gridPackage.pkgDisabled", { app: i18next.t(self.i18nKeyLabel) }), "warning" ); ======= >>>>>>> <<<<<<< }, function (error, result) { if (result === 1) { return Alerts.toast( i18next.t("gridPackage.pkgDisabled", { app: i18next.t(self.i18nKeyLabel) }), "success" ); } else if (error) { throw new Meteor.Error("error disabling package", error); } }); ======= ); >>>>>>> );
<<<<<<< import { Job } from "/imports/plugins/core/job-collection/lib"; import { GeoCoder, Logger } from "/server/api"; ======= import { Job } from "meteor/vsivsi:job-collection"; import { GeoCoder, Hooks, Logger } from "/server/api"; >>>>>>> import { Job } from "/imports/plugins/core/job-collection/lib"; import { GeoCoder, Hooks, Logger } from "/server/api";
<<<<<<< import fulfillment from "./fulfillment"; import payment from "./payment"; ======= import fulfillmentService from "/imports/node-app/services/fulfillment"; >>>>>>> import fulfillmentService from "/imports/node-app/services/fulfillment"; import payment from "./payment"; <<<<<<< export default merge({}, account, cart, catalog, core, fulfillment, payment, ping, product, scalar, shop, tag); ======= export default merge({}, account, cart, catalog, core, fulfillmentService.graphqlResolvers, ping, product, scalar, shop, tag); >>>>>>> export default merge({}, account, cart, catalog, core, fulfillmentService.graphqlResolvers, payment, ping, product, scalar, shop, tag);
<<<<<<< import { getDefaultUserInviteGroup, getUserByEmail } from "../helpers/accountsHelper"; ======= import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import CardHeader from "@material-ui/core/CardHeader"; import { getDefaultUserInviteGroup } from "../helpers/accountsHelper"; >>>>>>> import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import CardHeader from "@material-ui/core/CardHeader"; import { getDefaultUserInviteGroup, getUserByEmail } from "../helpers/accountsHelper";
<<<<<<< // import fixture data api.addFiles("server/fixtures.js", "server"); ======= // schemas api.addFiles("common/schemas/address.js"); api.addFiles("common/schemas/layouts.js"); api.addFiles("common/schemas/packages.js"); api.addFiles("common/schemas/shops.js"); api.addFiles("common/schemas/payments.js"); api.addFiles("common/schemas/shipping.js"); api.addFiles("common/schemas/taxes.js"); api.addFiles("common/schemas/discounts.js"); api.addFiles("common/schemas/products.js"); api.addFiles("common/schemas/tags.js"); api.addFiles("common/schemas/cart.js"); api.addFiles("common/schemas/orders.js"); api.addFiles("common/schemas/translations.js"); // collections api.addFiles("common/collections/collections.js"); api.addFiles("common/collections/collectionFS.js"); // collection hooks api.addFiles("common/collections/hooks/hooks.js"); // import fixture data api.addFiles("server/import.js", "server"); api.addFiles("server/fixtures.js", "server"); >>>>>>> // import fixture data api.addFiles("server/import.js", "server"); api.addFiles("server/fixtures.js", "server");
<<<<<<< if (authUserId === userId) { const isGlobalOwner = await context.userHasPermission("reaction:shops", "owner", { shopId, legacyRoles: ["owner"] }); // TODO(pod-auth): update this permissions check if (isGlobalOwner) groupSlug = "owner"; } // If we didn't already upgrade them to the "owner" group, see if they're been invited to any groups if (groupSlug === "customer") { ======= let groups; let invites; if (authUserId === userId && context.userHasPermission("reaction:legacy:shops", "owner", { shopId, legacyRoles: ["owner"] })) { // TODO(pod-auth): update this permissions check groupSlug = "owner"; } else { >>>>>>> if (authUserId === userId) { const isGlobalOwner = await context.userHasPermission("reaction:legacy:shops", "owner", { shopId, legacyRoles: ["owner"] }); // TODO(pod-auth): update this permissions check if (isGlobalOwner) groupSlug = "owner"; } // If we didn't already upgrade them to the "owner" group, see if they're been invited to any groups if (groupSlug === "customer") {
<<<<<<< }, mutations, graphQL: { resolvers, schemas ======= }, backgroundJobs: { cleanup: [ { type: "saveImage/local", purgeAfterDays: 7 }, { type: "saveImage/remote", purgeAfterDays: 7 } ] >>>>>>> }, mutations, graphQL: { resolvers, schemas }, backgroundJobs: { cleanup: [ { type: "saveImage/local", purgeAfterDays: 7 }, { type: "saveImage/remote", purgeAfterDays: 7 } ]
<<<<<<< collections: { Accounts, AccountInvites, Groups }, ======= checkPermissions, collections: { Accounts, Groups }, >>>>>>> checkPermissions, collections: { Accounts, AccountInvites, Groups },
<<<<<<< "paypalexpress/payment/capture": function (paymentMethod) { // Call both check and validate because by calling `clean`, the audit pkg // thinks that we haven't checked paymentMethod arg check(paymentMethod, Object); PaymentMethodArgument.validate(PaymentMethodArgument.clean(paymentMethod)); ======= "paypalexpress/payment/capture"(paymentMethod) { check(paymentMethod, Reaction.Schemas.PaymentMethod); >>>>>>> "paypalexpress/payment/capture"(paymentMethod) { // Call both check and validate because by calling `clean`, the audit pkg // thinks that we haven't checked paymentMethod arg check(paymentMethod, Object); PaymentMethodArgument.validate(PaymentMethodArgument.clean(paymentMethod)); <<<<<<< "paypalexpress/refund/create": function (paymentMethod, amount) { ======= "paypalexpress/refund/create"(paymentMethod, amount) { check(paymentMethod, Reaction.Schemas.PaymentMethod); >>>>>>> "paypalexpress/refund/create"(paymentMethod, amount) { <<<<<<< "paypalexpress/refund/list": function (paymentMethod) { // Call both check and validate because by calling `clean`, the audit pkg // thinks that we haven't checked paymentMethod arg check(paymentMethod, Object); PaymentMethodArgument.validate(PaymentMethodArgument.clean(paymentMethod)); ======= "paypalexpress/refund/list"(paymentMethod) { check(paymentMethod, Reaction.Schemas.PaymentMethod); >>>>>>> "paypalexpress/refund/list"(paymentMethod) { // Call both check and validate because by calling `clean`, the audit pkg // thinks that we haven't checked paymentMethod arg check(paymentMethod, Object); PaymentMethodArgument.validate(PaymentMethodArgument.clean(paymentMethod));
<<<<<<< import { getCurrentTag, getShopName } from "/lib/api"; import { Products } from "/lib/collections"; ======= import { Products, Revisions, Tags } from "/lib/collections"; >>>>>>> import { Products, Tags } from "/lib/collections"; <<<<<<< ======= * @name applyProductRevision * @method * @memberof ReactionProduct * @summary Apply revision to product * @example applyProductRevision(product) * @param {Object} product product * @return {Object|null} product or null, if no product found */ export function applyProductRevision(product) { if (product) { if (product.__revisions && product.__revisions.length) { const cleanProduct = Object.assign({}, product); delete cleanProduct.__revisions; let revisedProduct; // check for product revisions and set that as the current product for (const revision of product.__revisions) { if (!revision.parentDocument) { revisedProduct = product.__revisions[0].documentData; } } // if there are no revision to product (image and/or tag only) just set the original product as the product if (!revisedProduct) { revisedProduct = cleanProduct; } return Object.assign({}, revisedProduct, { __published: cleanProduct, __draft: product.__revisions[0] }); } return product; } return null; } /** >>>>>>> <<<<<<< const archivedCount = Products.find({ _id: { $in: productIds }, isDeleted: true ======= const archivedCount = Revisions.find({ "documentId": { $in: productIds }, "documentData.isDeleted": true, "workflow.status": { $nin: ["revision/published"] } >>>>>>> const archivedCount = Products.find({ _id: { $in: productIds }, isDeleted: true
<<<<<<< import { Orders, Products } from "/lib/collections"; import rawCollections from "/imports/collections/rawCollections"; import appEvents from "/imports/node-app/core/util/appEvents"; ======= import appEvents from "/imports/node-app/core/util/appEvents"; import { Orders } from "/lib/collections"; >>>>>>> import { Orders } from "/lib/collections"; import appEvents from "/imports/node-app/core/util/appEvents"; <<<<<<< const updatedOrder = Orders.findOne({ _id: order._id }); Promise.await(appEvents.emit("afterOrderUpdate", { order: updatedOrder, updatedBy: Reaction.getUserId() })); ======= Promise.await(appEvents.emit("afterOrderApprovePayment", order)); // Update search record Hooks.Events.run("afterUpdateOrderUpdateSearchRecord", order); >>>>>>> const updatedOrder = Orders.findOne({ _id: order._id }); Promise.await(appEvents.emit("afterOrderUpdate", { order: updatedOrder, updatedBy: Reaction.getUserId() })); Promise.await(appEvents.emit("afterOrderApprovePayment", updatedOrder));
<<<<<<< const queryParams = ReactionRouter.current().queryParams; filter.label = i18n.t(`order.filter.${filter.name}`); ======= const queryParams = Router.current().params.query; filter.label = i18n.t(`order.filter.${filter.name}`, {defaultValue: filter.label}); >>>>>>> filter.label = i18n.t(`order.filter.${filter.name}`, {defaultValue: filter.label});
<<<<<<< /** * loadI18n fixtures * @summary imports translation fixture data * @param {Object} translationCollection - optional collection object * @returns {null} inserts collection */ loadI18n(translationCollection) { let collection = translationCollection || ReactionCore.Collections.Translations; let json; if (collection.find().count() > 0) { return; } let shop = ReactionCore.Collections.Shops.findOne(); if (shop) { ReactionCore.Log.info( `Loading fixture data for ${collection._name}`); if (!(shop !== null ? shop.languages : void 0)) { shop.languages = [{ i18n: "en" }]; } for (let language of shop.languages) { json = EJSON.parse(Assets.getText("private/data/i18n/" + language.i18n + ".json")); for (let item of json) { collection.insert(item, function (error) { if (error) { ReactionCore.Log.warn("Error adding " + language.i18n + " to " + collection._name, item, error); } }); ReactionCore.Log.info("Success adding " + language.i18n + " to " + collection._name); } } } else { ReactionCore.Log.error("No shop found. Failed to load languages."); return; } } /** * @function loadCurrencyJobs * @summary Creates two jobs for fetching latest and clearing old exchange rates * @param {Object} jobsCollection - jobs collection * @returns {undefined} */ loadCurrencyJobs(jobsCollection) { const collection = jobsCollection || ReactionCore.Collections.Jobs; if (collection.find().count() > 0) { return; } const shopId = ReactionCore.getShopId(); const shopSettings = ReactionCore.Collections.Packages.findOne({ shopId: shopId, name: "core" }, { fields: { settings: 1 } }); // todo this statement is for compatibility with previously created shops, // update it to `const refreshPeriod = shopSettings.settings.openexchangerates.refreshPeriod` // over a few months from november of 2015 if (!shopSettings.settings.openexchangerates) shopSettings.settings.openexchangerates = {}; const refreshPeriod = shopSettings.settings.openexchangerates.refreshPeriod || "every 1 hour"; const fetchCurrencyRatesJob = new Job(Jobs, "shop/fetchCurrencyRates", {}) .priority("normal") .retry({ retries: 5, wait: 60000, backoff: "exponential" // delay by twice as long for each subsequent retry }) .repeat({ // wait: refreshPeriod * 60 * 1000 schedule: Jobs.later.parse.text(refreshPeriod) }) .save({ // Cancel any jobs of the same type, // but only if this job repeats forever. // Default: false. // We do not need this here anymore, because fixtures runs one time, but // let it be here anyway for some case... cancelRepeats: true }); if (fetchCurrencyRatesJob) { ReactionCore.Log.info("Success adding new job for: 'shop/fetchCurrencyRates'"); } const flushCurrencyRatesJob = new Job(Jobs, "shop/flushCurrencyRates", {}) .priority("normal") .retry({ retries: 5, wait: 60000, backoff: "exponential" }) .repeat({ wait: 48 * 60 * 60 * 1000 // every 48 hours }) .save({ cancelRepeats: true }); if (flushCurrencyRatesJob) { ReactionCore.Log.info("Success adding new job for: 'shop/flushCurrencyRates'"); } } ======= >>>>>>> /** * loadI18n fixtures * @summary imports translation fixture data * @param {Object} translationCollection - optional collection object * @returns {null} inserts collection */ loadI18n(translationCollection) { let collection = translationCollection || ReactionCore.Collections.Translations; let json; if (collection.find().count() > 0) { return; } let shop = ReactionCore.Collections.Shops.findOne(); if (shop) { ReactionCore.Log.info( `Loading fixture data for ${collection._name}`); if (!(shop !== null ? shop.languages : void 0)) { shop.languages = [{ i18n: "en" }]; } for (let language of shop.languages) { json = EJSON.parse(Assets.getText("private/data/i18n/" + language.i18n + ".json")); for (let item of json) { collection.insert(item, function (error) { if (error) { ReactionCore.Log.warn("Error adding " + language.i18n + " to " + collection._name, item, error); } }); ReactionCore.Log.info("Success adding " + language.i18n + " to " + collection._name); } } } else { ReactionCore.Log.error("No shop found. Failed to load languages."); return; } } /** * @function loadCurrencyJobs * @summary Creates two jobs for fetching latest and clearing old exchange rates * @param {Object} jobsCollection - jobs collection * @returns {undefined} */ loadCurrencyJobs(jobsCollection) { const collection = jobsCollection || ReactionCore.Collections.Jobs; if (collection.find().count() > 0) { return; } const shopId = ReactionCore.getShopId(); const shopSettings = ReactionCore.Collections.Packages.findOne({ shopId: shopId, name: "core" }, { fields: { settings: 1 } }); // todo this statement is for compatibility with previously created shops, // update it to `const refreshPeriod = shopSettings.settings.openexchangerates.refreshPeriod` // over a few months from november of 2015 if (!shopSettings.settings.openexchangerates) shopSettings.settings.openexchangerates = {}; const refreshPeriod = shopSettings.settings.openexchangerates.refreshPeriod || "every 1 hour"; const fetchCurrencyRatesJob = new Job(Jobs, "shop/fetchCurrencyRates", {}) .priority("normal") .retry({ retries: 5, wait: 60000, backoff: "exponential" // delay by twice as long for each subsequent retry }) .repeat({ // wait: refreshPeriod * 60 * 1000 schedule: Jobs.later.parse.text(refreshPeriod) }) .save({ // Cancel any jobs of the same type, // but only if this job repeats forever. // Default: false. // We do not need this here anymore, because fixtures runs one time, but // let it be here anyway for some case... cancelRepeats: true }); if (fetchCurrencyRatesJob) { ReactionCore.Log.info("Success adding new job for: 'shop/fetchCurrencyRates'"); } const flushCurrencyRatesJob = new Job(Jobs, "shop/flushCurrencyRates", {}) .priority("normal") .retry({ retries: 5, wait: 60000, backoff: "exponential" }) .repeat({ wait: 48 * 60 * 60 * 1000 // every 48 hours }) .save({ cancelRepeats: true }); if (flushCurrencyRatesJob) { ReactionCore.Log.info("Success adding new job for: 'shop/flushCurrencyRates'"); } } <<<<<<< }; /* * load core fixture data */ ReactionRegistry.loadFixtures = function () { Fixtures.loadData(ReactionCore.Collections.Shops); // start checking once per second if Shops collection is ready, // then load the rest of the fixtures when it is let wait = Meteor.setInterval(function () { if (!!ReactionCore.Collections.Shops.find().count()) { Meteor.clearInterval(wait); Fixtures.loadI18n(ReactionCore.Collections.Translations); Fixtures.loadData(ReactionCore.Collections.Products); Fixtures.loadData(ReactionCore.Collections.Tags); Fixtures.loadCurrencyJobs(ReactionCore.Collections.Jobs); // create default admin user ReactionRegistry.createDefaultAdminUser(); // we've finished all reaction core initialization ReactionCore.Log.info("Reaction Core initialization finished."); } }, 1000); // load package configurations if (ReactionCore.Collections.Shops.find().count()) { ReactionRegistry.setDomain(); ReactionRegistry.loadPackages(); } ======= >>>>>>> }; /* * load core fixture data */ ReactionRegistry.loadFixtures = function () { Fixtures.loadData(ReactionCore.Collections.Shops); // start checking once per second if Shops collection is ready, // then load the rest of the fixtures when it is let wait = Meteor.setInterval(function () { if (!!ReactionCore.Collections.Shops.find().count()) { Meteor.clearInterval(wait); Fixtures.loadI18n(ReactionCore.Collections.Translations); Fixtures.loadData(ReactionCore.Collections.Products); Fixtures.loadData(ReactionCore.Collections.Tags); Fixtures.loadCurrencyJobs(ReactionCore.Collections.Jobs); // create default admin user ReactionRegistry.createDefaultAdminUser(); // we've finished all reaction core initialization ReactionCore.Log.info("Reaction Core initialization finished."); } }, 1000); // load package configurations if (ReactionCore.Collections.Shops.find().count()) { ReactionRegistry.setDomain(); ReactionRegistry.loadPackages(); }
<<<<<<< import removeAccountAddressBookEntry from "./removeAccountAddressBookEntry"; ======= import setAccountProfileCurrency from "./setAccountProfileCurrency"; >>>>>>> import removeAccountAddressBookEntry from "./removeAccountAddressBookEntry"; import setAccountProfileCurrency from "./setAccountProfileCurrency"; <<<<<<< removeAccountAddressBookEntry, ======= setAccountProfileCurrency, >>>>>>> removeAccountAddressBookEntry, setAccountProfileCurrency,
<<<<<<< const settings = Reaction.getMarketplaceSettings(); const enabled = settings.enabled; const shopsOfUser = Reaction.getShopsForUser(["admin"], this.userId); ======= const { enabled } = Reaction.getMarketplaceSettings(); >>>>>>> const shopsOfUser = Reaction.getShopsForUser(["admin"], this.userId); const { enabled } = Reaction.getMarketplaceSettings();
<<<<<<< ======= * @property {String} publishedProductHash optional * @property {Boolean} shouldAppearInSitemap optional, whether this product should appear in auto-generated sitemap.xml >>>>>>> <<<<<<< ======= }, "currentProductHash": { type: String, optional: true }, "publishedProductHash": { type: String, optional: true }, "shouldAppearInSitemap": { type: Boolean, optional: true, defaultValue: true >>>>>>>
<<<<<<< // import generateVerificationTokenObject from "/imports/plugins/core/accounts/server/no-meteor/util/generateVerificationTokenObject"; import getGraphQLContextInMeteorMethod from "/imports/plugins/core/graphql/server/getGraphQLContextInMeteorMethod"; import sendVerificationEmail from "./util/sendVerificationEmail"; appEvents.on("afterAddUnverifiedEmailToUser", ({ email, userId }) => { sendVerificationEmail({ email, userId }); }); ======= import sendWelcomeEmail from "/imports/plugins/core/accounts/server/util/sendWelcomeEmail"; import generateVerificationTokenObject from "/imports/plugins/core/accounts/server/no-meteor/util/generateVerificationTokenObject"; >>>>>>> import generateVerificationTokenObject from "/imports/plugins/core/accounts/server/no-meteor/util/generateVerificationTokenObject"; import getGraphQLContextInMeteorMethod from "/imports/plugins/core/graphql/server/getGraphQLContextInMeteorMethod"; <<<<<<< // TODO: EK - remove these lines and uncomment `generateVerificationTokenObject` once #5577 is merged const token = Random.secret(); const when = new Date(); tokenObj = { address: user.emails[0].address, token, when }; // const tokenObj = generateVerificationTokenObject({ address: user.emails[0].address }); } // Get GraphQL context to pass to mutation // This is the only place in the app that still // uses `getGraphQLContextInMeteorMethod` // Prioritize removing if possible const context = Promise.await(getGraphQLContextInMeteorMethod(null)); context.isInternalCall = true; Promise.await(context.mutations.createAccount(context, { additionals, groupId: groupToAddUser, shopId, tokenObj, user })); delete context.isInternalCall; // set verification token on user if (tokenObj) { ======= const tokenObj = generateVerificationTokenObject({ address: user.emails[0].address }); sendWelcomeEmail(shopId, user._id, tokenObj.token); >>>>>>> const tokenObj = generateVerificationTokenObject({ address: user.emails[0].address }); } // Get GraphQL context to pass to mutation // This is the only place in the app that still // uses `getGraphQLContextInMeteorMethod` // Prioritize removing if possible const context = Promise.await(getGraphQLContextInMeteorMethod(null)); context.isInternalCall = true; Promise.await(context.mutations.createAccount(context, { additionals, groupId: groupToAddUser, shopId, tokenObj, user })); delete context.isInternalCall; // set verification token on user if (tokenObj) {
<<<<<<< import _ from "lodash"; import { check, Match } from "meteor/check"; ======= import { check } from "meteor/check"; import accounting from "accounting-js"; import Hooks from "@reactioncommerce/hooks"; >>>>>>> import { check } from "meteor/check"; <<<<<<< import { Orders, Packages } from "/lib/collections"; import appEvents from "/imports/node-app/core/util/appEvents"; ======= import { Orders } from "/lib/collections"; >>>>>>> import { Orders } from "/lib/collections"; import appEvents from "/imports/node-app/core/util/appEvents"; import accounting from "accounting-js"; <<<<<<< const updateResult = Orders.update( ======= // List refunds to see if we've now refunded the full amount of this payment const allRefunds = Promise.await(functions.listRefunds(context, payment)); const refundTotal = allRefunds.reduce((sum, refund) => sum + refund.amount, 0); // There could be JS math errors so we round to 3 decimal places when comparing const isFullyRefunded = accounting.toFixed(refundTotal, 3) === accounting.toFixed(payment.amount, 3); Orders.update( >>>>>>> // List refunds to see if we've now refunded the full amount of this payment const allRefunds = Promise.await(functions.listRefunds(context, payment)); const refundTotal = allRefunds.reduce((sum, refund) => sum + refund.amount, 0); // There could be JS math errors so we round to 3 decimal places when comparing const isFullyRefunded = accounting.toFixed(refundTotal, 3) === accounting.toFixed(payment.amount, 3); const updateResult = Orders.update(
<<<<<<< import { registerSchema } from "@reactioncommerce/reaction-collections"; import { convertWeight, convertLength, getSlug } from "/lib/api"; ======= import { registerSchema } from "@reactioncommerce/schemas"; import { getSlug } from "/lib/api"; >>>>>>> import { registerSchema } from "@reactioncommerce/schemas"; import { convertWeight, convertLength, getSlug } from "/lib/api";
<<<<<<< getSellerShopId: function (userId = Meteor.userId()) { if (userId) { const group = Roles.getGroupsForUser(userId, "admin")[0]; if (group) { return group; } } return this.getShopId(); }, ======= getUserPreferences(packageName, preference, defaultValue) { const profile = Meteor.user().profile; if (profile && profile.preferences && profile.preferences[packageName] && profile.preferences[packageName][preference]) { return profile.preferences[packageName][preference]; } return defaultValue || undefined; }, setUserPreferences(packageName, preference, value) { if (Meteor.user()) { return Meteor.users.update(Meteor.userId(), { $set: { [`profile.preferences.${packageName}.${preference}`]: value } }); } return false; }, >>>>>>> getSellerShopId: function (userId = Meteor.userId()) { if (userId) { const group = Roles.getGroupsForUser(userId, "admin")[0]; if (group) { return group; } } return this.getShopId(); }, getUserPreferences(packageName, preference, defaultValue) { const profile = Meteor.user().profile; if (profile && profile.preferences && profile.preferences[packageName] && profile.preferences[packageName][preference]) { return profile.preferences[packageName][preference]; } return defaultValue || undefined; }, setUserPreferences(packageName, preference, value) { if (Meteor.user()) { return Meteor.users.update(Meteor.userId(), { $set: { [`profile.preferences.${packageName}.${preference}`]: value } }); } return false; },
<<<<<<< import SimpleSchema from "simpl-schema"; import { check } from "meteor/check"; import { Tracker } from "meteor/tracker"; import { createdAtAutoValue, shopIdAutoValueForCart, updatedAtAutoValue } from "./helpers"; ======= import { SimpleSchema } from "meteor/aldeed:simple-schema"; import { registerSchema } from "@reactioncommerce/reaction-collections"; import { shopIdAutoValueForCart } from "./helpers"; >>>>>>> import SimpleSchema from "simpl-schema"; import { check } from "meteor/check"; import { Tracker } from "meteor/tracker"; import { registerSchema } from "@reactioncommerce/reaction-collections"; import { createdAtAutoValue, shopIdAutoValueForCart, updatedAtAutoValue } from "./helpers"; <<<<<<< autoValue: createdAtAutoValue ======= autoValue() { if (this.isInsert) { return new Date(); } else if (this.isUpsert) { return { $setOnInsert: new Date() }; } }, denyUpdate: true >>>>>>> autoValue: createdAtAutoValue <<<<<<< autoValue: updatedAtAutoValue, ======= autoValue() { if (this.isUpdate) { return { $set: new Date() }; } else if (this.isUpsert) { return { $setOnInsert: new Date() }; } }, >>>>>>> autoValue: updatedAtAutoValue,
<<<<<<< const { afterValidate, billingAddress, createPaymentForFulfillmentGroup, order: orderInput } = cleanedInput; const { cartId, cartToken, currencyCode, email, fulfillmentGroups, shopId } = orderInput; ======= const { afterValidate, createPaymentForFulfillmentGroup, order: orderInput } = cleanedInput; const { cartId, currencyCode, email, fulfillmentGroups, shopId } = orderInput; >>>>>>> const { afterValidate, billingAddress, createPaymentForFulfillmentGroup, order: orderInput } = cleanedInput; const { cartId, cartToken, currencyCode, email, fulfillmentGroups, shopId } = orderInput; <<<<<<< const cart = await getCartById(context, cartId, { cartToken, throwIfNotFound: true }); const cartWithSummary = await xformCartCheckout(collections, cart); // Verify that the price for the chosen shipment method on each group matches between what the client // provided and what the current quote is. const rates = await context.queries.getFulfillmentMethodsWithQuotes(finalGroup, cartWithSummary, context); const selectedFulfillmentMethod = rates.find((rate) => groupInput.selectedFulfillmentMethodId === rate.method._id); if (!selectedFulfillmentMethod) { throw new ReactionError("invalid", "The selected fulfillment method is no longer available." + " Fetch updated fulfillment options and try creating the order again with a valid method."); } finalGroup.shipmentMethod = { _id: selectedFulfillmentMethod.method._id, carrier: selectedFulfillmentMethod.method.carrier, currencyCode, label: selectedFulfillmentMethod.method.label, group: selectedFulfillmentMethod.method.group, name: selectedFulfillmentMethod.method.name, handling: selectedFulfillmentMethod.handlingPrice, rate: selectedFulfillmentMethod.shippingPrice }; ======= >>>>>>>
<<<<<<< export function xformVariant(variant, variantPriceInfo, shopCurrencyCode, variantMedia) { ======= export function xformVariant(variant, variantMedia, variantInventory) { >>>>>>> export function xformVariant(variant, variantMedia) { <<<<<<< export async function xformProduct({ context, product, shop, variants }) { const { collections } = context; const shopCurrencyCode = shop.currency; const shopCurrencyInfo = shop.currencies[shopCurrencyCode]; ======= export async function xformProduct({ collections, product, variants }) { >>>>>>> export async function xformProduct({ context, product, variants }) { const { collections } = context; <<<<<<< return xformVariant(option, getPriceRange([option.price], shopCurrencyInfo), shopCurrencyCode, optionMedia); ======= const optionInventory = { canBackorder: canBackorder([option]), inventoryAvailableToSell: option.inventoryAvailableToSell, inventoryInStock: option.inventoryInStock, isBackorder: isBackorder([option]), isLowQuantity: isLowQuantity([option]), isSoldOut: isSoldOut([option]) }; return xformVariant(option, optionMedia, optionInventory); >>>>>>> return xformVariant(option, optionMedia);
<<<<<<< // seller shop homepage } else if (routeName === "shop") { const currentShop = SellerShops.findOne(params.shopId); if(currentShop) { title = titleCase(currentShop.name); } else { title = titleCase(routeName); } // default routes to route's name ======= // check for meta in package route } else if (route.options.meta && route.options.meta.title) { title = titleCase(route.options.meta.title); >>>>>>> // seller shop homepage } else if (routeName === "shop") { const currentShop = SellerShops.findOne(params.shopId); if(currentShop) { title = titleCase(currentShop.name); } else { title = titleCase(routeName); } // check for meta in package route } else if (route.options.meta && route.options.meta.title) { title = titleCase(route.options.meta.title);
<<<<<<< import { Media } from "/lib/collections"; import { registerComponent } from "@reactioncommerce/reaction-components"; import { filterShippingStatus, filterWorkflowStatus } from "../helpers"; ======= import { filterShippingStatus, filterWorkflowStatus } from "../helpers"; import OrderDashboard from "../components/orderDashboard.js"; >>>>>>> import { Media } from "/lib/collections"; import { registerComponent } from "@reactioncommerce/reaction-components"; import { filterShippingStatus, filterWorkflowStatus, getShippingInfo } from "../helpers"; <<<<<<< filterShippingStatus={this.filterShippingStatus} filterWorkflowStatus={this.filterWorkflowStatus} handleChange={this.handleSearchChange} handleSelect={this.handleSelect} orders={this.state.orders} ======= filterShippingStatus={this.filterShippingStatus} >>>>>>> filterShippingStatus={this.filterShippingStatus} filterWorkflowStatus={this.filterWorkflowStatus} handleChange={this.handleSearchChange} handleSelect={this.handleSelect} orders={this.state.orders} <<<<<<< ======= filterWorkflowStatus={this.filterWorkflowStatus} >>>>>>>
<<<<<<< import "./43_stripe_marketplace_pkg"; import "./44_tax_rates_pkg"; import "./45_tax_schema_changes"; import "./46_cart_item_props"; import "./47_order_ref"; import "./48_catalog_variant_inventory"; ======= import "./43_stripe_marketplace_pkg"; import "./43-1_remove_social_app_secret"; >>>>>>> import "./43_stripe_marketplace_pkg"; import "./43-1_remove_social_app_secret"; import "./44_tax_rates_pkg"; import "./45_tax_schema_changes"; import "./46_cart_item_props"; import "./47_order_ref"; import "./48_catalog_variant_inventory";
<<<<<<< "authnet/payment/capture": function (paymentMethod) { // Call both check and validate because by calling `clean`, the audit pkg // thinks that we haven't checked paymentMethod arg check(paymentMethod, Object); PaymentMethodArgument.validate(paymentMethod); ======= "authnet/payment/capture"(paymentMethod) { check(paymentMethod, Reaction.Schemas.PaymentMethod); >>>>>>> "authnet/payment/capture"(paymentMethod) { // Call both check and validate because by calling `clean`, the audit pkg // thinks that we haven't checked paymentMethod arg check(paymentMethod, Object); PaymentMethodArgument.validate(paymentMethod); <<<<<<< "authnet/refund/create": function (paymentMethod, amount) { ======= "authnet/refund/create"(paymentMethod, amount) { check(paymentMethod, PaymentMethod); >>>>>>> "authnet/refund/create"(paymentMethod, amount) {
<<<<<<< if (typeof options.error === "undefined") { ======= // Default return value is the return value of previous call in method chain // or an empty object if there's no result yet. let result = options.result || {}; if (options.error === undefined) { >>>>>>> // Default return value is the return value of previous call in method chain // or an empty object if there's no result yet. let result = options.result || {}; if (typeof options.error === "undefined") { <<<<<<< // we need to throw an the session below the `cart/createCart` method const sessionId = options.arguments[1]; Meteor.call("cart/copyCartToOrder", cart._id, sessionId); ======= let orderId = Meteor.call("cart/copyCartToOrder", cart._id); // Return orderId as result from this after hook call. // This is done by extending the existing result. result.orderId = orderId; >>>>>>> // we need to throw an the session below the `cart/createCart` method const sessionId = options.arguments[1]; const orderId = Meteor.call("cart/copyCartToOrder", cart._id, sessionId); // Return orderId as result from this after hook call. // This is done by extending the existing result. result.orderId = orderId;
<<<<<<< Hooks.Events.run("afterUpdateCatalogProduct", item.variant); ======= // Publish inventory updates to the Catalog publishProductInventoryAdjustments(item.productId); >>>>>>> Hooks.Events.run("afterUpdateCatalogProduct", item.variant); // Publish inventory updates to the Catalog publishProductInventoryAdjustments(item.productId); <<<<<<< Hooks.Events.run("afterUpdateCatalogProduct", item.variants); ======= // Publish inventory updates to the Catalog publishProductInventoryAdjustments(item.productId); >>>>>>> Hooks.Events.run("afterUpdateCatalogProduct", item.variants); // Publish inventory updates to the Catalog publishProductInventoryAdjustments(item.productId); <<<<<<< Hooks.Events.run("afterUpdateCatalogProduct", item.variants); ======= // Publish inventory updates to the Catalog publishProductInventoryAdjustments(item.productId); >>>>>>> Hooks.Events.run("afterUpdateCatalogProduct", item.variants); // Publish inventory updates to the Catalog publishProductInventoryAdjustments(item.productId);
<<<<<<< import SimpleSchema from "simpl-schema"; import { check } from "meteor/check"; import { Tracker } from "meteor/tracker"; import { createdAtAutoValue, shopIdAutoValue } from "./helpers"; ======= import { SimpleSchema } from "meteor/aldeed:simple-schema"; import { registerSchema } from "@reactioncommerce/reaction-collections"; import { shopIdAutoValue } from "./helpers"; >>>>>>> import SimpleSchema from "simpl-schema"; import { check } from "meteor/check"; import { Tracker } from "meteor/tracker"; import { registerSchema } from "@reactioncommerce/reaction-collections"; import { createdAtAutoValue, shopIdAutoValue } from "./helpers"; <<<<<<< autoValue: createdAtAutoValue ======= autoValue() { if (this.isInsert) { return new Date(); } else if (this.isUpsert) { return { $setOnInsert: new Date() }; } } >>>>>>> autoValue: createdAtAutoValue
<<<<<<< topic: topic, integrations: integrationsByTopic[topic], webhooksDomain ======= topic, integrations: integrationsByTopic[topic] >>>>>>> topic, integrations: integrationsByTopic[topic], webhooksDomain