Skip to content

Commit a6e9050

Browse files
committed
merge with develop
2 parents 3e89f7f + ed9a57c commit a6e9050

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1947
-928
lines changed

.eslintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"no-restricted-exports": 1,
4343
"no-underscore-dangle": 0,
4444
"no-useless-catch": 2,
45+
"no-plusplus": "off",
4546
"prefer-object-spread": 0,
4647
"max-len": [1, 120, 2, {"ignoreComments": true, "ignoreTemplateLiterals": true}],
4748
"max-classes-per-file": 0,

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ We are a community of, and in solidarity with, people from every gender identity
1010

1111
Learn more about [our community](https://p5js.org/community/) and read our [Community Statement and Code of Conduct](./.github/CODE_OF_CONDUCT.md). You can directly support our work with p5.js by [donating to the Processing Foundation](https://processingfoundation.org/support).
1212

13+
Stay in touch with Processing Foundation across other platforms:
14+
- [Instagram](https://www.instagram.com/p5xjs)
15+
- [Youtube](https://www.youtube.com/@ProcessingFoundation)
16+
- [X](https://x.com/p5xjs)
17+
- Discord (invitation link coming soon!)
18+
- [Forum](https://discourse.processing.org)
19+
20+
1321
## Using the p5.js Editor 🤔
1422

1523
Make your first sketch in the [p5.js Editor](https://editor.p5js.org/)! Learn more about sketching with p5.js on the [Get Started](https://p5js.org/tutorials/get-started/) and find everything you can do in the [Reference](https://p5js.org/reference/). You can also look at [examples](https://editor.p5js.org/p5/sketches) and remix them in the p5.js Editor.

client/i18n.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { initReactI18next } from 'react-i18next';
33
import Backend from 'i18next-http-backend';
44

55
import {
6-
be,
6+
bn,
77
enUS,
88
es,
99
ja,
@@ -21,12 +21,12 @@ import {
2121
enIN
2222
} from 'date-fns/locale';
2323

24-
import getPreferredLanguage from './utils/language-utils';
24+
import { getPreferredLanguage } from './utils/language-utils';
2525

2626
const fallbackLng = ['en-US'];
2727

2828
export const availableLanguages = [
29-
'be',
29+
'bn',
3030
'de',
3131
'en-US',
3232
'es-419',
@@ -61,7 +61,7 @@ if (
6161

6262
export function languageKeyToLabel(lang) {
6363
const languageMap = {
64-
be: 'বাংলা',
64+
bn: 'বাংলা',
6565
de: 'Deutsch',
6666
'en-US': 'English',
6767
'es-419': 'Español',
@@ -83,7 +83,7 @@ export function languageKeyToLabel(lang) {
8383

8484
export function languageKeyToDateLocale(lang) {
8585
const languageMap = {
86-
be,
86+
bn,
8787
de,
8888
'en-US': enUS,
8989
'es-419': es,

client/modules/IDE/actions/assets.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import apiClient from '../../../utils/apiClient';
1+
import { apiClient } from '../../../utils/apiClient';
22
import * as ActionTypes from '../../../constants';
33
import { startLoader, stopLoader } from '../reducers/loading';
44
import { assetsActions } from '../reducers/assets';

client/modules/IDE/actions/collections.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import browserHistory from '../../../browserHistory';
2-
import apiClient from '../../../utils/apiClient';
2+
import { apiClient } from '../../../utils/apiClient';
33
import * as ActionTypes from '../../../constants';
44
import { startLoader, stopLoader } from '../reducers/loading';
55
import { setToastText, showToast } from './toast';

client/modules/IDE/actions/files.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import objectID from 'bson-objectid';
22
import blobUtil from 'blob-util';
3-
import apiClient from '../../../utils/apiClient';
3+
import { apiClient } from '../../../utils/apiClient';
44
import * as ActionTypes from '../../../constants';
55
import {
66
setUnsavedChanges,

client/modules/IDE/actions/preferences.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import i18next from 'i18next';
2-
import apiClient from '../../../utils/apiClient';
2+
import { apiClient } from '../../../utils/apiClient';
33
import * as ActionTypes from '../../../constants';
44

55
function updatePreferences(formParams, dispatch) {

client/modules/IDE/actions/project.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import objectID from 'bson-objectid';
22
import each from 'async/each';
33
import { isEqual } from 'lodash';
44
import browserHistory from '../../../browserHistory';
5-
import apiClient from '../../../utils/apiClient';
6-
import getConfig from '../../../utils/getConfig';
5+
import { apiClient } from '../../../utils/apiClient';
6+
import { getConfig } from '../../../utils/getConfig';
77
import * as ActionTypes from '../../../constants';
88
import { showToast, setToastText } from './toast';
99
import {
@@ -308,6 +308,8 @@ export function cloneProject(project) {
308308
(file, callback) => {
309309
if (
310310
file.url &&
311+
S3_BUCKET &&
312+
S3_BUCKET_URL_BASE &&
311313
(file.url.includes(S3_BUCKET_URL_BASE) ||
312314
file.url.includes(S3_BUCKET))
313315
) {

client/modules/IDE/actions/projects.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import apiClient from '../../../utils/apiClient';
1+
import { apiClient } from '../../../utils/apiClient';
22
import * as ActionTypes from '../../../constants';
33
import { startLoader, stopLoader } from '../reducers/loading';
44

client/modules/IDE/actions/uploader.js

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
import { TEXT_FILE_REGEX } from '../../../../server/utils/fileUtils';
2-
import apiClient from '../../../utils/apiClient';
3-
import getConfig from '../../../utils/getConfig';
2+
import { apiClient } from '../../../utils/apiClient';
3+
import { getConfig } from '../../../utils/getConfig';
4+
import { isTestEnvironment } from '../../../utils/checkTestEnv';
45
import { handleCreateFile } from './files';
56

7+
const s3BucketUrlBase = getConfig('S3_BUCKET_URL_BASE');
8+
const awsRegion = getConfig('AWS_REGION');
9+
const s3Bucket = getConfig('S3_BUCKET');
10+
11+
if (!isTestEnvironment && !s3BucketUrlBase && !(awsRegion && s3Bucket)) {
12+
throw new Error(`S3 bucket address not configured.
13+
Configure either S3_BUCKET_URL_BASE or both AWS_REGION & S3_BUCKET in env vars`);
14+
}
15+
616
export const s3BucketHttps =
7-
getConfig('S3_BUCKET_URL_BASE') ||
8-
`https://s3-${getConfig('AWS_REGION')}.amazonaws.com/${getConfig(
9-
'S3_BUCKET'
10-
)}/`;
17+
s3BucketUrlBase || `https://s3-${awsRegion}.amazonaws.com/${s3Bucket}/`;
18+
1119
const MAX_LOCAL_FILE_SIZE = 80000; // bytes, aka 80 KB
1220

1321
function isS3Upload(file) {

0 commit comments

Comments
 (0)