code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/assets/js/modules/analytics/components/common/AdSenseLinkCTA.js b/assets/js/modules/analytics/components/common/AdSenseLinkCTA.js @@ -45,7 +45,7 @@ export default function AdSenseLinkCTA() {
) }
ctaLink={ supportURL }
ctaLabel={ __( 'Learn more', 'google-site-kit' ) }
- ctaLinkExternal={ true }
+ ctaLinkExternal
/>
);
}
| 2 |
diff --git a/generators/openapi-client/files.js b/generators/openapi-client/files.js @@ -69,8 +69,6 @@ function writeFiles() {
' --library spring-cloud ' +
` -i ${inputSpec} --artifact-id ${_.camelCase(cliName)} --api-package ${cliPackage}.api` +
` --model-package ${cliPackage}.model` +
- ' --type-mappings DateTime=OffsetDateTime,Date=LocalDate ' +
- ' --import-mappings OffsetDateTime=java.time.OffsetDateTime,LocalDate=java.time.LocalDate' +
` -DbasePackage=${this.packageName}.client,configPackage=${cliPackage},` +
`title=${_.camelCase(cliName)}`;
| 2 |
diff --git a/src/VelocityContext.js b/src/VelocityContext.js @@ -84,6 +84,7 @@ module.exports = class VelocityContext {
identity: {
accountId: 'offlineContext_accountId',
apiKey: 'offlineContext_apiKey',
+ apiKeyId: 'offlineContext_apiKeyId',
caller: 'offlineContext_caller',
cognitoAuthenticationProvider:
'offlineContext_cognitoAuthenticationProvider',
| 0 |
diff --git a/vis/stylesheets/modules/_modal.scss b/vis/stylesheets/modules/_modal.scss @@ -386,3 +386,13 @@ h5 {
margin-top: 5px;
font-style: italic;
}
+
+.citation {
+ display: block;
+ padding: 10px;
+ background-color: rgba(239,243,244,1);
+ hyphens: none;
+ border-radius: 3px;
+ -moz-border-radius: 3px;
+ word-break: break-word;
+}
| 5 |
diff --git a/apps.json b/apps.json "shortName":"Planetarium",
"icon": "planetarium.png",
"version":"0.02",
- "description": "Planetarium showing up to 350 stars using the watch location and time",
+ "description": "Planetarium showing up to 500 stars using the watch location and time",
"tags": "",
"storage": [
{"name":"planetarium.app.js","url":"planetarium.app.js"},
| 3 |
diff --git a/src/components/DayPickerKeyboardShortcuts.jsx b/src/components/DayPickerKeyboardShortcuts.jsx @@ -198,6 +198,7 @@ export default withStyles(({ reactDates: { color, zIndex } }) => ({
DayPickerKeyboardShortcuts_buttonReset: {
background: 'none',
border: 0,
+ borderRadius: 0,
color: 'inherit',
font: 'inherit',
lineHeight: 'normal',
| 12 |
diff --git a/src/definitions/modules/dropdown.less b/src/definitions/modules/dropdown.less @@ -1239,7 +1239,7 @@ select.ui.dropdown {
border-radius: @pointingMenuBorderRadius;
}
-.ui.pointing.dropdown > .menu:after {
+.ui.pointing.dropdown > .menu:not(.hidden):after {
display: block;
position: absolute;
pointer-events: none;
@@ -1254,7 +1254,7 @@ select.ui.dropdown {
z-index: @pointingArrowZIndex;
}
-.ui.pointing.dropdown > .menu:after {
+.ui.pointing.dropdown > .menu:not(.hidden):after {
top: @pointingArrowOffset;
left: 50%;
margin: 0em 0em 0em @pointingArrowOffset;
| 1 |
diff --git a/src/schemas/json/package.json b/src/schemas/json/package.json "type": "string",
"maxLength": 214,
"minLength": 1,
- "pattern": "^(?:@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$"
+ "pattern": "^(?:@[a-z0-9-*~][a-z0-9-*._~]*/)?[a-z0-9-~][a-z0-9-._~]*$"
},
"version": {
"description": "Version must be parseable by node-semver, which is bundled with npm as a dependency.",
| 11 |
diff --git a/guide/english/electron/index.md b/guide/english/electron/index.md @@ -32,7 +32,7 @@ Some apps built using Electron include:
* [Skype](https://www.skype.com/) (Microsoft's popular video chat application)
* [Slack](https://slack.com/) (A messaging app for teams)
* [Discord](https://discordapp.com) (A popular messaging app for gamers)
-* [Github Desktop](https://desktop.github.com/) (Official Github Desktop Client)
+* [GitHub Desktop](https://desktop.github.com/) (Official GitHub Desktop Client)
* [Whatsapp Deskstop](https://web.whatsapp.com/desktop/windows/release/x64/WhatsAppSetup.exe)(Whatsapp Client For Windows)
* [Twitch.tv](https://www.twitch.tv/)(A live Streaming Video Platform)
* [Wire](https://wire.com/)(An encrypted instant messaging client)
| 14 |
diff --git a/locksmith/migrations/20190412205611-add_event_owner.js b/locksmith/migrations/20190412205611-add_event_owner.js @@ -7,6 +7,7 @@ module.exports = {
await queryInterface.addColumn(table, 'owner', {
type: Sequelize.STRING,
allowNull: false,
+ defaultValue: '',
})
},
| 11 |
diff --git a/tests/e2e/specs/plugin-activation.test.js b/tests/e2e/specs/plugin-activation.test.js @@ -17,46 +17,30 @@ import { deactivatePlugin, activatePlugin } from '@wordpress/e2e-test-utils';
* and consuming code can use `google-site-kit` variations in their places.
*/
-const activateSiteKit = async () => {
- try {
- await activatePlugin( 'google-site-kit' );
- } catch {
- await activatePlugin( 'site-kit-by-google' );
- }
-};
-
-const deactivateSiteKit = async () => {
- try {
- await deactivatePlugin( 'google-site-kit' );
- } catch {
- await deactivatePlugin( 'site-kit-by-google' );
- }
-};
-
describe( 'Plugin Activation Notice', () => {
describe( 'When Javascript is enabled', () => {
beforeEach( async () => {
- await deactivateSiteKit();
+ await deactivatePlugin( 'google-site-kit' );
await activatePlugin( 'e2e-tests-gcp-credentials-plugin' );
} );
afterEach( async () => {
await deactivatePlugin( 'e2e-tests-gcp-credentials-plugin' );
- await activateSiteKit();
+ await activatePlugin( 'google-site-kit' );
} );
it( 'Should be displayed', async () => {
- await activateSiteKit();
+ await activatePlugin( 'google-site-kit' );
await page.waitForSelector( '.googlesitekit-activation__title' );
await expect( page ).toMatchElement( '.googlesitekit-activation__title', { text: /Congratulations, the Site Kit plugin is now activated./i } );
- await deactivateSiteKit();
+ await deactivatePlugin( 'google-site-kit' );
} );
it( 'Should lead you to the setup wizard', async () => {
- await activateSiteKit();
+ await activatePlugin( 'google-site-kit' );
await page.waitForSelector( '.googlesitekit-activation' );
@@ -68,25 +52,25 @@ describe( 'Plugin Activation Notice', () => {
// Ensure we're on the first step.
await expect( page ).toMatchElement( '.googlesitekit-wizard-progress-step__number--inprogress', { text: '1' } );
- await deactivateSiteKit();
+ await deactivatePlugin( 'google-site-kit' );
} );
it( 'Should not display noscript notice', async () => {
- await activateSiteKit();
+ await activatePlugin( 'google-site-kit' );
await expect( page ).not.toMatchElement( '.googlesitekit-noscript' );
- await deactivateSiteKit();
+ await deactivatePlugin( 'google-site-kit' );
} );
} );
describe( 'When Javascript is disabled', () => {
beforeEach( async () => {
- await deactivateSiteKit();
+ await deactivatePlugin( 'google-site-kit' );
} );
afterEach( async () => {
- await activateSiteKit();
+ await activatePlugin( 'google-site-kit' );
} );
it( 'Should not display plugin html', async () => {
@@ -95,18 +79,18 @@ describe( 'Plugin Activation Notice', () => {
// `await page.setJavaScriptEnabled( false );` and
// `await page.setJavaScriptEnabled( true );` in the test itself.
await page.setJavaScriptEnabled( false );
- await activateSiteKit();
+ await activatePlugin( 'google-site-kit' );
await expect( page ).toMatchElement( '[id^=js-googlesitekit-]', { visible: false } );
await expect( page ).not.toMatchElement( '.googlesitekit-activation__title' );
- await deactivateSiteKit();
+ await deactivatePlugin( 'google-site-kit' );
await page.setJavaScriptEnabled( true );
} );
it( 'Should display noscript notice', async () => {
await page.setJavaScriptEnabled( false );
- await activateSiteKit();
+ await activatePlugin( 'google-site-kit' );
await expect( page ).toMatchElement(
'.googlesitekit-noscript__text',
@@ -114,7 +98,7 @@ describe( 'Plugin Activation Notice', () => {
{ visible: true }
);
- await deactivateSiteKit();
+ await deactivatePlugin( 'google-site-kit' );
await page.setJavaScriptEnabled( true );
} );
} );
| 2 |
diff --git a/publish/deployed/kovan/config.json b/publish/deployed/kovan/config.json "SynthsETH": {
"deploy": false
},
- "TokenStateiXTZ": {
- "deploy": false
- },
- "ProxyiXTZ": {
- "deploy": false
- },
- "SynthiXTZ": {
- "deploy": false
- },
"ProxyERC20sUSD": {
"deploy": false
},
| 2 |
diff --git a/src/inertia.js b/src/inertia.js @@ -143,7 +143,7 @@ export default {
cache(key, props) {
let page = window.history.state
page.props = { ...page.props, [key]: props }
- this.setState(true, window.location.pathname + window.location.search, state)
+ this.setState(true, window.location.pathname + window.location.search, page)
},
showModal(html) {
| 1 |
diff --git a/generators/generator-constants.js b/generators/generator-constants.js @@ -66,7 +66,7 @@ const DOCKER_JHIPSTER_IMPORT_DASHBOARDS = 'jhipster/jhipster-import-dashboards:v
const DOCKER_JHIPSTER_ZIPKIN = 'jhipster/jhipster-zipkin:v4.1.0';
const DOCKER_TRAEFIK = 'traefik:1.7.24'; // waiting for https://github.com/jhipster/generator-jhipster/issues/11198
const DOCKER_CONSUL = 'consul:1.7.2';
-const DOCKER_CONSUL_CONFIG_LOADER = 'jhipster/consul-config-loader:v0.3.0';
+const DOCKER_CONSUL_CONFIG_LOADER = 'jhipster/consul-config-loader:v0.3.1';
const DOCKER_PROMETHEUS = 'prom/prometheus:v2.17.1';
const DOCKER_PROMETHEUS_ALERTMANAGER = 'prom/alertmanager:v0.20.0';
const DOCKER_GRAFANA = 'grafana/grafana:6.7.2';
| 3 |
diff --git a/prettier/main_test.ts b/prettier/main_test.ts @@ -255,6 +255,9 @@ test(async function testPrettierPrintToStdout(): Promise<void> {
emptyDir(tempDir);
});
+// TODO(bartlomieju): reenable after landing rusty_v8 branch
+// crashing on Windows
+/*
test(async function testPrettierReadFromStdin(): Promise<void> {
interface TestCase {
stdin: string;
@@ -377,6 +380,7 @@ test(async function testPrettierReadFromStdin(): Promise<void> {
);
}
});
+*/
test(async function testPrettierWithAutoConfig(): Promise<void> {
const configs = [
| 14 |
diff --git a/src/mixins/linkConfig.js b/src/mixins/linkConfig.js @@ -214,9 +214,8 @@ export default {
const sourceAnchorTool = new linkTools.SourceAnchor({ snap: this.getAnchorPointFunction('source') });
const targetAnchorTool = new linkTools.TargetAnchor({ snap: this.getAnchorPointFunction('target') });
- const segmentsTool = new linkTools.Segments();
const toolsView = new dia.ToolsView({
- tools: [verticesTool, segmentsTool, sourceAnchorTool, targetAnchorTool],
+ tools: [verticesTool, sourceAnchorTool, targetAnchorTool],
});
this.shapeView.addTools(toolsView);
| 2 |
diff --git a/test/EleventyFilesTest.js b/test/EleventyFilesTest.js @@ -383,6 +383,14 @@ test("Get ignores (both .eleventyignore and .gitignore exists, but .gitignore ha
});
/* End .eleventyignore and .gitignore combos */
+test("getTemplateData caching", t => {
+ let evf = new EleventyFiles("test/stubs", "test/stubs/_site", []);
+ evf.init();
+ let templateDataFirstCall = evf.getTemplateData();
+ let templateDataSecondCall = evf.getTemplateData();
+ t.is(templateDataFirstCall, templateDataSecondCall);
+});
+
test("getDataDir", t => {
let evf = new EleventyFiles(".", "_site", []);
evf.init();
| 0 |
diff --git a/src/setData/yearFour.js b/src/setData/yearFour.js @@ -18,7 +18,7 @@ export default ([
{
name: 'Weapons',
season: 12,
- items: [2891672170]
+ itemGroups: [[2891672170], [4060882458]]
},
{
name: 'Hunter Armor',
@@ -53,7 +53,7 @@ export default ([
{
name: 'Weapons',
season: 12,
- items: [2050789284]
+ itemGroups: [[2050789284], [4060882456]]
},
{
name: 'Hunter Armor',
@@ -88,7 +88,7 @@ export default ([
{
name: 'Weapons',
season: 12,
- items: [3565520715]
+ itemGroups: [[3565520715], [4060882457]]
},
{
name: 'Hunter Armor',
@@ -244,7 +244,7 @@ export default ([
{
name: 'Pursuit Weapon',
season: 12,
- itemGroups: [[4184808992], [4060882458, 4060882456, 4060882457]]
+ items: [4184808992]
},
{
name: 'Wrathborn Hunts',
| 5 |
diff --git a/src/entities/EntityDatabase.js b/src/entities/EntityDatabase.js @@ -14,7 +14,7 @@ Book.schema = {
type: 'book',
authors: { type: ['person'], default: [] },
editors: { type: ['person'], default: [] },
- chapterTitle: { type: 'text', optional: true },
+ chapterTitle: { type: 'string', optional: true },
source: { type: 'string', optional: true },
edition: { type: 'string', optional: true },
publisherLoc: { type: 'string', optional: true },
@@ -37,7 +37,7 @@ export class DataPublication extends BibliographicEntry {}
DataPublication.schema = {
type: 'data-publication',
authors: { type: ['person'], default: [] },
- dataTitle: { type: 'text', optional: true },
+ dataTitle: { type: 'string', optional: true },
source: { type: 'string', optional: true },
year: { type: 'string', optional: true },
month: { type: 'string', optional: true },
@@ -53,7 +53,7 @@ export class Periodical extends BibliographicEntry {}
Periodical.schema = {
type: 'periodical',
authors: { type: ['person'], default: [] },
- articleTitle: { type: 'text', optional: true },
+ articleTitle: { type: 'string', optional: true },
source: { type: 'string', optional: true },
year: { type: 'string', optional: true },
month: { type: 'string', optional: true },
@@ -71,7 +71,7 @@ Patent.schema = {
type: 'patent',
inventors: { type: ['person'], default: [] },
assignee: { type: 'string', optional: true },
- articleTitle: { type: 'text', optional: true },
+ articleTitle: { type: 'string', optional: true },
source: { type: 'string', optional: true },
year: { type: 'string', optional: true },
month: { type: 'string', optional: true },
@@ -87,7 +87,7 @@ JournalArticle.schema = {
type: 'journal-article',
authors: { type: ['person'], default: [] },
editors: { type: ['person'], default: [] },
- articleTitle: { type: 'text', optional: true },
+ articleTitle: { type: 'string', optional: true },
source: { type: 'string', optional: true },
volume: { type: 'string', optional: true },
issue: { type: 'string', optional: true },
@@ -107,7 +107,7 @@ export class ConferenceProceeding extends BibliographicEntry {}
ConferenceProceeding.schema = {
type: 'conference-proceeding',
authors: { type: ['person'], default: [] },
- articleTitle: { type: 'text', optional: true },
+ articleTitle: { type: 'string', optional: true },
confName: { type: 'string', optional: true },
source: { type: 'string', optional: true },
year: { type: 'string', optional: true },
@@ -125,7 +125,7 @@ export class ClinicalTrial extends BibliographicEntry {}
ClinicalTrial.schema = {
type: 'clinical-trial',
sponsors: { type: ['person'], default: [] },
- articleTitle: { type: 'text', optional: true },
+ articleTitle: { type: 'string', optional: true },
source: { type: 'string', optional: true },
year: { type: 'string', optional: true },
month: { type: 'string', optional: true },
@@ -138,7 +138,7 @@ export class Preprint extends BibliographicEntry {}
Preprint.schema = {
type: 'preprint',
authors: { type: ['person'], default: [] },
- articleTitle: { type: 'text', optional: true },
+ articleTitle: { type: 'string', optional: true },
source: { type: 'string', optional: true },
year: { type: 'string', optional: true },
month: { type: 'string', optional: true },
@@ -184,7 +184,7 @@ export class Thesis extends BibliographicEntry {}
Thesis.schema = {
type: 'thesis',
authors: { type: ['person'], default: [] },
- articleTitle: { type: 'text', optional: true },
+ articleTitle: { type: 'string', optional: true },
year: { type: 'string', optional: true },
month: { type: 'string', optional: true },
day: { type: 'string', optional: true },
@@ -198,7 +198,7 @@ export class Webpage extends BibliographicEntry {}
Webpage.schema = {
type: 'webpage',
authors: { type: ['person'], default: [] },
- title: { type: 'text', optional: true },
+ title: { type: 'string', optional: true },
year: { type: 'string', optional: true },
month: { type: 'string', optional: true },
day: { type: 'string', optional: true },
| 4 |
diff --git a/packages/app/src/components/Page/RevisionRenderer.jsx b/packages/app/src/components/Page/RevisionRenderer.jsx @@ -60,9 +60,9 @@ class LegacyRevisionRenderer extends React.PureComponent {
* @param {string} keywords
*/
getHighlightedBody(body, keywords) {
- const returnBody = body;
-
const normalizedKeywordsArray = [];
+ // !!TODO!!: care double quote
+ // !!TODO!!: add test code
keywords.replace(/"/g, '').split(/[\u{20}\u{3000}]/u).forEach((keyword, i) => { // split by both full-with and half-width space
if (keyword === '') {
return;
@@ -74,17 +74,37 @@ class LegacyRevisionRenderer extends React.PureComponent {
});
const normalizedKeywords = `(${normalizedKeywordsArray.join('|')})`;
- const keywordExp = new RegExp(`${normalizedKeywords}(?!(.*?"))`, 'ig');
+ const keywordRegxp = new RegExp(`${normalizedKeywords}(?!(.*?"))`, 'ig'); // prior https://regex101.com/r/oX7dq5/1
+ const keywordRegexp2 = new RegExp(`(?<!<)${normalizedKeywords}(?!(.*?("|>)))`, 'ig'); // inferior (this doesn't work well when html tags exist a lot) https://regex101.com/r/Dfi61F/1
+
+ const highlighter = (str) => { return str.replace(keywordRegxp, '<em class="highlighted-keyword">$&</em>') }; // prior
+ const highlighter2 = (str) => { return str.replace(keywordRegexp2, '<em class="highlighted-keyword">$&</em>') }; // inferior
+
+ const insideTagRegex = /<[^<>]*>/g;
+ const betweenTagRegex = />([^<>]*)</g; // use (group) to ignore >< around
- // body to dom
- const parser = new DOMParser();
- const doc = parser.parseFromString(body, 'text/html');
+ const insideTagStrs = body.match(insideTagRegex);
+ const betweenTagMatches = Array.from(body.matchAll(betweenTagRegex));
- // replace innerText
+ let returnBody = body;
+ const isSafeHtml = insideTagStrs.length === betweenTagMatches.length + 1; // to check whether is safe to join
+ if (isSafeHtml) {
+ // highlight
+ const betweenTagStrs = betweenTagMatches.map(match => highlighter(match[1])); // get only grouped part (exclude >< around)
- // dom to body
+ const arr = [];
+ insideTagStrs.forEach((str, i) => {
+ arr.push(str);
+ arr.push(betweenTagStrs[i]);
+ });
+ returnBody = arr.join('');
+ }
+ else {
+ // inferior highlighter
+ returnBody = highlighter2(body);
+ }
- return returnBody.replace(keywordExp, '<em class="highlighted-keyword">$&</em>');
+ return returnBody;
}
async renderHtml() {
| 7 |
diff --git a/src/article/shared/entityRenderers.js b/src/article/shared/entityRenderers.js @@ -744,11 +744,17 @@ function refContribRenderer ($$, entityId, entityDb, options = {}) {
}
function organisationRenderer ($$, entityId, entityDb, options = {}) {
- let { institution, country } = entityDb.get(entityId)
- let result = [ institution ]
- if (!options.short) {
- if (country) {
- result.push(', ', country)
+ let { institution, division1, division2, division3 } = entityDb.get(entityId)
+ let result = institution ? [ institution ] : '???'
+ if (!options.short && institution) {
+ if (division1) {
+ result.push(', ', division1)
+ }
+ if (division2) {
+ result.push(', ', division2)
+ }
+ if (division3) {
+ result.push(', ', division3)
}
}
return result
| 7 |
diff --git a/examples/react-native-expo/App.js b/examples/react-native-expo/App.js @@ -142,6 +142,21 @@ function SelectAndUploadFileWithUppy (props) {
accessibilityLabel="Open uploaded file"
/>
}
+
+ <Button
+ onPress={(ev) => {
+ this.uppy.pauseAll()
+ }}
+ title="Pause All"
+ accessibilityLabel="Pause All"
+ />
+ <Button
+ onPress={(ev) => {
+ this.uppy.resumeAll()
+ }}
+ title="Resume All"
+ accessibilityLabel="Resume All"
+ />
</TouchableOpacity>
<Text>Status: {props.state.status}</Text>
<Text>{props.state.progress} of {props.state.total}</Text>
| 0 |
diff --git a/lib/services/elasticsearch.js b/lib/services/elasticsearch.js @@ -219,7 +219,7 @@ class ElasticSearch extends Service {
return Promise.reject(new NotFoundError(`Document ${result._id} was already deleted`));
}
if (result._source._kuzzle_info) {
- result._kuzzle_info = result._source._kuzzle_info;
+ result._meta = result._source._kuzzle_info;
delete result._source._kuzzle_info;
}
}
@@ -1130,7 +1130,7 @@ function addActiveFilter(esRequest) {
/**
* Remove depth in object (replace hits.hits<array>, with hits<array>)
- * Move _kuzzle_info from the document body to the root
+ * Move _kuzzle_info from the document body to the root as _meta
*
* @param result
* @returns {object}
@@ -1142,8 +1142,8 @@ function flattenSearchResults(result) {
result.hits = result.hits.map(obj => {
if (obj._source && obj._source._kuzzle_info) {
- // Move _kuzzle_info from the document body to the root
- obj._kuzzle_info = obj._source._kuzzle_info;
+ // Move _kuzzle_info from the document body to the root as _meta
+ obj._meta = obj._source._kuzzle_info;
delete obj._source._kuzzle_info;
}
| 10 |
diff --git a/lib/node_modules/@stdlib/_tools/scripts/publish_packages.js b/lib/node_modules/@stdlib/_tools/scripts/publish_packages.js @@ -55,7 +55,7 @@ var ENV = require( '@stdlib/process/env' );
var debug = logger( 'scripts:publish-packages' );
var START_PKG_INDEX = 0;
-var END_PKG_INDEX = 1500;
+var END_PKG_INDEX = 5000;
var MAX_TREE_DEPTH = 99;
var topics = setTopics.factory( {
@@ -439,6 +439,19 @@ function publish( pkg, clbk ) {
debug( 'Executing command: '+command );
shell( command );
+ command = [
+ 'find '+dist+' -type f -name \'include.gypi\' -print0 ', // Find all `include.gypi` files in the destination directory and print their full names to standard output...
+ '| xargs -0 ', // Convert standard input to the arguments for following `sed` command...
+ 'sed -Ei ', // Edit files in-place without creating a backup...
+ '"s/',
+ '@stdlib\\/utils\\/library-manifest',
+ '/',
+ '@stdlib\\/utils-library-manifest', // Replace with standalone `library-manifest` package
+ '/"'
+ ].join( '' );
+ debug( 'Executing command: '+command );
+ shell( command );
+
command = [
'find '+dist+' -type f -name \'manifest.json\' -print0 ', // Find all `manifest.json` files in the destination directory and print their full names to standard output...
'| xargs -r -0 ', // Convert standard input to the arguments for following `sed` command if `find` returns output...
| 14 |
diff --git a/UserHistoryImprovements.user.js b/UserHistoryImprovements.user.js // @description Fixes broken links in user annotations, and minor layout improvements
// @homepage https://github.com/samliew/SO-mod-userscripts
// @author @samliew
-// @version 1.2.6
+// @version 1.2.7
//
// @include https://*stackoverflow.com/users/history/*
// @include https://*serverfault.com/users/history/*
// Fix broken links
const str = td.html()
+ .replace(/" title="([^"]+)/g, '') // remove title attribute
.replace(/" rel="nofollow noreferrer/g, '') // remove auto-inserted rel attribute from external links
.replace(/(<a href="|">[^<]+<\/a>)/g, '') // strip existing links (text)
.replace(/(<a href="|">[^&]+<\/a>)/g, '') // strip existing links (html-encoded)
| 2 |
diff --git a/package.json b/package.json "homepage": "https://gooddollar.org",
"dependencies": {
"@babel/preset-flow": "^7.0.0",
- "@gooddollar/goodcontracts": "^0.0.13",
+ "@gooddollar/goodcontracts": "0.0.14",
"@gooddollar/gun-appendonly": "^1.0.1",
"@react-navigation/core": "^3.1.1",
"@react-navigation/web": "^1.0.0-alpha.7",
| 0 |
diff --git a/src/electron.js b/src/electron.js @@ -1942,7 +1942,9 @@ function showIntro() {
transparent: true,
icon: './src/assets/logo.ico',
webPreferences: {
- preload: path.join(__dirname, 'intro-preload.js')
+ preload: path.join(__dirname, 'intro-preload.js'),
+ devTools: settings.isDev,
+ enableRemoteModule: true
}
});
| 1 |
diff --git a/src/generators/output/toDisk.js b/src/generators/output/toDisk.js @@ -37,6 +37,8 @@ module.exports = async (env, spinner) => {
const config = deepmerge(globalConfig, frontMatter.attributes)
config.isMerged = true
+ const events = config.events || []
+
html = await render(html, {
tailwind: {
compiled: css
@@ -44,7 +46,8 @@ module.exports = async (env, spinner) => {
maizzle: {
config: config
},
- env: env
+ env: env,
+ ...events
})
const ext = config.build.destination.extension || 'html'
| 0 |
diff --git a/client/src/components/Input/LocationSearch.js b/client/src/components/Input/LocationSearch.js @@ -2,6 +2,8 @@ import React, { useContext } from "react";
import styled from "styled-components";
import { SearchBar, WhiteSpace } from "antd-mobile";
import { FeedContext } from "pages/Feed.js";
+import { Input } from 'antd';
+
// ICONS
import SvgIcon from "components/Icon/SvgIcon"
@@ -15,12 +17,10 @@ const {
lightGray,
} = colors;
-const StyledSearchBar = styled(SearchBar)`
- &.am-search {
+const StyledSearchBar = styled(Input)`
background-color: ${white};
border: 0.1rem solid ${lightGray};
border-radius: 4rem;
- }
`;
@@ -35,9 +35,11 @@ const LocationSearch = () => {
placeholder="Zip code, city, state..."
maxLength={100}
value={location}
- prefix={<SvgIcon icon={(searchBlue)} />}
+ size="large"
+ prefix={<SvgIcon src={(searchBlue)} />}
onChange={handleLocation}
/>
+
<WhiteSpace size="lg" />
<WhiteSpace />
<div className="svgicon-share-mylocation-size">
| 14 |
diff --git a/src/client/js/components/PageAccessoriesModal.jsx b/src/client/js/components/PageAccessoriesModal.jsx @@ -34,7 +34,7 @@ const PageAccessoriesModal = (props) => {
}
const menu = document.getElementsByClassName('nav');
- const navId = document.getElementById('nav-width');
+ const navTitle = document.getElementById('nav-title');
// Values are set.
// Might make this dynamic for px, %, pt, em
@@ -60,7 +60,7 @@ const PageAccessoriesModal = (props) => {
// Loop through nav children i.e li
[].forEach.call(navTabs, (el, index) => {
// Dynamic width/margin calculation for hr
- const width = getPercentage(el.offsetWidth, navId.offsetWidth);
+ const width = getPercentage(el.offsetWidth, navTitle.offsetWidth);
let tempMarginLeft = 0;
// We don't want to modify first elements positioning
if (index !== 0) {
@@ -94,7 +94,7 @@ const PageAccessoriesModal = (props) => {
<React.Fragment>
<Modal size="xl" isOpen={props.isOpen} toggle={closeModalHandler} className="grw-page-accessories-modal">
<ModalBody>
- <Nav className="nav-title" id="nav-width">
+ <Nav className="nav-title" id="nav-title">
<NavItem type="button" className={`nav-link ${activeTab === 'pagelist' && 'active'}`}>
<NavLink
onClick={() => {
| 10 |
diff --git a/scripts/avalanchego-installer.sh b/scripts/avalanchego-installer.sh @@ -73,17 +73,25 @@ fi
mkdir -p /tmp/avalanchego-install #make a directory to work in
rm -rf /tmp/avalanchego-install/* #clean up in case previous install didn't
cd /tmp/avalanchego-install
-echo "Looking for the latest $getArch build..."
+
+read -p "Press enter to install the latest AvalancheGo version, or specify the version to install (e.g. v1.2.3): " version
+version=${version:-latest}
+echo "Looking for $getArch version $version..."
+if [ "$version" = "latest" ]; then
fileName="$(curl -s https://api.github.com/repos/ava-labs/avalanchego/releases/latest | grep "avalanchego-linux-$getArch.*tar\(.gz\)*\"" | cut -d : -f 2,3 | tr -d \" | cut -d , -f 2)"
+else
+ fileName="https://github.com/ava-labs/avalanchego/releases/download/$version/avalanchego-linux-$getArch-$version.tar.gz"
+fi
+
if [ "$fileName" = "" ]; then
- echo "Unable to fetch the filename. Exiting."
+ echo "Unable to find AvalancheGo version $version. Exiting."
if [ "$foundAvalancheGo" = "true" ]; then
echo "Restarting service..."
sudo systemctl start avalanchego
fi
exit
fi
-echo "Will attempt to download: $fileName"
+echo "Attempting to download: $fileName"
wget -nv --show-progress $fileName
echo "Unpacking node files..."
mkdir -p $HOME/avalanche-node
@@ -99,10 +107,10 @@ if [ "$foundAvalancheGo" = "true" ]; then
echo "Done!"
exit
fi
-echo "To complete the setup some networking information is needed."
-echo "Where is the node installed:"
-echo "1) residential network (dynamic IP)"
-echo "2) cloud provider (static IP)"
+echo "To complete the setup, some networking information is needed."
+echo "Where is your node running?"
+echo "1) Residential network (dynamic IP)"
+echo "2) Cloud provider (static IP)"
ipChoice="x"
while [ "$ipChoice" != "1" ] && [ "$ipChoice" != "2" ]
do
| 11 |
diff --git a/token-metadata/0x89eE58Af4871b474c30001982c3D7439C933c838/metadata.json b/token-metadata/0x89eE58Af4871b474c30001982c3D7439C933c838/metadata.json "symbol": "YFBETA",
"address": "0x89eE58Af4871b474c30001982c3D7439C933c838",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/priv/public/ui/app/app.js b/priv/public/ui/app/app.js 'mnHttp',
'mnExceptionReporter',
'ui.bootstrap',
- 'mnEnv'
+ 'mnEnv',
+ 'mnFilters'
]).run(appRun);
- function appRun($state, $urlRouter, $exceptionHandler, mnPools, $window, $rootScope, $location) {
+ function appRun($state, $urlRouter, $exceptionHandler, mnPools, $window, $rootScope, $location, $http, mnPrettyVersionFilter) {
$rootScope.$on("$locationChangeStart", function (event, newUrl) {
//angular do not replace url when it tries
originalOnerror && originalOnerror.apply($window, Array.prototype.slice.call(arguments));
}
+ $http({method: "GET", url: "/versions"}).then(function (resp) {
+ var pools = resp.data;
+ var version = mnPrettyVersionFilter(pools.implementationVersion);
+ $rootScope.mnTitle = "Couchbase Console" + (version ? ' ' + version : '');
+ });
+
mnPools.get().then(function (pools) {
if (!pools.isInitialized) {
return $state.go('app.wizard.welcome');
| 12 |
diff --git a/README.md b/README.md @@ -203,11 +203,24 @@ WebMidi.enable(function (err) {
**Important**: depending on the browser, version and platform, it may also be necessary to serve the
page over https if you want to enable sysex support.
+## API Documentation
+
+The [API for WebMidi.js](http://djipco.github.io/webmidi/latest/classes/WebMidi.html) is fully
+documented and I take pride in maintaining good API documentation. If you spot an error (even
+something minor) or think a topic should be made clearer, do not hesitate to
+[file an issue](https://github.com/djipco/webmidi/issues) or, better yet, send a PR.
+
+Here is a link to the full
+**[API Reference](http://djipco.github.io/webmidi/latest/classes/WebMidi.html)**. You can also find
+the API reference in portable format inside the `docs` folder.
+
+By the way, legacy
+[documentation for version 1.0.0-beta.15](http://djipco.github.io/webmidi/v1.0.0-beta.15/classes/WebMidi.html)
+will also remain available online as long as necessary.
+
## More code examples
-Here are various other examples to give you an idea of what is possible with **WebMidi.js**. For all
-details, please consult the full
-**[API documentation](http://djipco.github.io/webmidi/latest/classes/WebMidi.html)**.
+Here are various other examples to give you an idea of what is possible with **WebMidi.js**.
```javascript
// Enable WebMidi.js
@@ -325,15 +338,6 @@ WebMidi.enable(function (err) {
});
```
-## Full API Documentation
-
-The full **API documentation** is available for download in the `docs` folder. You can also
-**[view it online](http://djipco.github.io/webmidi/latest/classes/WebMidi.html)**.
-
-Legacy
-[documentation for version 1.0.0-beta.15](http://djipco.github.io/webmidi/v1.0.0-beta.15/classes/WebMidi.html)
-will also remain available online as long as necessary.
-
## Migration Notes
If you are upgrading from version 1.x to 2.x, you should know that v2.x is not backwards compatible.
| 7 |
diff --git a/tests/reporters/terse.js b/tests/reporters/terse.js const Mocha = require('mocha')
-const { EVENT_TEST_FAIL, EVENT_TEST_END } = Mocha.Runner.constants
+const { EVENT_TEST_FAIL, EVENT_RUN_END } = Mocha.Runner.constants
const path = require('path')
const projectRoot = path.normalize(path.join(__dirname, '..'))
@@ -32,7 +32,7 @@ class TerseReporter {
failuresPerFile[this.currentTest.file].push(this.currentTest)
})
- runner.on(EVENT_TEST_END, () => {
+ runner.on(EVENT_RUN_END, () => {
if (Object.keys(failuresPerFile).length === 0) return
const fs = require('fs')
| 4 |
diff --git a/test/jasmine/tests/mock_test.js b/test/jasmine/tests/mock_test.js @@ -5,8 +5,6 @@ var list = [
'1',
'4',
'5',
- '6',
- '8',
'10',
'11',
'12',
@@ -1095,8 +1093,6 @@ figs['0'] = require('@mocks/0');
// figs['1'] = require('@mocks/1');
figs['4'] = require('@mocks/4');
figs['5'] = require('@mocks/5');
-// figs['6'] = require('@mocks/6');
-// figs['8'] = require('@mocks/8');
figs['10'] = require('@mocks/10');
// figs['11'] = require('@mocks/11');
// figs['12'] = require('@mocks/12');
| 2 |
diff --git a/src/lib/wallet/utils.js b/src/lib/wallet/utils.js @@ -35,7 +35,6 @@ const getComposedSettings = (settings?: {} = {}): {} => {
}
export const toMask = (gd?: number, settings?: {}): string => {
- console.info({ gd })
const precision = gd && gd % 1 != 0 ? maskSettings.precision : 0
return gd ? MaskService.toMask('money', gd, { ...getComposedSettings(settings), precision }) : null
}
| 2 |
diff --git a/src/web/containers/Header/Header.jsx b/src/web/containers/Header/Header.jsx @@ -184,9 +184,17 @@ class Header extends Component {
this.state = this.getInitialState();
}
getInitialState() {
+ let pushPermission = '';
+ try {
+ // Push.Permission.get() will throw an error if Push is not supported on this device
+ pushPermission = Push.Permission.get();
+ } catch (e) {
+ // Ignore
+ }
+
return {
workflowState: controller.workflowState,
- pushPermission: Push.Permission.get(),
+ pushPermission: pushPermission,
commands: [],
runningTasks: [],
currentVersion: settings.version,
| 1 |
diff --git a/src/core/createEvent.js b/src/core/createEvent.js @@ -54,7 +54,9 @@ export default () => {
documentMayUnload = true;
},
finalize(onBeforeEventSend) {
- if (isFinalized) return;
+ if (isFinalized) {
+ return;
+ }
if (userXdm) {
event.mergeXdm(userXdm);
| 2 |
diff --git a/core/server/adapters/scheduling/post-scheduling/scheduler-intergation.js b/core/server/adapters/scheduling/post-scheduling/scheduler-intergation.js const models = require('../../../models');
-const i18n = require('../../../../shared/i18n');
+const tpl = require('@tryghost/tpl');
const errors = require('@tryghost/errors');
+const messages = {
+ resourceNotFound: '{resource} not found.'
+};
+
/**
* @description Load the internal scheduler integration
*
@@ -12,9 +16,7 @@ const getSchedulerIntegration = function () {
.then((integration) => {
if (!integration) {
throw new errors.NotFoundError({
- message: i18n.t('errors.api.resource.resourceNotFound', {
- resource: 'Integration'
- })
+ message: tpl(messages.resourceNotFound, {resource: 'Integration'})
});
}
return integration.toJSON();
| 14 |
diff --git a/src/tests/controllers/tribe.test.ts b/src/tests/controllers/tribe.test.ts @@ -42,7 +42,7 @@ async function tribeTest(
text,
tribe
)
- t.true(tribeMessage, 'node1 should send message to tribe')
+ t.true(!!tribeMessage, 'node1 should send message to tribe')
//NODE2 SENDS A TEXT MESSAGE IN TRIBE
const text2 = randomText()
@@ -53,7 +53,7 @@ async function tribeTest(
text2,
tribe
)
- t.true(tribeMessage2, 'node1 should send message to tribe')
+ t.true(!!tribeMessage2, 'node1 should send message to tribe')
//NODE2 LEAVES THE TRIBE
let left = await leaveTribe(t, node2, tribe)
| 0 |
diff --git a/test/Air/AirService.test.js b/test/Air/AirService.test.js @@ -5,6 +5,7 @@ import fs from 'fs';
import path from 'path';
import { expect } from 'chai';
import proxyquire from 'proxyquire';
+import { AirRuntimeError } from '../../src/Services/Air/AirErrors';
const responsesDir = path.join(__dirname, '..', 'FakeResponses', 'Air');
const auth = {
@@ -16,6 +17,23 @@ const auth = {
describe('#AirService', () => {
describe('getTickets', () => {
+ it('should throw an error when some function fails', (done) => {
+ const AirService = () => ({
+ importPNR: () => Promise.reject(new Error('Some error')),
+ getTicket: () => Promise.reject(new Error('Some error')),
+ });
+ const createAirService = proxyquire('../../src/Services/Air/Air', {
+ './AirService': AirService,
+ });
+ const service = createAirService({ auth });
+ service.getTickets({ pnr: 'PNR001' })
+ .then(() => done(new Error('Error has not occured')))
+ .catch((err) => {
+ expect(err).to.be.an.instanceof(AirRuntimeError.UnableToRetrieveTickets);
+ expect(err.causedBy).to.be.an.instanceof(Error);
+ done();
+ });
+ });
it('should work with right responses', (done) => {
const importPNRVoidResponse = JSON.parse(
fs.readFileSync(path.join(responsesDir, 'importPNR_VOID.json')).toString()
| 0 |
diff --git a/src/events/http/http-routes/invoke/InvokeController.js b/src/events/http/http-routes/invoke/InvokeController.js @@ -68,6 +68,11 @@ export default class InvokeController {
return result
}
+ // TODO FIXME
+ console.log(
+ `invocationType: '${invocationType}' not supported by serverless-offline`,
+ )
+
return undefined
}
}
| 0 |
diff --git a/docker/development/deploy-unlock.js b/docker/development/deploy-unlock.js @@ -48,17 +48,16 @@ const serverIsUp = (delay, maxAttempts) =>
serverIsUp(1000 /* every second */, 120 /* up to 2 minutes */)
.then(() => {
- return deploy(host, port, 'v11', newContractInstance => {
- console.log(`UNLOCK DEPLOYED AT ${newContractInstance.address}`)
+ return deploy(host, port, 'v11', unlockContract => {
+ console.log(`UNLOCK DEPLOYED AT ${unlockContract.address}`)
- // Once unlock has been deployed, we need to deploy a lock too!
const wallet = new WalletService({
- unlockAddress: newContractInstance.options.address,
+ unlockAddress: unlockContract.address,
})
const web3Service = new Web3Service({
readOnlyProvider: providerURL,
- unlockAddress: newContractInstance.options.address,
+ unlockAddress: unlockContract.address,
requiredConfirmations: 1,
blockTime: 3000, // this is in milliseconds
})
@@ -74,9 +73,13 @@ serverIsUp(1000 /* every second */, 120 /* up to 2 minutes */)
userAddress
)
+ // Change the base URL for token metadata
+ const baseUri = 'http://0.0.0.0:8080/api/key/'
+ unlockContract.setGlobalBaseTokenURI(baseUri)
+
+ // TODO REMOVE AS THIS IS NOT USED ANYMORE
let lockAddress = '0x0AAF2059Cb2cE8Eeb1a0C60f4e0f2789214350a5'
let tokenAddress = '0x591AD9066603f5499d12fF4bC207e2f577448c46'
-
await ExternalRefundDeployer.deployExternalRefund(
lockAddress,
'21500000000000000000',
| 12 |
diff --git a/src/data/polyfills.js b/src/data/polyfills.js @@ -53,13 +53,7 @@ module.exports = async () => {
}
// non-icu case-sensitive alphabetical sort
- polyfills.sort((a, b) =>
- a.name > b.name
- ? 1
- : a.name < b.name
- ? -1
- : 0
- );
+ polyfills.sort((a, b) => (a.name > b.name ? 1 : a.name < b.name ? -1 : 0));
}
return {
| 11 |
diff --git a/datalad_service/handlers/description.py b/datalad_service/handlers/description.py @@ -20,6 +20,11 @@ class DescriptionResource(object):
if dataset:
try:
description_fields = req.media.get('description_fields')
+ if not any(description_fields):
+ resp.media = {
+ 'error': 'Missing description field updates.'
+ }
+ resp.status = falcon.HTTP_UNPROCESSABLE_ENTITY
dataset_description = update_description(self.store.annex_path, dataset, None, description_fields)
resp.media = dataset_description
resp.status = falcon.HTTP_OK
| 9 |
diff --git a/app/models/audit/AuditTaskCommentTable.scala b/app/models/audit/AuditTaskCommentTable.scala @@ -53,7 +53,7 @@ object AuditTaskCommentTable {
def all(username: String): Option[List[AuditTaskComment]] = db.withTransaction { implicit session =>
val comments = (for {
(c, u) <- auditTaskComments.innerJoin(users).on(_.userId === _.userId).sortBy(_._1.timestamp.desc) if u.username === username
- } yield (c.auditTaskCommentId, c.edgeId, u.username, c.ipAddress, c.gsvPanoramaId,
+ } yield (c.auditTaskCommentId, c.auditTaskId, c.missionId, c.edgeId, u.username, c.ipAddress, c.gsvPanoramaId,
c.heading, c.pitch, c.zoom, c.lat, c.lng, c.timestamp, c.comment)).list.map { c => AuditTaskComment.tupled(c) }
Some(comments)
@@ -80,7 +80,7 @@ object AuditTaskCommentTable {
def takeRight(n: Integer): List[AuditTaskComment] = db.withTransaction { implicit session =>
val comments = (for {
(c, u) <- auditTaskComments.innerJoin(users).on(_.userId === _.userId).sortBy(_._1.timestamp.desc)
- } yield (c.auditTaskCommentId, c.edgeId, u.username, c.ipAddress, c.gsvPanoramaId,
+ } yield (c.auditTaskCommentId, c.auditTaskId, c.missionId, c.edgeId, u.username, c.ipAddress, c.gsvPanoramaId,
c.heading, c.pitch, c.zoom, c.lat, c.lng, c.timestamp, c.comment)).list.map { c => AuditTaskComment.tupled(c) }
comments.take(n)
| 1 |
diff --git a/server/index.js b/server/index.js @@ -5,6 +5,7 @@ const express = require('express');
const api = require('./api');
const spm = require('./middleware/single-page-middleware');
const webpackMiddleware = require('./middleware/webpack-middleware');
+const env = require('../common/project').env;
const SLACK_TOKEN = process.env.SLACK_TOKEN;
const slackMessage = SLACK_TOKEN && require('./slack-client');
@@ -47,12 +48,17 @@ app.get('/', (req, res) => {
});
app.post('/api/webhook', (req, res) => {
- let body = {};
try {
- body = JSON.stringify(req.body);
- res.json(req.body);
+ const body = req.body;
+ let message = '';
+ res.json(body);
+ if (req.new_state.identity_identifier) {
+ message = `${env} change: Identifier ${req.new_state.identity_identifier}(${req.new_state.identity}) changed ${req.new_state.feature.name} to ${req.new_state.feature.type === 'FLAG' ? req.new_state.enabled : req.new_state.value}`;
+ } else {
+ message = `${env} change: changed ${req.new_state.feature.name} to ${req.new_state.feature.type === 'FLAG' ? req.new_state.enabled : req.new_state.value}`;
+ }
if (slackMessage) {
- slackMessage(body, E2E_SLACK_CHANNEL_NAME);
+ slackMessage(message, E2E_SLACK_CHANNEL_NAME);
}
} catch (e) {
res.json({ error: e.message || e });
| 7 |
diff --git a/CommentFlagsHelper.user.js b/CommentFlagsHelper.user.js // @description Always expand comments (with deleted) and highlight expanded flagged comments, Highlight common chatty and rude keywords
// @homepage https://github.com/samliew/SO-mod-userscripts
// @author @samliew
-// @version 3.0
+// @version 3.0.1
//
// @include https://*stackoverflow.com/admin/dashboard?flag*=comment*
// @include https://*serverfault.com/admin/dashboard?flag*=comment*
// Add links to user and comment history
modMessageContent
.append(`<div class="ra-userlinks">[ ` +
- `<a href="https://stackoverflow.com/users/${uid}" target="_blank">Profile</a> | ` +
- `<a href="https://stackoverflow.com/users/account-info/${uid}" target="_blank">Dashboard</a> | ` +
- `<a href="https://stackoverflow.com/users/history/${uid}?type=User+suspended" target="_blank">Susp. History</a> | ` +
- `<a href="https://stackoverflow.com/users/message/create/${uid}" target="_blank">Message/Suspend</a> | ` +
- `<a href="http://stackoverflow.com/admin/users/${uid}/post-comments?state=flagged" target="_blank">Comments</a>` +
+ `<a href="https://${location.hostname}/users/${uid}" target="_blank">Profile</a> | ` +
+ `<a href="https://${location.hostname}/users/account-info/${uid}" target="_blank">Dashboard</a> | ` +
+ `<a href="https://${location.hostname}/users/history/${uid}?type=User+suspended" target="_blank">Susp. History</a> | ` +
+ `<a href="https://${location.hostname}/users/message/create/${uid}" target="_blank">Message/Suspend</a> | ` +
+ `<a href="http://${location.hostname}/admin/users/${uid}/post-comments?state=flagged" target="_blank">Comments</a>` +
` ]</div>`);
// Move action button
// Delete comment after a short delay
setTimeout(function() {
- $.post(`https://stackoverflow.com/posts/comments/${cid}/vote/10`, {
+ $.post(`https://${location.hostname}/posts/comments/${cid}/vote/10`, {
fkey: fkey
});
}, 1000);
// Delete comments
$.post({
- url: `https://stackoverflow.com/admin/posts/${pid}/delete-comments`,
+ url: `https://${location.hostname}/admin/posts/${pid}/delete-comments`,
data: {
'fkey': fkey,
'mod-actions': 'delete-comments'
| 2 |
diff --git a/magda-web-client/src/UI/Banner.js b/magda-web-client/src/UI/Banner.js @@ -14,7 +14,9 @@ class Banner extends React.Component {
goBack = event => {
event.preventDefault();
- document.cookie = "noPreview=true; path=/";
+ if (window.location.hostname === "search.data.gov.au") {
+ document.cookie = "noPreview=true; path=/; domain=.data.gov.au";
+ }
window.location = "https://data.gov.au";
};
| 12 |
diff --git a/components/Pledge/Form.js b/components/Pledge/Form.js @@ -4,6 +4,7 @@ import { graphql, compose } from 'react-apollo'
import gql from 'graphql-tag'
import isEmail from 'validator/lib/isEmail'
+import { Link } from '../../lib/routes'
import withT from '../../lib/withT'
import withMe from '../../lib/apollo/withMe'
import { CDN_FRONTEND_BASE_URL, ASSETS_SERVER_BASE_URL, PUBLIC_BASE_URL } from '../../lib/constants'
@@ -160,16 +161,17 @@ class Pledge extends Component {
} = this.state
const {
- loading, error, isMember, t, statement, query
+ loading, error, isMember, t, me, statement, query, packages
} = this.props
- const statementTitle = statement && t(`pledge/form/statement/${query.package}/title`, statement)
+ const queryPackage = query.package && query.package.toUpperCase()
+ const statementTitle = statement && t(`pledge/form/statement/${queryPackage}/title`, statement)
const meta = statementTitle
? {
title: t('pledge/form/statement/share/title', statement),
description: t('pledge/form/statement/share/description'),
- image: `${ASSETS_SERVER_BASE_URL}/render?width=1200&height=628&updatedAt=${encodeURIComponent(statement.updatedAt)}&url=${encodeURIComponent(`${PUBLIC_BASE_URL}/community?share=${statement.id}&pkg=${query.package}`)}`
+ image: `${ASSETS_SERVER_BASE_URL}/render?width=1200&height=628&updatedAt=${encodeURIComponent(statement.updatedAt)}&url=${encodeURIComponent(`${PUBLIC_BASE_URL}/community?share=${statement.id}&pkg=${queryPackage}`)}`
}
: {
title: t('pledge/meta/title'),
@@ -182,11 +184,9 @@ class Pledge extends Component {
<Meta data={meta} />
<Loader loading={loading} error={error} render={() => {
const {
- me,
receiveError,
crowdfundingName,
- hasEnded,
- packages
+ hasEnded
} = this.props
if (hasEnded && !this.props.pledge) {
@@ -202,29 +202,36 @@ class Pledge extends Component {
const showSignIn = this.state.showSignIn && !me
- const pkg = query.package
+ const pkg = queryPackage
? packages.find(
- pkg => pkg.name === query.package.toUpperCase()
+ pkg => pkg.name === queryPackage
)
: null
const userPrice = !!query.userPrice
return (
<div>
- {statementTitle && <div style={{ marginBottom: 20 }}>
+ {statementTitle && <div style={{ marginBottom: 40 }}>
<P>
<Interaction.Emphasis>
{statementTitle}
</Interaction.Emphasis><br />
- {/* ToDo: handle all cases: sign in, member, no pkg */}
- {t(`pledge/form/statement/${query.package}/lead/member`)}
+ {t.elements(`pledge/form/statement/${queryPackage}/lead/${me
+ ? pkg ? 'available' : 'notAvailable'
+ : 'signIn'}`, {
+ accountLink: <Link key='account' route='account' passHref>
+ <A>
+ {t(`pledge/form/statement/${queryPackage}/lead/accountText`)}
+ </A>
+ </Link>
+ })}
</P>
+ {!me && <div style={{ marginTop: 20 }}><SignIn /></div>}
</div>}
-
<H1>
{t.first([
- query.package && isMember && `pledge/title/${query.package}/member`,
- query.package && `pledge/title/${query.package}`,
+ pkg && isMember && `pledge/title/${pkg.name}/member`,
+ pkg && `pledge/title/${pkg.name}`,
isMember && 'pledge/title/member',
'pledge/title'
].filter(Boolean))}
@@ -287,7 +294,7 @@ class Pledge extends Component {
{!!showSignIn && (
<span>
<br /><br />
- <SignIn />
+ <SignIn context='pledge' />
</span>
)}
<br />
@@ -449,8 +456,8 @@ query pledgeForm($crowdfundingName: String!) {
`
const shareRefQuery = gql`
-query statements($ref: String!) {
- statements(focus: $ref, first: 1) {
+query statements($id: String!) {
+ statements(focus: $id, first: 1) {
nodes {
id
name
@@ -463,10 +470,10 @@ const PledgeWithQueries = compose(
graphql(shareRefQuery, {
options: ({ query }) => ({
variables: {
- ref: query.ref
+ id: query.utm_content
}
}),
- skip: props => !props.query.ref,
+ skip: props => !props.query.utm_content,
props: ({ data }) => {
return {
statement: data.statements &&
| 9 |
diff --git a/website/riot/dict-config-links.riot b/website/riot/dict-config-links.riot if (this.state.data.babelnet_id != '') {
$.post(window.API_URL + this.dictData.dictId + '/babelnet',{babelnet_id: this.state.data.babelnet_id}, (response) => {
$('#babelnet-status').html(response.state)
- if (response.state == 'ERROR') {
- $('#babelnet_error').show();
- }
+ if (response.state != 'PROCESSING') {
if (response.state == 'COMPLETED') {
$('#babelnet_complete').show();
+ } else {
+ $('#babelnet_error').show();
+ }
}
});
}
| 9 |
diff --git a/js/trackFileLoad.js b/js/trackFileLoad.js @@ -90,6 +90,23 @@ var igv = (function (igv) {
};
+ igv.TrackFileLoad.indexFileExtensions =
+ {
+ 'bed': 'idx',
+ 'bam': 'bai'
+ };
+
+ igv.TrackFileLoad.isIndexable = function (fileOrURL) {
+ var extension,
+ success;
+
+ extension = igv.getExtension({ url: fileOrURL });
+
+ success = !(undefined === igv.TrackFileLoad.indexFileExtensions[ extension ]);
+
+ return success;
+ };
+
function drag_drop_surface(trackFileLoader, $parent) {
var $e,
@@ -247,7 +264,8 @@ var igv = (function (igv) {
igv.TrackFileLoad.prototype.loadLocalFile = function (file) {
var filename,
- extension;
+ extension,
+ success;
filename = file.name;
extension = igv.getExtension({ url: file });
@@ -303,24 +321,29 @@ var igv = (function (igv) {
trackFileLoader.$url_input_container.append(trackFileLoader.$url_input);
trackFileLoader.$url_input.on( 'change', function( e ) {
- var _url = $(this).val();
+ var _url = $(this).val(),
+ success;
- if ('bed' === igv.getExtension({ url: _url })) {
+ if ( !igv.TrackFileLoad.isIndexable(_url) ) {
+ igv.browser.loadTrack( { url: _url } );
+ $(this).val(undefined);
+ doDismiss(trackFileLoader);
+ return;
+ }
- trackFileLoader.$file_input_container.toggle();
- trackFileLoader.$or.toggle();
+ trackFileLoader.$file_input_container.hide();
+ trackFileLoader.$or.hide();
trackFileLoader.$url_input_feedback.text( ('.../' + _url.split("/").pop()) );
- trackFileLoader.$url_input_feedback.toggle();
+ trackFileLoader.$url_input_feedback.show();
- $(this).toggle();
+ $(this).hide();
- trackFileLoader.$index_url_input.toggle();
- } else {
- igv.browser.loadTrack( { url: _url } );
- $(this).val(undefined);
- doDismiss(trackFileLoader);
- }
+ trackFileLoader.$index_url_input.val(undefined);
+ trackFileLoader.$index_url_input.show();
+
+ $ok.show();
+ $cancel.show();
});
@@ -331,7 +354,7 @@ var igv = (function (igv) {
// index url input
- trackFileLoader.$index_url_input = $('<input class="igv-drag-and-drop-url-input" placeholder="enter index URL">');
+ trackFileLoader.$index_url_input = $('<input class="igv-drag-and-drop-url-input" placeholder="enter optional index URL">');
trackFileLoader.$index_url_input.hide();
trackFileLoader.$url_input_container.append(trackFileLoader.$index_url_input);
@@ -340,9 +363,6 @@ var igv = (function (igv) {
trackFileLoader.$index_url_input_feedback.text( ('.../' + _url.split("/").pop()) );
trackFileLoader.$index_url_input_feedback.toggle();
$(this).toggle();
-
- $ok.show();
- $cancel.show();
});
// visual feedback that index url was successfully input
@@ -357,8 +377,13 @@ var igv = (function (igv) {
$ok.hide();
$ok.on('click', function (e) {
+ var _url,
+ _indexURL;
+
+ _url = ("" === trackFileLoader.$url_input.val()) ? undefined : trackFileLoader.$url_input.val();
+ _indexURL = ("" === trackFileLoader.$index_url_input.val()) ? undefined : trackFileLoader.$index_url_input.val();
- igv.browser.loadTrack( { url: trackFileLoader.$url_input.val(), indexURL: trackFileLoader.$index_url_input.val() } );
+ igv.browser.loadTrack( { url: _url, indexURL: _indexURL } );
doDismiss(trackFileLoader);
});
| 7 |
diff --git a/src/components/nodes/dataInputAssociation/dataInputAssociation.vue b/src/components/nodes/dataInputAssociation/dataInputAssociation.vue @@ -82,7 +82,8 @@ export default {
},
updateDefinitionLinks() {
const targetShape = this.shape.getTargetElement();
- this.node.definition.set('targetRef', this.sourceNode.definition);
+ this.node.definition.set('sourceRef', [this.sourceNode.definition]);
+ this.node.definition.set('targetRef', null);
targetShape.component.node.definition.set('dataInputAssociations', [this.node.definition]);
},
},
| 12 |
diff --git a/bin/util.js b/bin/util.js @@ -320,7 +320,7 @@ function randomOneOf (choices) {
}
function randomText ({ minLength = 1, maxLength = 250 } = {}) {
- const length = randomNumber({ min: minLength, max: maxLength });
+ const length = randomNumber({ min: minLength, max: maxLength }) + 1;
let result = '';
let punctuationIndex = 1;
let uc = true;
@@ -342,7 +342,7 @@ function randomText ({ minLength = 1, maxLength = 250 } = {}) {
result += ' ';
}
result = result.trim();
- result = result.replace(/[,.:;!?]$/, ''); // if ends in punctation then remove it
+ result = result.replace(/[,.:;!?]$/, ''); // if ends in punctuation then remove it
if (maxLength > 5) {
if (result.length >= maxLength) result = result.substr(0, maxLength - 1);
result += '.';
| 1 |
diff --git a/extensions/projection/README.md b/extensions/projection/README.md @@ -86,13 +86,6 @@ the default shape for all assets that don't have an overriding shape.
If the transform is defined in an item's properties it is used as the default transform for all assets that don't have an overriding transform.
-### Item [`Asset Object`](../../item-spec/item-spec.md#asset-object) fields
-
-| Field Name | Type | Description |
-| ---------- | -------- | -------------------------------------------- |
-| proj:shape | \[integer] | See item description. |
-| proj:transorm | \[number] | See item description. |
-
## Centroid Object
This object represents the centroid of an item's geometry.
| 2 |
diff --git a/src/components/dashboard/Dashboard.js b/src/components/dashboard/Dashboard.js @@ -52,17 +52,23 @@ class Dashboard extends Component<DashboardProps, DashboardState> {
componentDidMount() {
const { params } = this.props.navigation.state
-
+ userStorage.feed.on(() => this.getFeeds(), true)
if (params && params.receiveLink) {
this.handleWithdraw()
} else if (params && params.event) {
this.showNewFeedEvent(params.event)
- } else {
+ }
+
this.getFeeds()
}
+
+ componentWillUnmount() {
+ // TODO: we should be removing the listener in unmount but this causes that you cannot re-subscribe
+ // userStorage.feed.off()
}
getFeeds() {
+ log.info('getFeeds')
getInitialFeed(this.props.store)
}
@@ -122,7 +128,6 @@ class Dashboard extends Component<DashboardProps, DashboardState> {
}
})
}
- this.getFeeds()
}
closeFeedEvent = () => {
@@ -131,7 +136,6 @@ class Dashboard extends Component<DashboardProps, DashboardState> {
currentFeedProps: null
},
() => {
- this.getFeeds()
this.props.screenProps.navigateTo('Home', {
event: undefined,
receiveLink: undefined,
@@ -148,11 +152,9 @@ class Dashboard extends Component<DashboardProps, DashboardState> {
const receipt = await executeWithdraw(store, receiveLink, reason)
if (receipt.transactionHash) {
await this.showNewFeedEvent(receipt.transactionHash)
- } else {
- this.getFeeds()
}
} catch (e) {
- this.getFeeds()
+ log.error(e)
}
}
| 0 |
diff --git a/ui-manager.js b/ui-manager.js @@ -14,6 +14,8 @@ import {colors, storageHost} from './constants.js';
const uiManager = new EventTarget();
const localVector2 = new THREE.Vector3();
+const localQuaternion = new THREE.Quaternion();
+const localEuler = new THREE.Euler();
const localColor = new THREE.Color();
const _makeInventoryContentsMesh = () => {
| 0 |
diff --git a/src/navigation/restaurant/Order.js b/src/navigation/restaurant/Order.js @@ -12,6 +12,7 @@ import { connect } from 'react-redux'
import { translate } from 'react-i18next'
import moment from 'moment/min/moment-with-locales'
import { phonecall } from 'react-native-communications'
+import { PhoneNumberUtil, PhoneNumberFormat } from 'google-libphonenumber'
import { formatPrice } from '../../Cart'
import LoaderOverlay from '../../components/LoaderOverlay'
@@ -22,6 +23,8 @@ import material from '../../../native-base-theme/variables/material'
moment.locale(localeDetector())
+const phoneNumberUtil = PhoneNumberUtil.getInstance()
+
class OrderScreen extends Component {
constructor(props) {
@@ -153,6 +156,7 @@ class OrderScreen extends Component {
render() {
const { order } = this.props.navigation.state.params
+ const phoneNumber = phoneNumberUtil.parse(order.customer.telephone)
return (
<Container>
@@ -161,17 +165,14 @@ class OrderScreen extends Component {
<Row size={ 10 }>
<Content padder>
<View style={ styles.section }>
- <Card>
- <CardItem button onPress={ () => phonecall(order.customer.telephone, true) }>
- <Left>
- <Icon name="person" />
- <Text>{ order.customer.username }</Text>
- </Left>
- <Right>
- <Icon name="call" style={{ alignSelf: 'flex-end' }} />
- </Right>
- </CardItem>
- </Card>
+ <View style={{ flex: 1, flexDirection: 'row', alignItems: 'flex-end' }}>
+ <Button iconLeft success
+ onPress={ () => phonecall(order.customer.telephone, true) }
+ style={{ marginLeft: 'auto', alignSelf: 'flex-end' }}>
+ <Icon name="call" />
+ <Text>{ phoneNumberUtil.format(phoneNumber, PhoneNumberFormat.NATIONAL) }</Text>
+ </Button>
+ </View>
</View>
<View style={ styles.section }>
<OrderItems order={ order } />
| 7 |
diff --git a/assets/js/util/index.js b/assets/js/util/index.js @@ -45,8 +45,6 @@ import { addQueryArgs, getQueryString } from '@wordpress/url';
import SvgIcon from './svg-icon';
import { trackEvent } from './tracking';
import { fillFilterWithComponent } from './helpers';
-import parseUnsatisfiedScopes from './parse-unsatisfied-scopes';
-export { parseUnsatisfiedScopes };
export { trackEvent };
export { SvgIcon };
export * from './sanitize';
| 2 |
diff --git a/src/cellEditors/FilterBox.js b/src/cellEditors/FilterBox.js @@ -158,7 +158,11 @@ var FilterBox = ComboBox.extend('FilterBox', {
!CellEditor.prototype.keyup.call(this, event) &&
this.grid.properties.filteringMode === 'immediate'
) {
+ try {
this.saveEditorValue(this.getEditorValue());
+ } catch (err) {
+ // ignore syntax errors in immediate mode
+ }
}
},
| 8 |
diff --git a/app/stylesheets/builtin-pages/components/files-list-sidebar.less b/app/stylesheets/builtin-pages/components/files-list-sidebar.less white-space: pre;
font-size: 0.75rem;
max-height: 50vh;
- overflow-x: hidden;
- overflow-y: auto;
+ overflow: auto;
}
}
| 11 |
diff --git a/assets/sass/widgets/_googlesitekit-widget-analyticsAllTraffic.scss b/assets/sass/widgets/_googlesitekit-widget-analyticsAllTraffic.scss .googlesitekit-widget--analyticsAllTraffic__totals {
// HACK: Fixes jumping of widget when a dimension is selected.
@media (min-width: $bp-desktop) {
- height: 1px;
+ margin-bottom: $grid-gap-desktop * -1;
}
}
| 7 |
diff --git a/packages/uikit-default/src/sass/scss/components/_modal.scss b/packages/uikit-default/src/sass/scss/components/_modal.scss cursor: pointer;
position: absolute;
right: 0;
- top: 0.4rem;
+ top: 0;
transition: all $pl-animate-quick ease-out;
&:hover, &:focus {
* 1) Displayed as an e
*/
.pl-c-modal__close-btn-icon {
- width: 14px;
- height: 14px;
+ width: 12px;
+ height: 12px;
color: currentColor;
fill: currentColor;
transition: fill $pl-animate-quick ease-out;
overflow-x: hidden;
padding: 1.5rem 1rem 1rem;
- @media all and (min-width: $pl-bp-large) {
+ @media all and (min-width: $pl-bp-xl) {
padding-left: 2rem;
padding-right: 2rem;
}
| 5 |
diff --git a/packages/app/src/migrations/20211227060705-revision-path-to-page-id-schema-migration.js b/packages/app/src/migrations/20211227060705-revision-path-to-page-id-schema-migration.js @@ -7,6 +7,8 @@ import getPageModel from '~/server/models/page';
const logger = loggerFactory('growi:migrate:revision-path-to-page-id-schema-migration');
+const LIMIT = 300;
+
module.exports = {
// path => pageId
async up(db, client) {
@@ -15,7 +17,7 @@ module.exports = {
const Revision = getModelSafely('Revision') || require('~/server/models/revision')();
const recursiveUpdate = async(offset = 0) => {
- const pages = await Page.find({ revision: { $ne: null } }, { _id: 1, revision: 1 }).skip(offset).limit(100).exec();
+ const pages = await Page.find({ revision: { $ne: null } }, { _id: 1, revision: 1 }).skip(offset).limit(LIMIT).exec();
if (pages.length === 0) {
return;
}
@@ -50,7 +52,7 @@ module.exports = {
const Revision = getModelSafely('Revision') || require('~/server/models/revision')();
const recursiveUpdate = async(offset = 0) => {
- const pages = await Page.find({ revision: { $ne: null } }, { _id: 1, revision: 1, path: 1 }).skip(offset).limit(100).exec();
+ const pages = await Page.find({ revision: { $ne: null } }, { _id: 1, revision: 1, path: 1 }).skip(offset).limit(LIMIT).exec();
if (pages.length === 0) {
return;
}
| 12 |
diff --git a/lib/routes/agefans/update.js b/lib/routes/agefans/update.js @@ -2,7 +2,7 @@ const got = require('@/utils/got');
const cheerio = require('cheerio');
module.exports = async (ctx) => {
- const rootUrl = 'https://www.agefans.cc';
+ const rootUrl = 'https://www.agemys.com';
const currentUrl = `${rootUrl}/update`;
const response = await got({
method: 'get',
| 1 |
diff --git a/base/game_events/MoveEvent.ts b/base/game_events/MoveEvent.ts @@ -81,10 +81,10 @@ export class MoveEvent extends GameEvent {
}
}
- on_position_reach(char: ControllableChar) {
+ async on_position_reach(char: ControllableChar) {
char.stop_char();
if (this.final_direction !== null) {
- char.set_direction(this.final_direction, true);
+ await char.face_direction(this.final_direction);
}
if (this.wait_after) {
this.game.time.events.add(this.wait_after, this.go_to_finish, this, char);
@@ -148,13 +148,13 @@ export class MoveEvent extends GameEvent {
const minimal_distance_sqr = this.minimal_distance * this.minimal_distance;
let previous_sqr_dist = Infinity;
- const udpate_callback = () => {
+ const udpate_callback = async () => {
char.update_movement(true);
this.data.map.sort_sprites();
const this_sqr_dist = get_sqr_distance(char.x, dest.x, char.y, dest.y);
if (this_sqr_dist < minimal_distance_sqr || this_sqr_dist > previous_sqr_dist) {
this.data.game_event_manager.remove_callback(udpate_callback);
- this.on_position_reach(char);
+ await this.on_position_reach(char);
}
previous_sqr_dist = this_sqr_dist;
};
| 7 |
diff --git a/core/server/api/v2/pages.js b/core/server/api/v2/pages.js const models = require('../../models');
-const i18n = require('../../../shared/i18n');
+const tpl = require('@tryghost/tpl');
const errors = require('@tryghost/errors');
const getPostServiceInstance = require('../../services/posts/posts-service');
const ALLOWED_INCLUDES = ['tags', 'authors', 'authors.roles'];
const UNSAFE_ATTRS = ['status', 'authors', 'visibility'];
+const messages = {
+ pageNotFound: 'Page not found.'
+};
+
const postsService = getPostServiceInstance('v2');
module.exports = {
@@ -75,7 +79,7 @@ module.exports = {
.then((model) => {
if (!model) {
throw new errors.NotFoundError({
- message: i18n.t('errors.api.pages.pageNotFound')
+ message: tpl(messages.pageNotFound)
});
}
@@ -185,7 +189,7 @@ module.exports = {
.then(() => null)
.catch(models.Post.NotFoundError, () => {
return Promise.reject(new errors.NotFoundError({
- message: i18n.t('errors.api.pages.pageNotFound')
+ message: tpl(messages.pageNotFound)
}));
});
}
| 14 |
diff --git a/test/configCases/records/issue-2991/test.js b/test/configCases/records/issue-2991/test.js @@ -6,7 +6,7 @@ it("should write relative paths to records", function() {
var fs = require("fs");
var path = require("path");
var content = fs.readFileSync(path.join(__dirname, "records.json"), "utf-8");
- content.should.eql(`{
+ content.replace(/\\\\/g, "/").should.eql(`{
"modules": {
"byIdentifier": {
"../../../../external \\"fs\\"": 0,
| 1 |
diff --git a/README.md b/README.md @@ -131,10 +131,8 @@ npm i -g @nexrender/cli @nexrender/action-copy @nexrender/action-encode ...
We will be using `nexrender-cli` binary for this example. It's recommended to download/install it if you haven't already.
-Check out these example/tutorial videos made by our community:
-
-* ["Creating automated music video"](https://www.youtube.com/channel/UCDFTT_oX6VwmANKMng0-NUA) by **[douglas prod.](https://www.youtube.com/channel/UCDFTT_oX6VwmANKMng0-NUA)**
-
+Also, check out these example/tutorial videos made by our community:
+* ["Creating automated music video with nexrender"](https://www.youtube.com/watch?v=E64dXZ_AReQ) by **[douglas prod.](https://www.youtube.com/channel/UCDFTT_oX6VwmANKMng0-NUA)**
## Job
| 1 |
diff --git a/core/server/api/canary/pages-public.js b/core/server/api/canary/pages-public.js -const i18n = require('../../../shared/i18n');
+const tpl = require('@tryghost/tpl');
const errors = require('@tryghost/errors');
const models = require('../../models');
const ALLOWED_INCLUDES = ['tags', 'authors'];
+const messages = {
+ pageNotFound: 'Page not found.'
+};
+
module.exports = {
docName: 'pages',
@@ -63,7 +67,7 @@ module.exports = {
.then((model) => {
if (!model) {
throw new errors.NotFoundError({
- message: i18n.t('errors.api.pages.pageNotFound')
+ message: tpl(messages.pageNotFound)
});
}
| 14 |
diff --git a/components/Audio/index.js b/components/Audio/index.js @@ -40,7 +40,12 @@ export const AudioProvider = ({ children, inNativeApp, inNativeIOSApp }) => {
if (inNativeApp) {
postMessage({
type: 'play-audio',
- payload
+ payload: {
+ audio: {
+ ...payload
+ }
+ // Todo: add currentTime to payload
+ }
})
return
}
| 1 |
diff --git a/Readme.md b/Readme.md @@ -56,15 +56,15 @@ Commander exports a global object which is convenient for quick programs.
This is used in the examples in this README for brevity.
```js
-const program = require('commander').program;
+const { program } = require('commander');
program.version('0.0.1');
```
For larger programs which may use commander in multiple ways, including unit testing, it is better to create a local Command object to use.
```js
- const commander = require('commander');
- const program = new commander.Command();
+ const { Command } = require('commander');
+ const program = new Command();
program.version('0.0.1');
```
@@ -88,7 +88,7 @@ Options on the command line are not positional, and can be specified before or a
The two most used option types are a boolean flag, and an option which takes a value (declared using angle brackets). Both are `undefined` unless specified on command line.
```js
-const program = require('commander');
+const { program } = require('commander');
program
.option('-d, --debug', 'output extra debugging')
@@ -126,7 +126,7 @@ pizza details:
You can specify a default value for an option which takes a value.
```js
-const program = require('commander');
+const { program } = require('commander');
program
.option('-c, --cheese <type>', 'add the specified type of cheese', 'blue');
@@ -152,7 +152,7 @@ If you define `--foo` first, adding `--no-foo` does not change the default value
otherwise be. You can specify a default boolean value for a boolean flag and it can be overridden on command line.
```js
-const program = require('commander');
+const { program } = require('commander');
program
.option('--no-sauce', 'Remove sauce')
@@ -179,7 +179,7 @@ You ordered a pizza with no sauce and no cheese
You can specify an option which functions as a flag but may also take a value (declared using square brackets).
```js
-const program = require('commander');
+const { program } = require('commander');
program
.option('-c, --cheese [type]', 'Add cheese with optional type');
@@ -210,7 +210,7 @@ This allows you to coerce the option value to the desired type, or accumulate va
You can optionally specify the default/starting value for the option after the function.
```js
-const program = require('commander');
+const { program } = require('commander');
function myParseInt(value, dummyPrevious) {
// parseInt takes a string and an optional radix
@@ -264,7 +264,7 @@ $ custom --list x,y,z
You may specify a required (mandatory) option using `.requiredOption`. The option must have a value after parsing, usually specified on the command line, or perhaps from a default value (say from environment). The method is otherwise the same as `.option` in format, taking flags and description, and optional default value or custom processing.
```js
-const program = require('commander');
+const { program } = require('commander');
program
.requiredOption('-c, --cheese <type>', 'pizza must have cheese');
@@ -336,7 +336,7 @@ Configuration options can be passed with the call to `.command()`. Specifying `t
You use `.arguments` to specify the arguments for the top-level command, and for subcommands they are included in the `.command` call. Angled brackets (e.g. `<required>`) indicate required input. Square brackets (e.g. `[optional]`) indicate optional input.
```js
-const program = require('commander');
+const { program } = require('commander');
program
.version('0.1.0')
@@ -360,7 +360,7 @@ console.log('environment:', envValue || "no environment given");
append `...` to the argument name. For example:
```js
-const program = require('commander');
+const { program } = require('commander');
program
.version('0.1.0')
@@ -386,7 +386,7 @@ The action handler gets passed a parameter for each argument you declared, and o
command object itself. This command argument has the values for the command-specific options added as properties.
```js
-const program = require('commander');
+const { program } = require('commander');
program
.command('rm <dir>')
@@ -423,7 +423,7 @@ You handle the options for an executable (sub)command in the executable, and don
```js
// file: ./examples/pm
-const program = require('commander');
+const { program } = require('commander');
program
.version('0.1.0')
@@ -667,7 +667,7 @@ try {
## Examples
```js
-const program = require('commander');
+const { program } = require('commander');
program
.version('0.1.0')
| 4 |
diff --git a/packages/simplebar-react/package.json b/packages/simplebar-react/package.json ],
"author": "Adrien Denat",
"repository": "grsmto/simplebar",
- "main": "dist/simplebar-react.umd.js",
+ "main": "dist/simplebar-react.js",
"module": "dist/simplebar-react.esm.js",
"bugs": "https://github.com/grsmto/simplebar/issues",
"homepage": "https://grsmto.github.io/simplebar/",
| 10 |
diff --git a/src/server/views/widget/page_alerts.html b/src/server/views/widget/page_alerts.html <div class="col-sm-12">
{% if page && page.grant && page.grant > 1 %}
+ <p class="alert py-3 px-4">
{% if page.grant == 2 %}
<i class="icon-fw icon-link"></i><strong>{{ consts.pageGrants[page.grant] }}</strong> ({{ t('Browsing of this page is restricted') }})
{% elseif page.grant == 4 %}
| 14 |
diff --git a/weapons-manager.js b/weapons-manager.js @@ -819,10 +819,21 @@ function toScreenPosition(obj, camera) {
};
}
const _updatePopover = () => {
+ const n = localVector.set(0, 0, -1)
+ .applyQuaternion(camera.quaternion)
+ .dot(
+ localVector2.copy(popoverMesh.target.position)
+ .sub(camera.position)
+ );
+ if (n > 0) {
const {x, y} = toScreenPosition(popoverMesh.target, camera);
popoverMesh.position.x = -1 + x/(window.innerWidth*window.devicePixelRatio)*2;
popoverMesh.position.y = 1 - y/(window.innerHeight*window.devicePixelRatio)*2;
popoverMesh.scale.set(popoverMesh.width/(window.innerWidth*window.devicePixelRatio), popoverMesh.height/(window.innerHeight*window.devicePixelRatio), 1);
+ popoverMesh.visible = true;
+ } else {
+ popoverMesh.visible = false;
+ }
};
/* renderer.domElement.addEventListener('wheel', e => {
| 0 |
diff --git a/README.md b/README.md @@ -66,4 +66,4 @@ See the [`@airswap/consumer`](/examples/consumer) example. **Demonstration only.
# Protocol Migration (V1 to V2)
-To migrate to the new Swap Protocol please see [MIGRATION.md](/contracts/swap/MIGRATION.md)
+To migrate to the new Swap Protocol please see [MIGRATION.md](/protocols/swap/MIGRATION.md)
| 3 |
diff --git a/README.md b/README.md @@ -227,7 +227,7 @@ Feel free to dive in! [Open an issue](https://github.com/ipfs-shipyard/ipfs-webi
To contribute to IPFS in general, see the [contributing guide](https://github.com/ipfs/community/blob/master/contributing.md).
-[](https://github.com/ipfs/community/blob/master/contributing.md)
+[](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md)
## License
| 1 |
diff --git a/lib/shared/addon/components/project-member-row/template.hbs b/lib/shared/addon/components/project-member-row/template.hbs </td>
<td> </td>
<div class="input-group-btn">
- {{#unless noUpdate}}
<button class="btn bg-primary btn-sm" {{action "remove"}}>
<i class="icon icon-minus" />
</button>
- {{/unless}}
</div>
\ No newline at end of file
| 2 |
diff --git a/packages/@uppy/locales/src/fi_FI.js b/packages/@uppy/locales/src/fi_FI.js @@ -83,9 +83,9 @@ fi_FI.strings = {
selectAllFilesFromFolderNamed: 'Valitse kaikki tiedostot kansiosta %{name}',
selectFileNamed: 'Valitse tiedosto %{name}',
selectX: {
- '0': 'Valitse %{smart_count} tiedosto',
- '1': 'Valitse %{smart_count} tiedostoa',
- '2': 'Valitse %{smart_count} tiedostoa'
+ '0': 'Valitse %{smart_count}',
+ '1': 'Valitse %{smart_count}',
+ '2': 'Valitse %{smart_count}'
},
smile: 'Hymyile!',
startRecording: 'Aloita videon tallennus',
| 7 |
diff --git a/src/main/javascript/view/MainView.js b/src/main/javascript/view/MainView.js @@ -111,7 +111,7 @@ SwaggerUi.Views.MainView = Backbone.View.extend({
addResource: function(resource, auths){
// Render a resource and add it to resources li
- resource.id = resource.id.replace(/[[\]{}()*+?,\\/^$|#\s]/g, '_');
+ resource.id = resource.id.replace(/[^a-zA-Z\d]/g, function(str) { return str.charCodeAt(0); });
// Make all definitions available at the root of the resource so that they can
// be loaded by the JSonEditor
| 14 |
diff --git a/detox/src/ios/expectTwo.js b/detox/src/ios/expectTwo.js @@ -137,7 +137,7 @@ class Element {
return this.withAction('scrollTo', edge);
}
- swipe(direction, speed = 'fast', percentage = 0) {
+ swipe(direction, speed = 'fast', percentage = 0.5) {
if (!['left', 'right', 'up', 'down'].some(option => option === direction)) throw new Error('direction should be one of [left, right, up, down], but got ' + direction);
if (!['slow', 'fast'].some(option => option === speed)) throw new Error('speed should be one of [slow, fast], but got ' + speed);
if (!(typeof percentage === 'number' && percentage >= 0 && percentage <= 1)) throw new Error('yOriginStartPercentage should be a number [0.0, 1.0], but got ' + (percentage + (' (' + (typeof percentage + ')'))));
| 12 |
diff --git a/gameplay/avalonRoom.js b/gameplay/avalonRoom.js @@ -50,12 +50,19 @@ module.exports = function (host_, roomId_, io_, maxNumPlayers_, newRoomPassword_
var thisRoom = this;
- if(newRoomPassword_ && newRoomPassword_.length === 0){
+
+ if(newRoomPassword_ === ""){
newRoomPassword_ = undefined;
+ console.log("UNDEFINED!!!!");
}
+
this.joinPassword = newRoomPassword_;
this.maxNumPlayers = maxNumPlayers_;
+ console.log("newroomPassword:|" + newRoomPassword_ + "|");
+ console.log("joinPassword:|" + this.joinPassword + "|");
+ console.log("typeof newroom:|" + typeof(newRoomPassword_) + "|");
+
this.io = io_;
| 1 |
diff --git a/test/client/data/runner/iframe.html b/test/client/data/runner/iframe.html //Hammerhead setup
var hammerhead = getTestCafeModule('hammerhead');
+ var INSTRUCTION = hammerhead.get('../processing/script/instruction');
+
hammerhead.get('./utils/destination-location').forceLocation('http://localhost/sessionId/https://example.com');
window.loadedTime = Date.now();
$('#button').click(function () {
- window.top.postMessage(JSON.stringify({ type: "clickRaised" }), "*");
+ window[INSTRUCTION.callMethod](top, 'postMessage', [JSON.stringify({ type: "clickRaised" }), '*']);
});
$('#errorButton').click(function () {
| 1 |
diff --git a/src/Log.js b/src/Log.js const util = require('./util');
const Discord = require('discord.js');
const GuildConfig = require('./GuildConfig');
+const {APIErrors} = Discord.Constants;
class Log{
/**
@@ -8,7 +9,7 @@ class Log{
* @param {GuildInfo} guildInfo
* @param {String} message content of the log message
* @param {module:"discord.js".MessageEmbed} [options]
- * @return {Promise<module:"discord.js".Message>} log message
+ * @return {Promise<module:"discord.js".Message|null>} log message
*/
static async log(guildInfo, message, options) {
/** @type {module:"discord.js".Guild} */
@@ -17,8 +18,18 @@ class Log{
const guildConfig = await GuildConfig.get(/** @type {module:"discord.js".Snowflake} */guild.id);
if (!guildConfig.logChannel) return null;
+ try {
return await guild.channels.resolve(/** @type {String} */guildConfig.logChannel).send(message.substring(0,2000),options);
}
+ catch (e) {
+ if ([APIErrors.MISSING_ACCESS, APIErrors.MISSING_PERMISSIONS].includes(e.code)) {
+ return null;
+ }
+ else {
+ throw e;
+ }
+ }
+ }
/**
* Logs an embed to the guilds log channel (if specified)
| 8 |
diff --git a/src/components/TabLink/TabLink.styles.js b/src/components/TabLink/TabLink.styles.js @@ -44,6 +44,10 @@ export const Tab: ComponentType<*> = (() => {
border-bottom: 4px solid #1e70b8 !important;
color: #1e70b8;
}
+
+ @media only screen and (max-width: 768px) {
+ margin-top: 1rem;
+ }
`
})(); // Tab
@@ -55,6 +59,7 @@ export const Body: ComponentType<*> = (() => {
display: block;
height: fit-content;
width: 100%;
+ height: 350px;
`
})(); // Body
| 7 |
diff --git a/new-client/src/plugins/LayerSwitcher/components/LayerSettings.js b/new-client/src/plugins/LayerSwitcher/components/LayerSettings.js @@ -66,7 +66,7 @@ class LayerSettings extends React.PureComponent {
<div className={classes.sliderContainer}>
<div className={classes.sliderText}>
<Typography className={classes.subtitle2} variant="subtitle2">
- Transparens:
+ Opacitet:
</Typography>
</div>
<div className={classes.sliderItem}>
@@ -74,13 +74,13 @@ class LayerSettings extends React.PureComponent {
value={opacityValue}
min={0}
max={1}
- step={0.1}
+ step={0.05}
onChange={this.opacitySliderChanged}
/>
</div>
<div className={classes.sliderText}>
<Typography className={classes.subtitle2} variant="subtitle2">
- {Math.trunc(100 * (1 - opacityValue).toFixed(1))} %
+ {Math.trunc(100 * opacityValue.toFixed(2))} %
</Typography>
</div>
</div>
| 14 |
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -6,6 +6,13 @@ The history of all changes to react-polymorph.
vNext
=====
+0.9.6-rc.1
+=====
+
+### Features
+
+- Added `PopOver` component (aka Smart Tooltips) ([PR 150](https://github.com/input-output-hk/react-polymorph/pull/150)
+
0.9.5
=====
| 6 |
diff --git a/bin/oref0-setup.sh b/bin/oref0-setup.sh @@ -900,6 +900,7 @@ if prompt_yn "" N; then
if [[ ${CGM,,} =~ "g5" || ${CGM,,} =~ "g5-upload" ]]; then
openaps use cgm config --G5
openaps report add raw-cgm/raw-entries.json JSON cgm oref0_glucose --hours "24.0" --threshold "100" --no-raw
+ set_pref_string .cgm_loop_path "$directory"
## TODO: figure out if any of this is still needed
#elif [[ ${CGM,,} =~ "g4-go" ]]; then
#echo Checking Adafruit_BluefruitLE installation
| 12 |
diff --git a/packages/app/test/cypress/integration/20-basic-features/use-tools.spec.ts b/packages/app/test/cypress/integration/20-basic-features/use-tools.spec.ts @@ -43,7 +43,7 @@ context('Modal for page operation', () => {
cy.screenshot(`${ssPrefix}page-create-modal-closed`, {capture: 'viewport'});
});
it("Successfully Create Today's page", () => {
- const pageName = 'abcdefg';
+ const pageName = "Today's page";
cy.visit('/');
cy.getByTestid('newPageBtn').click();
@@ -60,7 +60,7 @@ context('Modal for page operation', () => {
cy.screenshot(`${ssPrefix}create-today-page`);
});
it('Successfully create page under specific path', () => {
- const pageName = 'testtest';
+ const pageName = 'Pages created under a specific path';
cy.visit('/');
cy.getByTestid('newPageBtn').click();
@@ -78,12 +78,12 @@ context('Modal for page operation', () => {
});
it('Successfully create a template page under the path', () => {
- const templatePath = 'testttttt';
+ const pageName = 'Template page created under a specific path';
cy.visit('/');
cy.getByTestid('newPageBtn').click();
cy.getByTestid('page-create-modal').should('be.visible').within(() => {
- cy.get('.rbt-input-main').type(templatePath);
+ cy.get('.rbt-input-main').type(pageName);
cy.screenshot(`${ssPrefix}create-template-for-children-add-path`);
cy.get('#template-type').click();
| 10 |
diff --git a/README.md b/README.md @@ -367,14 +367,14 @@ To disable the model validation you can use `--disableModelValidation`.
Usage in order to send messages back to clients:
-`POST http://localhost:{websocketPort}/@connections/{connectionId}`
+`POST http://localhost:3001/@connections/{connectionId}`
Or,
```js
const apiGatewayManagementApi = new AWS.ApiGatewayManagementApi({
apiVersion: '2018-11-29',
- endpoint: event.apiGatewayUrl || `${event.requestContext.domainName}/${event.requestContext.stage}`,
+ endpoint: `http://localhost:3001`,
});
apiGatewayManagementApi.postToConnection({
| 2 |
diff --git a/generators/server/prompts.js b/generators/server/prompts.js @@ -164,7 +164,7 @@ function askForServerSideOpts(meta) {
},
{
value: 'couchbase',
- name: '[BETA] Couchbase'
+ name: 'Couchbase'
}
];
if (
| 2 |
diff --git a/src/selection-handler.js b/src/selection-handler.js @@ -300,14 +300,6 @@ Object.assign(SelectionHandler.prototype, require('./function-bind'), require('.
return;
}
this.focusAtEnd();
- } else if (this.options.selectionCut && !ev.metaKey && ["Shift", "Control", "Meta", "Alt"].indexOf(key) === -1) {
- const nextBlock = this.editor.getBlocks()[this.getEndIndex() + 1];
- this.delete();
- if (nextBlock) {
- this.mediator.trigger("block:createBefore", "text", "", nextBlock, { autoFocus: true });
- } else {
- this.mediator.trigger("block:create", "text", "", { autoFocus: true });
- }
}
}
},
| 2 |
diff --git a/src/components/Introduced/InstallStep.js b/src/components/Introduced/InstallStep.js @@ -18,18 +18,15 @@ export default class InstallStep extends PureComponent {
this.state = {
installType: props.installType,
isAuthorize: false,
- authorizeLoading: true,
- eid: props.eid ? props.eid : '',
- dispatch: props.dispatch
+ authorizeLoading: true
};
}
componentWillMount() {
- const { dispatch } = this.state;
dispatch({
type: 'market/fetchMarketsTab',
payload: {
- enterprise_id: this.state.eid
+ enterprise_id: props.eid
},
callback: res => {
if (res && res.status_code === 200) {
| 1 |
diff --git a/src/components/tree/Tree.js b/src/components/tree/Tree.js @@ -2,6 +2,7 @@ import _ from 'lodash';
import Component from '../_classes/component/Component';
import Components from '../Components';
import NestedComponent from '../_classes/nested/NestedComponent';
+import Utils from '../../utils';
class Node {
constructor(
@@ -235,6 +236,13 @@ export default class TreeComponent extends NestedComponent {
super(component, options, data);
this.type = 'tree';
this.changingNodeClassName = 'formio-component-tree-node-changing';
+
+ this.templateHash = {
+ edit: Utils.addTemplateHash(this.component.template?.edit || TreeComponent.defaultEditTemplate),
+ view: Utils.addTemplateHash(this.component.template?.view || TreeComponent.defaultViewTemplate),
+ child: Utils.addTemplateHash(this.component.template?.child || TreeComponent.defaultChildTemplate),
+ children: Utils.addTemplateHash(this.component.template?.children || TreeComponent.defaultChildrenTemplate),
+ };
}
getComponents() {
@@ -281,8 +289,7 @@ export default class TreeComponent extends NestedComponent {
buildNodes(parent) {
const childNodes = parent.children.map(this.buildNode.bind(this));
- const childrenTemplate = this.component.template?.children || TreeComponent.defaultChildrenTemplate;
- const element = this.renderElement(childrenTemplate, {
+ const element = this.renderElement(this.templateHash.children, {
node: parent,
nodeData: parent.persistentData,
data: this.data,
@@ -304,10 +311,7 @@ export default class TreeComponent extends NestedComponent {
}
buildNode(node) {
- const editTemplate = this.component.template?.edit || TreeComponent.defaultEditTemplate;
- const viewTemplate = this.component.template?.view || TreeComponent.defaultViewTemplate;
- const childTemplate = this.component.template?.child || TreeComponent.defaultChildTemplate;
- const element = this.renderElement(childTemplate, {
+ const element = this.renderElement(this.templateHash.child, {
node,
nodeData: node.persistentData,
data: this.data,
@@ -329,7 +333,7 @@ export default class TreeComponent extends NestedComponent {
this.renderTemplateToElement(
element,
- editTemplate,
+ this.templateHash.edit,
{
node,
nodeData: node.data,
@@ -357,7 +361,7 @@ export default class TreeComponent extends NestedComponent {
else {
this.renderTemplateToElement(
element,
- viewTemplate,
+ this.templateHash.view,
{
node,
nodeData: node.persistentData,
| 7 |
diff --git a/.github/workflows/main_deploy.yaml b/.github/workflows/main_deploy.yaml @@ -4,9 +4,9 @@ on:
- cron: '0 */4 * * *'
push:
paths:
- - '**.js'
- - '!**.md'
- - '!**.yaml'
+ - 'readme-profiles/*.md'
+ - 'src/**'
+ - 'contributors.json'
branches:
- main
jobs:
| 7 |
diff --git a/templates/workflow/project-form-sections/project_stakeholders.html b/templates/workflow/project-form-sections/project_stakeholders.html {% load crispy_forms_tags %}
+{{ form.stakeholder | as_crispy_field }}
+
+<script>
+ $(document).ready(() => {
+ $('#id_stakeholder').select2({ theme: 'bootstrap' })
+ })
+</script>
\ No newline at end of file
| 0 |
diff --git a/lib/ratatosk/spec/ratatosk_spec.rb b/lib/ratatosk/spec/ratatosk_spec.rb @@ -194,6 +194,7 @@ describe Ratatosk, "grafting" do
it "should set the parent of a kingdom to 'Life'" do
life = Taxon.find_by_name('Life')
plantae = @ratatosk.find('Plantae').first
+ plantae.taxon.current_user = make_admin
plantae.save
@ratatosk.graft(plantae.taxon)
plantae.reload
@@ -252,51 +253,6 @@ describe Ratatosk, "grafting" do
end
end
- describe "to a complete subtree" do
- it "should fail" do
- @Amphibia.update_attributes(complete: true, complete_rank: "species")
- taxon = Taxon.make!(name: "Pseudacris foobar", rank: Taxon::SPECIES)
- @ratatosk.graft(taxon)
- taxon.reload
- expect(taxon).not_to be_grafted
- expect(taxon.ancestor_ids).not_to include(@Amphibia.id)
- end
-
- it "should flag taxa that could not be grafted" do
- @Amphibia.update_attributes(complete: true, complete_rank: "species")
- expect(@Amphibia).to be_valid
- expect(@Amphibia).to be_complete
- taxon = Taxon.make!(name: "Pseudacris foobar", rank: Taxon::SPECIES)
- expect {
- @ratatosk.graft(taxon)
- taxon.reload
- expect(taxon).not_to be_grafted
- }.to change(Flag, :count).by_at_least(1)
- end
-
- it "should not fail if taxon is below complete_rank" do
- @Amphibia.update_attributes(complete: true, complete_rank: "genus")
- taxon = Taxon.make!(name: "Pseudacris foobar", rank: Taxon::SPECIES)
- @ratatosk.graft(taxon)
- taxon.reload
- expect(taxon).to be_grafted
- expect(taxon.ancestor_ids).to include(@Amphibia.id)
- end
-
- it "should not flag if taxon is below complete_rank" do
- @Amphibia.update_attributes(complete: true, complete_rank: "genus")
- expect(@Amphibia).to be_valid
- expect(@Amphibia).to be_complete
- taxon = Taxon.make!(name: "Pseudacris foobar", rank: Taxon::SPECIES)
- expect {
- @ratatosk.graft(taxon)
- taxon.reload
- expect(taxon).to be_grafted
- }.not_to change(Flag, :count)
- end
- end
-
-
it "should look up import a polynom parent" do
expect(Taxon.find_by_name('Sula leucogaster')).to be_blank
expect(Taxon.find_by_name('Sula')).to be_blank
@@ -334,7 +290,7 @@ def load_test_taxa
Taxon.delete_all
TaxonName.delete_all
Rails.logger.debug "\n\n\n[DEBUG] loading test taxa"
- @Life = Taxon.make!(:name => 'Life')
+ @Life = Taxon.make!( name: "Life", rank: Taxon::STATEOFMATTER )
@Animalia = Taxon.make!(:name => 'Animalia', :rank => 'kingdom', :is_iconic => true)
@Animalia.update_attributes(:parent => @Life)
| 1 |
diff --git a/services/ils/app/api/controllers/chunk.js b/services/ils/app/api/controllers/chunk.js @@ -181,7 +181,12 @@ router.post('/', jsonParser, async (req, res) => {
payloadValidator = await ajv.compileAsync(domainSchema.body.data.value);
} catch (e) {
log.error('ERROR: ', e);
- return res.status(400).send(e);
+ return res.status(400).send(
+ {
+ errors:
+ [{ message: 'Schema is invalid!', code: 400 }],
+ },
+ );
}
}
@@ -194,7 +199,12 @@ router.post('/', jsonParser, async (req, res) => {
payloadValidator = await ajv.compileAsync(schema);
} catch (e) {
log.error('ERROR: ', e);
- return res.status(400).send(e);
+ return res.status(400).send(
+ {
+ errors:
+ [{ message: 'Schema is invalid!', code: 400 }],
+ },
+ );
}
}
@@ -332,7 +342,12 @@ router.post('/validate', jsonParser, async (req, res) => {
payloadValidator = await ajv.compileAsync(obj);
} catch (e) {
log.error('ERROR: ', e);
- return res.status(400).send(e);
+ return res.status(400).send(
+ {
+ errors:
+ [{ message: 'Schema is invalid!', code: 400 }],
+ },
+ );
}
const validChunk = payloadValidator(payload);
| 7 |
diff --git a/site/streams.md b/site/streams.md @@ -113,7 +113,7 @@ Sets the maximum size of the stream in bytes. See [retention](#retention). Defau
Sets the maximum age of the stream. See [retention](#retention). Default: not set.
-* `x-max-segment-size`
+* `x-stream-max-segment-size-bytes`
Unit: bytes. A stream is divided up into fixed size segment files on disk.
This setting controls the size of these.
@@ -126,7 +126,7 @@ segment files of 100 MB:
Map<String, Object> arguments = new HashMap<>();
arguments.put("x-queue-type", "stream");
arguments.put("x-max-length-bytes", 20_000_000_000); // maximum stream size: 20 GB
-arguments.put("x-max-segment-size", 100_000_000); // size of segment files: 100 MB
+arguments.put("x-stream-max-segment-size-bytes", 100_000_000); // size of segment files: 100 MB
channel.queueDeclare(
"my-stream",
true, // durable
| 10 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.