mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-19 18:18:27 -05:00
refactor: create shared workspace (#51454)
This commit is contained in:
committed by
GitHub
parent
3c0c14b427
commit
391fc2e34d
@@ -3,11 +3,10 @@ client/.cache/**
|
||||
client/public/**
|
||||
api-server/src/public/**
|
||||
api-server/lib/**
|
||||
config/i18n.js
|
||||
config/misc.js
|
||||
config/certification-settings.js
|
||||
config/donation-settings.js
|
||||
config/superblocks.js
|
||||
shared/config/i18n.js
|
||||
shared/config/certification-settings.js
|
||||
shared/config/donation-settings.js
|
||||
shared/config/superblocks.js
|
||||
web/**
|
||||
docs/**/*.md
|
||||
tools/ui-components/dist/**
|
||||
|
||||
@@ -68,10 +68,9 @@
|
||||
"./client/tsconfig.json",
|
||||
"./tsconfig.json",
|
||||
"./api/tsconfig.json",
|
||||
"./config/tsconfig.json",
|
||||
"./shared/tsconfig.json",
|
||||
"./tools/ui-components/tsconfig.json",
|
||||
"./tools/client-plugins/browser-scripts/tsconfig.json",
|
||||
"./utils/tsconfig.json",
|
||||
"./web/tsconfig.json",
|
||||
"./curriculum-server/tsconfig.json",
|
||||
"./cypress/tsconfig.json",
|
||||
|
||||
2
.github/labeler.yml
vendored
2
.github/labeler.yml
vendored
@@ -22,4 +22,4 @@
|
||||
- docs/i18n/**/*
|
||||
- client/i18n/**/*
|
||||
- config/crowdin/**/*
|
||||
- config/i18n/**/*
|
||||
- shared/config/i18n/**/*
|
||||
|
||||
@@ -327,7 +327,7 @@ jobs:
|
||||
run: |
|
||||
echo pnpm version $(pnpm -v)
|
||||
pnpm install
|
||||
pnpm run create:config
|
||||
pnpm run create:shared
|
||||
pnpm run build:curriculum
|
||||
pnpm run build:server
|
||||
|
||||
|
||||
2
.github/workflows/e2e-mobile.yml
vendored
2
.github/workflows/e2e-mobile.yml
vendored
@@ -47,7 +47,7 @@ jobs:
|
||||
- name: Install and Build
|
||||
run: |
|
||||
pnpm install
|
||||
pnpm run create:config
|
||||
pnpm run create:shared
|
||||
pnpm run build:curriculum
|
||||
|
||||
- name: Generate mobile test files
|
||||
|
||||
2
.github/workflows/e2e-playwright.yml
vendored
2
.github/workflows/e2e-playwright.yml
vendored
@@ -124,7 +124,7 @@ jobs:
|
||||
- name: Install and Build
|
||||
run: |
|
||||
pnpm install
|
||||
pnpm run create:config
|
||||
pnpm run create:shared
|
||||
pnpm run build:curriculum
|
||||
pnpm run build:server
|
||||
|
||||
|
||||
2
.github/workflows/e2e-web.yml
vendored
2
.github/workflows/e2e-web.yml
vendored
@@ -130,7 +130,7 @@ jobs:
|
||||
- name: Install and Build
|
||||
run: |
|
||||
pnpm install
|
||||
pnpm run create:config
|
||||
pnpm run create:shared
|
||||
pnpm run build:curriculum
|
||||
pnpm run build:server
|
||||
|
||||
|
||||
10
.github/workflows/node.js-tests.yml
vendored
10
.github/workflows/node.js-tests.yml
vendored
@@ -64,7 +64,7 @@ jobs:
|
||||
run: |
|
||||
echo pnpm version $(pnpm -v)
|
||||
pnpm install
|
||||
pnpm run create:config
|
||||
pnpm run create:shared
|
||||
npm i --prefix=curriculum-server
|
||||
npm i --prefix=web
|
||||
pnpm run build:curriculum
|
||||
@@ -144,7 +144,7 @@ jobs:
|
||||
run: |
|
||||
echo pnpm version $(pnpm -v)
|
||||
pnpm install
|
||||
pnpm run create:config
|
||||
pnpm run create:shared
|
||||
pnpm run build:curriculum
|
||||
|
||||
- name: Run Tests
|
||||
@@ -192,7 +192,7 @@ jobs:
|
||||
run: |
|
||||
echo pnpm version $(pnpm -v)
|
||||
pnpm install
|
||||
pnpm run create:config
|
||||
pnpm run create:shared
|
||||
pnpm run build:curriculum
|
||||
|
||||
- name: Run Tests
|
||||
@@ -241,7 +241,7 @@ jobs:
|
||||
run: |
|
||||
echo pnpm version $(pnpm -v)
|
||||
pnpm install
|
||||
pnpm run create:config
|
||||
pnpm run create:shared
|
||||
pnpm run build:curriculum
|
||||
|
||||
- name: Run Tests
|
||||
@@ -292,7 +292,7 @@ jobs:
|
||||
run: |
|
||||
echo pnpm version $(pnpm -v)
|
||||
pnpm install
|
||||
pnpm run create:config
|
||||
pnpm run create:shared
|
||||
|
||||
# DONT REMOVE THIS STEP.
|
||||
# TODO: Refactor and use re-usable workflow and shared artifacts
|
||||
|
||||
@@ -145,7 +145,7 @@ jobs:
|
||||
- name: Install and Build
|
||||
run: |
|
||||
pnpm install
|
||||
pnpm run create:config
|
||||
pnpm run create:shared
|
||||
pnpm run build:curriculum
|
||||
pnpm run build:server
|
||||
|
||||
|
||||
23
.gitignore
vendored
23
.gitignore
vendored
@@ -157,24 +157,15 @@ jspm_packages/
|
||||
.netlify
|
||||
|
||||
### Generated config files ###
|
||||
config/env.json
|
||||
config/curriculum.json
|
||||
config/i18n.js
|
||||
config/misc.js
|
||||
config/certification-settings.js
|
||||
config/donation-settings.js
|
||||
config/superblocks.js
|
||||
config/superblocks.test.js
|
||||
config/challenge-types.js
|
||||
config/constants.js
|
||||
shared/config/curriculum.json
|
||||
shared/config/*.js
|
||||
|
||||
### Generated utils files ###
|
||||
utils/index.js
|
||||
utils/get-lines.js
|
||||
utils/get-lines.test.js
|
||||
utils/validate.js
|
||||
utils/validate.test.js
|
||||
utils/is-audited.js
|
||||
shared/utils/get-lines.js
|
||||
shared/utils/get-lines.test.js
|
||||
shared/utils/validate.js
|
||||
shared/utils/validate.test.js
|
||||
shared/utils/is-audited.js
|
||||
|
||||
### Old Generated files ###
|
||||
# These files are no longer generated by the client, but can
|
||||
|
||||
@@ -6,14 +6,14 @@ client/config/browser-scripts/*.json
|
||||
**/*fixtures*
|
||||
curriculum/challenges/_meta/*/*
|
||||
curriculum/challenges/**/*
|
||||
config/**/*.json
|
||||
config/*.js
|
||||
utils/index.js
|
||||
utils/get-lines.js
|
||||
utils/get-lines.test.js
|
||||
utils/validate.js
|
||||
utils/validate.test.js
|
||||
utils/is-audited.js
|
||||
client/config/*.json
|
||||
shared/config/*.js
|
||||
shared/config/curriculum.json
|
||||
shared/utils/get-lines.js
|
||||
shared/utils/get-lines.test.js
|
||||
shared/utils/validate.js
|
||||
shared/utils/validate.test.js
|
||||
shared/utils/is-audited.js
|
||||
pnpm-lock.yaml
|
||||
web/.next
|
||||
curriculum-server/data/curriculum.json
|
||||
|
||||
@@ -15,7 +15,7 @@ import uuid from 'uuid/v4';
|
||||
import { isEmail } from 'validator';
|
||||
|
||||
import { isProfane } from 'no-profanity';
|
||||
import { blocklistedUsernames } from '../../../../config/constants';
|
||||
import { blocklistedUsernames } from '../../../../shared/config/constants';
|
||||
|
||||
import { wrapHandledError } from '../../server/utils/create-handled-error.js';
|
||||
import {
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
oldDataVizId,
|
||||
currentCertifications,
|
||||
upcomingCertifications
|
||||
} from '../../../../config/certification-settings';
|
||||
} from '../../../../shared/config/certification-settings';
|
||||
import { reportError } from '../middlewares/sentry-error-handler.js';
|
||||
|
||||
import { deprecatedEndpoint } from '../utils/disabled-endpoints';
|
||||
|
||||
@@ -17,7 +17,7 @@ import fetch from 'node-fetch';
|
||||
import jwt from 'jsonwebtoken';
|
||||
|
||||
import { jwtSecret } from '../../../config/secrets';
|
||||
import { challengeTypes } from '../../../../config/challenge-types';
|
||||
import { challengeTypes } from '../../../../shared/config/challenge-types';
|
||||
|
||||
import {
|
||||
fixPartiallyCompletedChallengeItem,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import debug from 'debug';
|
||||
import Stripe from 'stripe';
|
||||
|
||||
import { donationSubscriptionConfig } from '../../../../config/donation-settings';
|
||||
import { donationSubscriptionConfig } from '../../../../shared/config/donation-settings';
|
||||
import keys from '../../../config/secrets';
|
||||
import {
|
||||
getAsyncPaypalToken,
|
||||
|
||||
@@ -3,7 +3,7 @@ import { check } from 'express-validator';
|
||||
import _ from 'lodash';
|
||||
import isURL from 'validator/lib/isURL';
|
||||
|
||||
import { isValidUsername } from '../../../../utils/validate';
|
||||
import { isValidUsername } from '../../../../shared/utils/validate';
|
||||
import { alertTypes } from '../../common/utils/flash.js';
|
||||
import {
|
||||
deprecatedEndpoint,
|
||||
|
||||
@@ -2,7 +2,7 @@ import { PassportConfigurator } from '@freecodecamp/loopback-component-passport'
|
||||
import dedent from 'dedent';
|
||||
import passport from 'passport';
|
||||
|
||||
import { availableLangs } from '../../../config/i18n';
|
||||
import { availableLangs } from '../../../shared/config/i18n';
|
||||
import { jwtSecret } from '../../config/secrets';
|
||||
import passportProviders from './passport-providers';
|
||||
import { setAccessTokenToResponse } from './utils/getSetAccessToken';
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import axios from 'axios';
|
||||
import debug from 'debug';
|
||||
import isEmail from 'validator/lib/isEmail';
|
||||
import { donationSubscriptionConfig } from '../../../../config/donation-settings';
|
||||
import { donationSubscriptionConfig } from '../../../../shared/config/donation-settings';
|
||||
import keys from '../../../config/secrets';
|
||||
|
||||
const log = debug('fcc:boot:donate');
|
||||
|
||||
@@ -7,7 +7,7 @@ import { flatten } from 'lodash';
|
||||
// collected.
|
||||
|
||||
// eslint-disable-next-line import/no-unresolved
|
||||
import curriculum from '../../../../config/curriculum.json';
|
||||
import curriculum from '../../../../shared/config/curriculum.json';
|
||||
|
||||
export function getChallenges() {
|
||||
return Object.keys(curriculum)
|
||||
|
||||
@@ -2,7 +2,7 @@ const jwt = require('jsonwebtoken');
|
||||
const { allowedOrigins } = require('../../../config/cors-settings');
|
||||
// process.env.HOME_LOCATION is being used as a fallback here. If the one
|
||||
// provided by the client is invalid we default to this.
|
||||
const { availableLangs } = require('../../../../config/i18n');
|
||||
const { availableLangs } = require('../../../../shared/config/i18n');
|
||||
|
||||
function getReturnTo(
|
||||
encryptedParams,
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
durationKeysConfig,
|
||||
donationOneTimeConfig,
|
||||
donationSubscriptionConfig
|
||||
} from '../../../../config/donation-settings';
|
||||
} from '../../../../shared/config/donation-settings';
|
||||
|
||||
export function validStripeForm(amount, duration, email) {
|
||||
return isEmail('' + email) &&
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||
import { omit } from 'lodash';
|
||||
import { challengeTypes } from '../../../config/challenge-types';
|
||||
import { challengeTypes } from '../../../shared/config/challenge-types';
|
||||
import { devLogin, setupServer, superRequest } from '../../jest.utils';
|
||||
|
||||
const isValidChallengeCompletionErrorMsg = {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { type FastifyPluginCallbackTypebox } from '@fastify/type-provider-typebox';
|
||||
import jwt from 'jsonwebtoken';
|
||||
import { uniqBy } from 'lodash';
|
||||
import { challengeTypes } from '../../../config/challenge-types';
|
||||
import { challengeTypes } from '../../../shared/config/challenge-types';
|
||||
import { schemas } from '../schemas';
|
||||
import {
|
||||
jsCertProjectIds,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { type FastifyPluginCallbackTypebox } from '@fastify/type-provider-typebox';
|
||||
import { isProfane } from 'no-profanity';
|
||||
import { isValidUsername } from '../../../utils/validate';
|
||||
import { blocklistedUsernames } from '../../../config/constants';
|
||||
import { isValidUsername } from '../../../shared/utils/validate';
|
||||
import { blocklistedUsernames } from '../../../shared/config/constants';
|
||||
import { schemas } from '../schemas';
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { user } from '@prisma/client';
|
||||
import { FastifyInstance } from 'fastify';
|
||||
import { omit, pick } from 'lodash';
|
||||
import { challengeTypes } from '../../../config/challenge-types';
|
||||
import { challengeTypes } from '../../../shared/config/challenge-types';
|
||||
import { getChallenges } from './get-challenges';
|
||||
|
||||
export const jsCertProjectIds = [
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
// redirectToCurrentChallenge and, instead, only report the current challenge id
|
||||
// via the user object, then we should *not* store this so it can be garbage
|
||||
// collected.
|
||||
import curriculum from '../../../config/curriculum.json';
|
||||
import { SuperBlocks } from '../../../config/superblocks';
|
||||
import curriculum from '../../../shared/config/curriculum.json';
|
||||
import { SuperBlocks } from '../../../shared/config/superblocks';
|
||||
|
||||
type Curriculum = { [keyValue in SuperBlocks]?: CurriculumProps };
|
||||
|
||||
|
||||
4
client/.gitignore
vendored
4
client/.gitignore
vendored
@@ -18,3 +18,7 @@ i18n/locales/**/trending.json
|
||||
# TODO: Remove once you've figured out why it's generated.
|
||||
# JS that probably should not be generated
|
||||
src/components/Donation/types.js
|
||||
|
||||
# Config
|
||||
|
||||
config/env.json
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
currentCertifications,
|
||||
upcomingCertifications,
|
||||
legacyCertifications
|
||||
} from '../../config/certification-settings';
|
||||
} from '../../shared/config/certification-settings';
|
||||
import {
|
||||
currentCertTitles,
|
||||
upcomingCertTitles,
|
||||
|
||||
@@ -3,8 +3,8 @@ import {
|
||||
legacyCertifications,
|
||||
upcomingCertifications,
|
||||
currentCertifications
|
||||
} from '../../config/certification-settings';
|
||||
import config from '../../config/env.json';
|
||||
} from '../../shared/config/certification-settings';
|
||||
import config from '../config/env.json';
|
||||
|
||||
const { showUpcomingChanges } = config;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const path = require('path');
|
||||
const envData = require('../config/env.json');
|
||||
const envData = require('./config/env.json');
|
||||
const {
|
||||
buildChallenges,
|
||||
replaceChallengeNode,
|
||||
|
||||
@@ -4,7 +4,7 @@ const { createFilePath } = require('gatsby-source-filesystem');
|
||||
const uniq = require('lodash/uniq');
|
||||
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
|
||||
const webpack = require('webpack');
|
||||
const env = require('../config/env.json');
|
||||
const env = require('./config/env.json');
|
||||
|
||||
const {
|
||||
createChallengePages,
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
import i18n from 'i18next';
|
||||
import { initReactI18next } from 'react-i18next';
|
||||
|
||||
const envData = require('../../config/env.json');
|
||||
const { i18nextCodes } = require('../../config/i18n');
|
||||
const envData = require('../config/env.json');
|
||||
const { i18nextCodes } = require('../../shared/config/i18n');
|
||||
|
||||
const { clientLocale } = envData;
|
||||
|
||||
@@ -20,35 +20,35 @@ i18n.use(initReactI18next).init({
|
||||
resources: {
|
||||
[i18nextCode]: {
|
||||
translations: preval`
|
||||
const envData = require('../../config/env.json');
|
||||
const envData = require('../config/env.json');
|
||||
const { clientLocale } = envData;
|
||||
if (clientLocale !== 'english') {
|
||||
module.exports = require('./locales/' + clientLocale + '/translations.json');
|
||||
}
|
||||
`,
|
||||
trending: preval`
|
||||
const envData = require('../../config/env.json');
|
||||
const envData = require('../config/env.json');
|
||||
const { clientLocale } = envData;
|
||||
if (clientLocale !== 'english') {
|
||||
module.exports = require('./locales/' + clientLocale + '/trending.json');
|
||||
}
|
||||
`,
|
||||
intro: preval`
|
||||
const envData = require('../../config/env.json');
|
||||
const envData = require('../config/env.json');
|
||||
const { clientLocale } = envData;
|
||||
if (clientLocale !== 'english') {
|
||||
module.exports = require('./locales/' + clientLocale + '/intro.json');
|
||||
}
|
||||
`,
|
||||
metaTags: preval`
|
||||
const envData = require('../../config/env.json');
|
||||
const envData = require('../config/env.json');
|
||||
const { clientLocale } = envData;
|
||||
if (clientLocale !== 'english') {
|
||||
module.exports = require('./locales/' + clientLocale + '/meta-tags.json');
|
||||
}
|
||||
`,
|
||||
links: preval`
|
||||
const envData = require('../../config/env.json');
|
||||
const envData = require('../config/env.json');
|
||||
const { clientLocale } = envData;
|
||||
if (clientLocale !== 'english') {
|
||||
module.exports = require('./locales/' + clientLocale + '/links.json');
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import fs from 'fs';
|
||||
import { setup } from 'jest-json-schema-extended';
|
||||
import { availableLangs, LangNames, LangCodes } from '../../config/i18n';
|
||||
import { SuperBlocks } from '../../config/superblocks';
|
||||
import { availableLangs, LangNames, LangCodes } from '../../shared/config/i18n';
|
||||
import { SuperBlocks } from '../../shared/config/superblocks';
|
||||
import intro from './locales/english/intro.json';
|
||||
|
||||
setup();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import path from 'path';
|
||||
import { readFile } from 'fs/promises';
|
||||
import { availableLangs } from '../../config/i18n';
|
||||
import { availableLangs } from '../../shared/config/i18n';
|
||||
import introSchema from './locales/english/intro.json';
|
||||
import linksSchema from './locales/english/links.json';
|
||||
import metaTagsSchema from './locales/english/meta-tags.json';
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
"build": "cross-env NODE_OPTIONS=\"--max-old-space-size=7168\" gatsby build --prefix-paths",
|
||||
"build:scripts": "pnpm run -F=browser-scripts build",
|
||||
"clean": "gatsby clean",
|
||||
"common-setup": "pnpm -w run create:config && pnpm -w run create:utils && pnpm run create:env && pnpm run create:trending && pnpm run build:components-library",
|
||||
"common-setup": "pnpm -w run create:shared && pnpm run create:env && pnpm run create:trending && pnpm run build:components-library",
|
||||
"create:env": "cross-env DEBUG=fcc:* ts-node ./tools/create-env.ts",
|
||||
"create:trending": "ts-node ./tools/download-trending.ts",
|
||||
"predevelop": "pnpm run common-setup && pnpm run build:scripts --env development",
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { GatsbyLinkProps } from 'gatsby';
|
||||
const gatsby: NodeModule = jest.requireActual('gatsby');
|
||||
|
||||
import envData from '../../../config/env.json';
|
||||
import envData from '../../config/env.json';
|
||||
|
||||
const { clientLocale } = envData;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
prodAnalyticsESId
|
||||
} from '../../config/analytics-settings';
|
||||
|
||||
import envData from '../../../config/env.json';
|
||||
import envData from '../../config/env.json';
|
||||
|
||||
const { deploymentEnv, clientLocale } = envData;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { SuperBlocks } from '../../../../config/superblocks';
|
||||
import { SuperBlocks } from '../../../../shared/config/superblocks';
|
||||
import APIIcon from './api';
|
||||
import D3Icon from './d3';
|
||||
import DatabaseIcon from './database';
|
||||
|
||||
@@ -8,8 +8,8 @@ import { bindActionCreators, Dispatch } from 'redux';
|
||||
import { createSelector } from 'reselect';
|
||||
|
||||
import { Container } from '@freecodecamp/ui';
|
||||
import envData from '../../../config/env.json';
|
||||
import { getLangCode } from '../../../config/i18n';
|
||||
import envData from '../../config/env.json';
|
||||
import { getLangCode } from '../../../shared/config/i18n';
|
||||
import FreeCodeCampLogo from '../assets/icons/freecodecamp';
|
||||
import MicrosoftLogo from '../assets/icons/microsoft-logo';
|
||||
import DonateForm from '../components/Donation/donate-form';
|
||||
@@ -35,12 +35,12 @@ import {
|
||||
standardErrorMessage
|
||||
} from '../utils/error-messages';
|
||||
|
||||
import { PaymentContext } from '../../../config/donation-settings';
|
||||
import { PaymentContext } from '../../../shared/config/donation-settings';
|
||||
import ribbon from '../assets/images/ribbon.svg';
|
||||
import {
|
||||
certTypes,
|
||||
certTypeTitleMap
|
||||
} from '../../../config/certification-settings';
|
||||
} from '../../../shared/config/certification-settings';
|
||||
import ShowProjectLinks from './show-project-links';
|
||||
|
||||
const { clientLocale } = envData;
|
||||
|
||||
@@ -18,7 +18,7 @@ import ExamResultsModal from '../components/SolutionViewer/exam-results-modal';
|
||||
|
||||
import { openModal } from '../templates/Challenges/redux/actions';
|
||||
|
||||
import { regeneratePathAndHistory } from '../../../utils/polyvinyl';
|
||||
import { regeneratePathAndHistory } from '../../../shared/utils/polyvinyl';
|
||||
import '../components/layouts/project-links.css';
|
||||
interface ShowProjectLinksProps {
|
||||
certName: string;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// @ts-nocheck Likely need to not use ShallowRenderer
|
||||
import React from 'react';
|
||||
import ShallowRenderer from 'react-test-renderer/shallow';
|
||||
import envData from '../../../config/env.json';
|
||||
import envData from '../../config/env.json';
|
||||
|
||||
import { ShowSettings } from './show-settings';
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import { connect } from 'react-redux';
|
||||
import { createSelector } from 'reselect';
|
||||
|
||||
import { Container } from '@freecodecamp/ui';
|
||||
import envData from '../../../config/env.json';
|
||||
import envData from '../../config/env.json';
|
||||
import { createFlashMessage } from '../components/Flash/redux';
|
||||
import { Loader, Spacer } from '../components/helpers';
|
||||
import Certification from '../components/settings/certification';
|
||||
|
||||
@@ -5,7 +5,7 @@ import Helmet from 'react-helmet';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { Container } from '@freecodecamp/ui';
|
||||
import envData from '../../../config/env.json';
|
||||
import envData from '../../config/env.json';
|
||||
import { Spacer } from '../components/helpers';
|
||||
import FullWidthRow from '../components/helpers/full-width-row';
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
defaultDonation,
|
||||
modalDefaultDonation,
|
||||
type DonationConfig
|
||||
} from '../../../../config/donation-settings';
|
||||
} from '../../../../shared/config/donation-settings';
|
||||
import { defaultDonationFormState } from '../../redux';
|
||||
import { updateDonationFormState, postCharge } from '../../redux/actions';
|
||||
import {
|
||||
|
||||
@@ -7,7 +7,7 @@ import { useFeature } from '@growthbook/growthbook-react';
|
||||
import { goToAnchor } from 'react-scrollable-anchor';
|
||||
import { bindActionCreators, Dispatch, AnyAction } from 'redux';
|
||||
import { createSelector } from 'reselect';
|
||||
import { PaymentContext } from '../../../../config/donation-settings';
|
||||
import { PaymentContext } from '../../../../shared/config/donation-settings';
|
||||
import BearProgressModal from '../../assets/images/components/bear-progress-modal';
|
||||
import BearBlockCompletion from '../../assets/images/components/bear-block-completion-modal';
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ import {
|
||||
donationUrls,
|
||||
patreonDefaultPledgeAmount,
|
||||
PaymentProvider
|
||||
} from '../../../../config/donation-settings';
|
||||
import envData from '../../../../config/env.json';
|
||||
} from '../../../../shared/config/donation-settings';
|
||||
import envData from '../../../config/env.json';
|
||||
import PatreonLogo from '../../assets/images/components/patreon-logo';
|
||||
import { PostPayment } from './types';
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ import {
|
||||
PaymentProvider,
|
||||
type DonationDuration,
|
||||
type DonationAmount
|
||||
} from '../../../../config/donation-settings';
|
||||
import envData from '../../../../config/env.json';
|
||||
} from '../../../../shared/config/donation-settings';
|
||||
import envData from '../../../config/env.json';
|
||||
import { userSelector, signInLoadingSelector } from '../../redux/selectors';
|
||||
import { Themes } from '../settings/theme';
|
||||
import { DonationApprovalData, PostPayment } from './types';
|
||||
|
||||
@@ -13,8 +13,8 @@ import type {
|
||||
} from '@stripe/stripe-js';
|
||||
import React, { useState } from 'react';
|
||||
|
||||
import { PaymentProvider } from '../../../../config/donation-settings';
|
||||
import envData from '../../../../config/env.json';
|
||||
import { PaymentProvider } from '../../../../shared/config/donation-settings';
|
||||
import envData from '../../../config/env.json';
|
||||
import { Themes } from '../settings/theme';
|
||||
import { DonationApprovalData, PostPayment } from './types';
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ import {
|
||||
import { Stripe, loadStripe } from '@stripe/stripe-js';
|
||||
import type { Token, PaymentRequest } from '@stripe/stripe-js';
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import envData from '../../../../config/env.json';
|
||||
import envData from '../../../config/env.json';
|
||||
import { Themes } from '../settings/theme';
|
||||
import { PaymentProvider } from '../../../../config/donation-settings';
|
||||
import { PaymentProvider } from '../../../../shared/config/donation-settings';
|
||||
import { DonationApprovalData, PostPayment } from './types';
|
||||
|
||||
const { stripePublicKey }: { stripePublicKey: string | null } = envData;
|
||||
|
||||
@@ -2,13 +2,13 @@ import React, { useState, useRef, useEffect } from 'react';
|
||||
import type { TFunction } from 'i18next';
|
||||
import { connect } from 'react-redux';
|
||||
import { withTranslation } from 'react-i18next';
|
||||
import { clientLocale } from '../../../../../config/env.json';
|
||||
import { clientLocale } from '../../../../config/env.json';
|
||||
import {
|
||||
availableLangs,
|
||||
LangNames,
|
||||
LangCodes,
|
||||
hiddenLangs
|
||||
} from '../../../../../config/i18n';
|
||||
} from '../../../../../shared/config/i18n';
|
||||
import { hardGoTo as navigate } from '../../../redux/actions';
|
||||
import createLanguageRedirect from '../../create-language-redirect';
|
||||
import LanguageGlobe from '../../../assets/icons/language-globe';
|
||||
|
||||
@@ -6,7 +6,7 @@ import { useTranslation } from 'react-i18next';
|
||||
import { connect } from 'react-redux';
|
||||
import { createSelector } from 'reselect';
|
||||
|
||||
import envData from '../../../../../config/env.json';
|
||||
import envData from '../../../../config/env.json';
|
||||
import { isSignedInSelector } from '../../../redux/selectors';
|
||||
|
||||
const { apiLocation, homeLocation } = envData;
|
||||
|
||||
@@ -8,7 +8,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import React, { Fragment } from 'react';
|
||||
import { useTranslation, withTranslation } from 'react-i18next';
|
||||
import { connect } from 'react-redux';
|
||||
import { radioLocation } from '../../../../../config/env.json';
|
||||
import { radioLocation } from '../../../../config/env.json';
|
||||
import { openSignoutModal } from '../../../redux/actions';
|
||||
import { updateMyTheme } from '../../../redux/settings/actions';
|
||||
import { Link } from '../../helpers';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import { Trans, useTranslation } from 'react-i18next';
|
||||
import envData from '../../../../../config/env.json';
|
||||
import envData from '../../../../config/env.json';
|
||||
import { Link, Spacer } from '../../helpers';
|
||||
|
||||
import '../intro.css';
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
SuperBlocks,
|
||||
getFirstNotAuditedSuperBlock,
|
||||
superBlockOrder
|
||||
} from '../../../../config/superblocks';
|
||||
} from '../../../../shared/config/superblocks';
|
||||
import { generateIconComponent } from '../../assets/icons';
|
||||
import LinkButton from '../../assets/icons/link-button';
|
||||
import { Link, Spacer } from '../helpers';
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
curriculumLocale,
|
||||
showUpcomingChanges,
|
||||
showNewCurriculum
|
||||
} from '../../../../config/env.json';
|
||||
} from '../../../config/env.json';
|
||||
|
||||
import './map.css';
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import React from 'react';
|
||||
import { I18nextProvider } from 'react-i18next';
|
||||
import { Provider } from 'react-redux';
|
||||
|
||||
import { i18nextCodes } from '../../../config/i18n';
|
||||
import { i18nextCodes } from '../../../shared/config/i18n';
|
||||
import i18nTestConfig from '../../i18n/config-for-tests';
|
||||
import { createStore } from '../redux/create-store';
|
||||
import AppMountNotifier from './app-mount-notifier';
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
import { connect } from 'react-redux';
|
||||
import { createSelector } from 'reselect';
|
||||
import { isSignedInSelector, userSelector } from '../../redux/selectors';
|
||||
import envData from '../../../../config/env.json';
|
||||
import envData from '../../../config/env.json';
|
||||
import { User } from '../../redux/prop-types';
|
||||
import GrowthBookReduxConnector from './growth-book-redux-connector';
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Col, Row } from '@freecodecamp/react-bootstrap';
|
||||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Container } from '@freecodecamp/ui';
|
||||
import { clientLocale } from '../../../../../config/env.json';
|
||||
import { clientLocale } from '../../../../config/env.json';
|
||||
import {
|
||||
AmazonLogo,
|
||||
AppleLogo,
|
||||
|
||||
@@ -45,7 +45,7 @@ import Footer from '../Footer';
|
||||
import Header from '../Header';
|
||||
import OfflineWarning from '../OfflineWarning';
|
||||
import { Loader } from '../helpers';
|
||||
import envData from '../../../../config/env.json';
|
||||
import envData from '../../../config/env.json';
|
||||
|
||||
// preload common fonts
|
||||
import './fonts.css';
|
||||
|
||||
@@ -10,8 +10,8 @@ import type { TFunction } from 'i18next';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import type { User } from '../../../redux/prop-types';
|
||||
|
||||
import envData from '../../../../../config/env.json';
|
||||
import { getLangCode } from '../../../../../config/i18n';
|
||||
import envData from '../../../../config/env.json';
|
||||
import { getLangCode } from '../../../../../shared/config/i18n';
|
||||
import { AvatarRenderer } from '../../helpers';
|
||||
import Link from '../../helpers/link';
|
||||
import SocialIcons from './social-icons';
|
||||
|
||||
@@ -16,8 +16,8 @@ import './heatmap.css';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
import envData from '../../../../../config/env.json';
|
||||
import { getLangCode } from '../../../../../config/i18n';
|
||||
import envData from '../../../../config/env.json';
|
||||
import { getLangCode } from '../../../../../shared/config/i18n';
|
||||
import { User } from '../../../redux/prop-types';
|
||||
import FullWidthRow from '../../helpers/full-width-row';
|
||||
import Spacer from '../../helpers/spacer';
|
||||
|
||||
@@ -7,10 +7,10 @@ import type { TFunction } from 'i18next';
|
||||
import { withTranslation } from 'react-i18next';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import envData from '../../../../../config/env.json';
|
||||
import { getLangCode } from '../../../../../config/i18n';
|
||||
import envData from '../../../../config/env.json';
|
||||
import { getLangCode } from '../../../../../shared/config/i18n';
|
||||
import { getCertIds, getPathFromID } from '../../../../utils';
|
||||
import { regeneratePathAndHistory } from '../../../../../utils/polyvinyl';
|
||||
import { regeneratePathAndHistory } from '../../../../../shared/utils/polyvinyl';
|
||||
import CertificationIcon from '../../../assets/icons/certification';
|
||||
import { CompletedChallenge } from '../../../redux/prop-types';
|
||||
import ProjectPreviewModal from '../../../templates/Challenges/components/project-preview-modal';
|
||||
|
||||
@@ -7,7 +7,7 @@ import { InstantSearch, Configure } from 'react-instantsearch-dom';
|
||||
import { connect } from 'react-redux';
|
||||
import { useMediaQuery } from 'react-responsive';
|
||||
import { createSelector } from 'reselect';
|
||||
import { algoliaAppId, algoliaAPIKey } from '../../../../config/env.json';
|
||||
import { algoliaAppId, algoliaAPIKey } from '../../../config/env.json';
|
||||
import { newsIndex } from '../../utils/algolia-locale-setup';
|
||||
|
||||
import {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useStaticQuery, graphql } from 'gatsby';
|
||||
import React from 'react';
|
||||
import Helmet from 'react-helmet';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { SuperBlocks } from '../../../../config/superblocks';
|
||||
import { SuperBlocks } from '../../../../shared/config/superblocks';
|
||||
|
||||
interface SEOProps {
|
||||
title?: string;
|
||||
|
||||
@@ -8,7 +8,7 @@ import { createSelector } from 'reselect';
|
||||
import ScrollableAnchor, { configureAnchors } from 'react-scrollable-anchor';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { regeneratePathAndHistory } from '../../../../utils/polyvinyl';
|
||||
import { regeneratePathAndHistory } from '../../../../shared/utils/polyvinyl';
|
||||
import ProjectPreviewModal from '../../templates/Challenges/components/project-preview-modal';
|
||||
import ExamResultsModal from '../SolutionViewer/exam-results-modal';
|
||||
import { openModal } from '../../templates/Challenges/redux/actions';
|
||||
@@ -26,8 +26,8 @@ import { SolutionDisplayWidget } from '../solution-display-widget';
|
||||
import {
|
||||
Certification,
|
||||
certSlugTypeMap
|
||||
} from '../../../../config/certification-settings';
|
||||
import env from '../../../../config/env.json';
|
||||
} from '../../../../shared/config/certification-settings';
|
||||
import env from '../../../config/env.json';
|
||||
|
||||
import {
|
||||
ClaimedCertifications,
|
||||
|
||||
@@ -13,7 +13,7 @@ import { bindActionCreators } from 'redux';
|
||||
import type { Dispatch } from 'redux';
|
||||
import { createSelector } from 'reselect';
|
||||
|
||||
import { isValidUsername } from '../../../../utils/validate';
|
||||
import { isValidUsername } from '../../../../shared/utils/validate';
|
||||
import { usernameValidationSelector } from '../../redux/settings/selectors';
|
||||
import {
|
||||
validateUsername,
|
||||
|
||||
@@ -8,7 +8,7 @@ import { useTranslation } from 'react-i18next';
|
||||
import { Spacer } from '../helpers';
|
||||
import { hardGoTo as navigate, closeSignoutModal } from '../../redux/actions';
|
||||
import { isSignoutModalOpenSelector } from '../../redux/selectors';
|
||||
import { apiLocation } from '../../../../config/env.json';
|
||||
import { apiLocation } from '../../../config/env.json';
|
||||
|
||||
import './signout-modal.css';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import { clientLocale } from '../../config/env.json';
|
||||
import { rtlLangs } from '../../config/i18n';
|
||||
import { clientLocale } from '../config/env.json';
|
||||
import { rtlLangs } from '../../shared/config/i18n';
|
||||
|
||||
interface HTMLProps {
|
||||
body: string;
|
||||
|
||||
@@ -20,7 +20,7 @@ import { Spacer, Loader } from '../components/helpers';
|
||||
import CampersImage from '../components/landing/components/campers-image';
|
||||
import { executeGA } from '../redux/actions';
|
||||
import { signInLoadingSelector, userSelector } from '../redux/selectors';
|
||||
import { PaymentContext } from '../../../config/donation-settings';
|
||||
import { PaymentContext } from '../../../shared/config/donation-settings';
|
||||
|
||||
export interface ExecuteGaArg {
|
||||
event: string;
|
||||
|
||||
@@ -10,7 +10,7 @@ import { Container } from '@freecodecamp/ui';
|
||||
import IntroDescription from '../components/Intro/components/intro-description';
|
||||
import createRedirect from '../components/create-redirect';
|
||||
import { Spacer, Loader, Link } from '../components/helpers';
|
||||
import { apiLocation } from '../../../config/env.json';
|
||||
import { apiLocation } from '../../config/env.json';
|
||||
|
||||
import { acceptTerms } from '../redux/actions';
|
||||
import {
|
||||
|
||||
@@ -12,7 +12,7 @@ import Intro from '../components/Intro';
|
||||
import Map from '../components/Map';
|
||||
import { Spacer } from '../components/helpers';
|
||||
import LearnLayout from '../components/layouts/learn';
|
||||
import { defaultDonation } from '../../../config/donation-settings';
|
||||
import { defaultDonation } from '../../../shared/config/donation-settings';
|
||||
import {
|
||||
isSignedInSelector,
|
||||
userSelector,
|
||||
|
||||
@@ -3,7 +3,7 @@ import { composeWithDevTools } from 'redux-devtools-extension/logOnlyInProductio
|
||||
import { createEpicMiddleware } from 'redux-observable';
|
||||
import createSagaMiddleware from 'redux-saga';
|
||||
|
||||
import envData from '../../../config/env.json';
|
||||
import envData from '../../config/env.json';
|
||||
import { isBrowser } from '../../utils';
|
||||
import rootEpic from './root-epic';
|
||||
import rootReducer from './root-reducer';
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
postChargeStripeCard
|
||||
} from '../utils/ajax';
|
||||
import { stringifyDonationEvents } from '../utils/analytics-strings';
|
||||
import { PaymentProvider } from '../../../config/donation-settings';
|
||||
import { PaymentProvider } from '../../../shared/config/donation-settings';
|
||||
import { actionTypes as appTypes } from './action-types';
|
||||
import {
|
||||
openDonationModal,
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
import store from 'store';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
|
||||
import { challengeTypes } from '../../../config/challenge-types';
|
||||
import { challengeTypes } from '../../../shared/config/challenge-types';
|
||||
import { isGoodXHRStatus } from '../templates/Challenges/utils';
|
||||
import postUpdate$ from '../templates/Challenges/utils/post-update';
|
||||
import { actionTypes } from './action-types';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { HandlerProps } from 'react-reflex';
|
||||
import { SuperBlocks } from '../../../config/superblocks';
|
||||
import { SuperBlocks } from '../../../shared/config/superblocks';
|
||||
import { Themes } from '../components/settings/theme';
|
||||
import { type CertTitle } from '../../config/cert-and-project-map';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { call, put, select, takeEvery } from 'redux-saga/effects';
|
||||
|
||||
import { challengeTypes } from '../../../config/challenge-types';
|
||||
import { challengeTypes } from '../../../shared/config/challenge-types';
|
||||
import { createFlashMessage } from '../components/Flash/redux';
|
||||
import { FlashMessages } from '../components/Flash/redux/flash-messages';
|
||||
import {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Certification } from '../../../config/certification-settings';
|
||||
import { Certification } from '../../../shared/config/certification-settings';
|
||||
import { ns as MainApp } from './action-types';
|
||||
|
||||
export const savedChallengesSelector = state =>
|
||||
|
||||
@@ -12,7 +12,7 @@ import store from 'store';
|
||||
import {
|
||||
certTypeIdMap,
|
||||
certTypes
|
||||
} from '../../../../config/certification-settings';
|
||||
} from '../../../../shared/config/certification-settings';
|
||||
import { createFlashMessage } from '../../components/Flash/redux';
|
||||
import { liveCerts } from '../../../config/cert-and-project-map';
|
||||
import {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { ReflexContainer, ReflexSplitter, ReflexElement } from 'react-reflex';
|
||||
import { createSelector } from 'reselect';
|
||||
import { connect } from 'react-redux';
|
||||
import { sortChallengeFiles } from '../../../../utils/sort-challengefiles';
|
||||
import { challengeTypes } from '../../../../../config/challenge-types';
|
||||
import { challengeTypes } from '../../../../../shared/config/challenge-types';
|
||||
import {
|
||||
ChallengeFile,
|
||||
ChallengeFiles,
|
||||
|
||||
@@ -37,7 +37,7 @@ import { editorNotes } from '../../../utils/tone/editor-notes';
|
||||
import {
|
||||
challengeTypes,
|
||||
isFinalProject
|
||||
} from '../../../../../config/challenge-types';
|
||||
} from '../../../../../shared/config/challenge-types';
|
||||
import {
|
||||
executeChallenge,
|
||||
saveEditorContent,
|
||||
|
||||
@@ -11,7 +11,7 @@ import { randomCompliment } from '../../../../src/utils/get-words';
|
||||
import Help from '../../../assets/icons/help';
|
||||
import Reset from '../../../assets/icons/reset';
|
||||
import { MAX_MOBILE_WIDTH } from '../../../../config/misc';
|
||||
import { apiLocation } from '../../../../../config/env.json';
|
||||
import { apiLocation } from '../../../../config/env.json';
|
||||
import { ChallengeMeta } from '../../../redux/prop-types';
|
||||
import { Share } from '../../../components/share';
|
||||
import { ShareProps } from '../../../components/share/types';
|
||||
|
||||
@@ -9,7 +9,7 @@ import { bindActionCreators, Dispatch } from 'redux';
|
||||
import { createStructuredSelector } from 'reselect';
|
||||
import store from 'store';
|
||||
import { editor } from 'monaco-editor';
|
||||
import { challengeTypes } from '../../../../../config/challenge-types';
|
||||
import { challengeTypes } from '../../../../../shared/config/challenge-types';
|
||||
import LearnLayout from '../../../components/layouts/learn';
|
||||
import { MAX_MOBILE_WIDTH } from '../../../../config/misc';
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import Spacer from '../../../components/helpers/spacer';
|
||||
import LearnLayout from '../../../components/layouts/learn';
|
||||
import ChallengeTitle from '../components/challenge-title';
|
||||
import PrismFormatted from '../components/prism-formatted';
|
||||
import { challengeTypes } from '../../../../../config/challenge-types';
|
||||
import { challengeTypes } from '../../../../../shared/config/challenge-types';
|
||||
import CompletionModal from '../components/completion-modal';
|
||||
import GreenPass from '../../../assets/icons/green-pass';
|
||||
import HelpModal from '../components/help-modal';
|
||||
@@ -45,7 +45,7 @@ import {
|
||||
import ProjectToolPanel from '../projects/tool-panel';
|
||||
import SolutionForm from '../projects/solution-form';
|
||||
import { FlashMessages } from '../../../components/Flash/redux/flash-messages';
|
||||
import { SuperBlocks } from '../../../../../config/superblocks';
|
||||
import { SuperBlocks } from '../../../../../shared/config/superblocks';
|
||||
import { CodeAllyDown } from '../../../components/growth-book/codeally-down';
|
||||
|
||||
import './codeally.css';
|
||||
|
||||
@@ -6,7 +6,7 @@ import { Trans, withTranslation } from 'react-i18next';
|
||||
import { connect } from 'react-redux';
|
||||
import { bindActionCreators, Dispatch } from 'redux';
|
||||
|
||||
import envData from '../../../../../config/env.json';
|
||||
import envData from '../../../../config/env.json';
|
||||
import { executeGA } from '../../../redux/actions';
|
||||
import { createQuestion, closeModal } from '../redux/actions';
|
||||
import { isHelpModalOpenSelector } from '../redux/selectors';
|
||||
|
||||
@@ -24,7 +24,7 @@ import {
|
||||
challengeTestsSelector
|
||||
} from '../redux/selectors';
|
||||
import './hotkeys.css';
|
||||
import { isFinalProject } from '../../../../../config/challenge-types';
|
||||
import { isFinalProject } from '../../../../../shared/config/challenge-types';
|
||||
|
||||
const mapStateToProps = createSelector(
|
||||
canFocusEditorSelector,
|
||||
|
||||
@@ -7,7 +7,7 @@ import { useTranslation } from 'react-i18next';
|
||||
import { connect } from 'react-redux';
|
||||
import { bindActionCreators, Dispatch } from 'redux';
|
||||
import { createSelector } from 'reselect';
|
||||
import { challengeTypes } from '../../../../../config/challenge-types';
|
||||
import { challengeTypes } from '../../../../../shared/config/challenge-types';
|
||||
|
||||
import './tool-panel.css';
|
||||
import { openModal, executeChallenge } from '../redux/actions';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import YouTube from 'react-youtube';
|
||||
import envData from '../../../../../config/env.json';
|
||||
import envData from '../../../../config/env.json';
|
||||
import type { BilibiliIds, VideoLocaleIds } from '../../../redux/prop-types';
|
||||
|
||||
// TODO: pull these types from all-langs
|
||||
|
||||
@@ -13,7 +13,7 @@ import { createSelector } from 'reselect';
|
||||
import { Trans, useTranslation } from 'react-i18next';
|
||||
|
||||
import { Spacer } from '../../../components/helpers';
|
||||
import { isMicrosoftTranscriptLink } from '../../../../../utils/validate';
|
||||
import { isMicrosoftTranscriptLink } from '../../../../../shared/utils/validate';
|
||||
import {
|
||||
linkMsUsername,
|
||||
unlinkMsUsername,
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
|
||||
import { withTranslation } from 'react-i18next';
|
||||
import type { WithTranslation } from 'react-i18next';
|
||||
|
||||
import { challengeTypes } from '../../../../../config/challenge-types';
|
||||
import { challengeTypes } from '../../../../../shared/config/challenge-types';
|
||||
import {
|
||||
StrictSolutionForm,
|
||||
ValidatedValues
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
transformHeadTailAndContents,
|
||||
setExt,
|
||||
compileHeadTail
|
||||
} from '../../../../../utils/polyvinyl';
|
||||
} from '../../../../../shared/utils/polyvinyl';
|
||||
import createWorker from '../utils/worker-executor';
|
||||
import { makeCancellable, makeInputAwaitable } from './transform-python';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { createAction } from 'redux-actions';
|
||||
|
||||
import { getLines } from '../../../../../utils/get-lines';
|
||||
import { getLines } from '../../../../../shared/utils/get-lines';
|
||||
import { actionTypes } from './action-types';
|
||||
|
||||
export const createFiles = createAction(
|
||||
|
||||
@@ -3,7 +3,7 @@ import { of } from 'rxjs';
|
||||
import { filter, ignoreElements, map, switchMap, tap } from 'rxjs/operators';
|
||||
import store from 'store';
|
||||
|
||||
import { isPoly, setContent } from '../../../../../utils/polyvinyl';
|
||||
import { isPoly, setContent } from '../../../../../shared/utils/polyvinyl';
|
||||
import { createFlashMessage } from '../../../components/Flash/redux';
|
||||
import { FlashMessages } from '../../../components/Flash/redux/flash-messages';
|
||||
import { savedChallengesSelector } from '../../../redux/selectors';
|
||||
|
||||
@@ -20,7 +20,7 @@ import {
|
||||
challengeTypes,
|
||||
hasNoTests,
|
||||
submitTypes
|
||||
} from '../../../../../config/challenge-types';
|
||||
} from '../../../../../shared/config/challenge-types';
|
||||
import { actionTypes as submitActionTypes } from '../../../redux/action-types';
|
||||
import {
|
||||
allowBlockDonationRequests,
|
||||
|
||||
@@ -2,7 +2,7 @@ import i18next from 'i18next';
|
||||
import { ofType } from 'redux-observable';
|
||||
import { mapTo, tap } from 'rxjs/operators';
|
||||
|
||||
import envData from '../../../../../config/env.json';
|
||||
import envData from '../../../../config/env.json';
|
||||
import { transformEditorLink } from '../utils';
|
||||
import { actionTypes } from './action-types';
|
||||
import { closeModal } from './actions';
|
||||
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
takeLatest
|
||||
} from 'redux-saga/effects';
|
||||
|
||||
import { challengeTypes } from '../../../../../config/challenge-types';
|
||||
import { challengeTypes } from '../../../../../shared/config/challenge-types';
|
||||
import { createFlashMessage } from '../../../components/Flash/redux';
|
||||
import { FlashMessages } from '../../../components/Flash/redux/flash-messages';
|
||||
import {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { isEmpty } from 'lodash-es';
|
||||
import { handleActions } from 'redux-actions';
|
||||
|
||||
import { getLines } from '../../../../../utils/get-lines';
|
||||
import { getLines } from '../../../../../shared/utils/get-lines';
|
||||
import { getTargetEditor } from '../utils/get-target-editor';
|
||||
import { actionTypes, ns } from './action-types';
|
||||
import codeStorageEpic from './code-storage-epic';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { challengeTypes } from '../../../../../config/challenge-types';
|
||||
import { challengeTypes } from '../../../../../shared/config/challenge-types';
|
||||
import {
|
||||
completedChallengesSelector,
|
||||
allChallengesInfoSelector,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { challengeTypes } from '../../../../../config/challenge-types';
|
||||
import { challengeTypes } from '../../../../../shared/config/challenge-types';
|
||||
import frameRunnerData from '../../../../../client/config/browser-scripts/frame-runner.json';
|
||||
import testEvaluatorData from '../../../../../client/config/browser-scripts/test-evaluator.json';
|
||||
import pythonRunnerData from '../../../../../client/config/browser-scripts/python-runner.json';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import envData from '../../../../../config/env.json';
|
||||
import envData from '../../../../config/env.json';
|
||||
import { getGuideUrl } from './index';
|
||||
|
||||
const { forumLocation } = envData;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import i18next from 'i18next';
|
||||
import envData from '../../../../../config/env.json';
|
||||
import envData from '../../../../config/env.json';
|
||||
|
||||
const { forumLocation } = envData;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import Loader from '../../../components/helpers/loader';
|
||||
import Spacer from '../../../components/helpers/spacer';
|
||||
import LearnLayout from '../../../components/layouts/learn';
|
||||
import { ChallengeNode, ChallengeMeta } from '../../../redux/prop-types';
|
||||
import { challengeTypes } from '../../../../../config/challenge-types';
|
||||
import { challengeTypes } from '../../../../../shared/config/challenge-types';
|
||||
import ChallengeDescription from '../components/challenge-description';
|
||||
import Hotkeys from '../components/hotkeys';
|
||||
import VideoPlayer from '../components/video-player';
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user