Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/migration #1672

Merged
merged 164 commits into from
Oct 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
164 commits
Select commit Hold shift + click to select a range
a53ee6b
Migration: Turning app into a single-spa application
Angamanga May 11, 2021
10f0e87
Migration: Adjusting webpack-config to fit single-spa
Angamanga May 11, 2021
09ba0c5
Migration(config): Adding root-config
Angamanga May 17, 2021
a76b12e
Migration(fonts): Removing import of fonts from legacy app (done in r…
Angamanga May 17, 2021
7ecb68f
Migration(svgs): Adding base64-strings instead of urls for svgs
Angamanga May 17, 2021
c472fa7
Migration(setup): Removing unused plugins
Angamanga May 19, 2021
44cf568
Migration(setup): Moving layout-switch back to legacyApp
Angamanga May 19, 2021
e679e4f
Migration(config): Setting bootstrap-config in legacy-app instead of …
Angamanga May 20, 2021
a29c69e
Migration(translations): Making adjustments to get translations and r…
Angamanga Jun 3, 2021
5af11fb
Migration(config): Moving config.js to rootconfig
Angamanga Jun 3, 2021
aeadbf3
Migration(env-variables): Adding utility-module with get backendUrl-f…
Angamanga Jun 10, 2021
b6a7e09
Migration(api): Adding config-endpoint
Angamanga Jun 10, 2021
0638502
Migration(setup): Importing new micro-frontends
Angamanga Jun 10, 2021
cd5f34e
Migration(page-metadata): Adding page-title and page-desc
Angamanga Jun 10, 2021
bab88bd
merge develop into features/migration
Angamanga Jun 16, 2021
863bdd0
MIGRATION(architecture): Moving old app into its own folder
Angamanga Jun 17, 2021
ae9abe9
MIGRATION (linting): Removing annoying lint-hook
Angamanga Jun 17, 2021
00f4a1e
MIGRATION(mode-bar): Fixing login/logout switch
Angamanga Jun 17, 2021
5802ee1
MIGRATION(refactor): renamed folders and moved some config files to r…
Jun 17, 2021
4812ff2
MIGRATION(chore): setup dev scripts and lint legacy app
Jun 17, 2021
bc4e571
MIGRATION(Dependencies): Adding missing dependency
Angamanga Jun 18, 2021
b201809
MIGRATION(chore): npm scripts to build each apps seperately
Jun 19, 2021
69cf0b0
MIGRATION (chore): single spa build flow done
Jun 20, 2021
e8e207c
lint: legacy/gulpfile.babel.js
Jun 20, 2021
30aca3d
MIGRATION (chore): serve all apps from one port using a http proxy an…
Jun 21, 2021
14a2338
cleanup server proxy.js script
Jun 22, 2021
e136396
Merge branch 'feature/migration' into migration/dev-workflow-setup
Jun 28, 2021
705370c
Merge branch 'migration/dev-workflow-setup' into lazy-load-activity
Angamanga Jun 28, 2021
4761365
Proxy.js - change legacy port to 3000
Ifycode Jun 29, 2021
ad6db0d
Install and add oclazyload config
Ifycode Jun 30, 2021
2d59051
Require and add oclazyload to app module
Ifycode Jun 30, 2021
485c300
Isolate code for activity-view
Ifycode Jun 30, 2021
7df197c
Code splitting and lazy loading - activity view
Ifycode Jun 30, 2021
cab81ca
Add actitvity.js to proxy.js
Ifycode Jun 30, 2021
de8dfbe
Arrange, rename and clean up files
Ifycode Jun 30, 2021
8d9456d
Merge pull request #1684 from ushahidi/migration/dev-workflow-setup
Angamanga Jul 1, 2021
cf74c62
MIGRATION(dev-flow): Adjustments to scripts and webpack-config
Angamanga Jul 1, 2021
213044c
Work-in-progress: settings split and lazyload
Ifycode Jul 1, 2021
1298f80
Move importNotify to common folder and other routes to settings module
Ifycode Jul 2, 2021
d039da8
Move activity-routes-lazyload.js content to activity-routes.js
Ifycode Jul 2, 2021
afa5c3a
Move settings state to settings-route from settings-route-lazyload
Ifycode Jul 2, 2021
d92e621
Delete settings.route-lazyload, move its content to settings.route
Ifycode Jul 3, 2021
e93256a
Merge pull request #1687 from Ifycode/lazy-load-activity
Angamanga Jul 5, 2021
41ad1b1
Performance(analysis): Adding webpack-bundle-analyzer
Angamanga Jul 5, 2021
881b92c
Change other-routes.js to settings-list.routes.js
Ifycode Jul 5, 2021
244c8ca
Merge pull request #1689 from ushahidi/bundle-analyzer
Angamanga Jul 12, 2021
5315c9f
Merge pull request #1688 from Ifycode/settings-lazy-load
Angamanga Jul 12, 2021
16b5535
Begin data and map module split
Ifycode Jul 16, 2021
636bbd5
Remove unused directives/files
Ifycode Jul 16, 2021
8161842
Separate data module and route
Ifycode Jul 17, 2021
95343e6
Move missing directives to data-module from post-module file
Ifycode Jul 17, 2021
94a5a0e
Move post-view-noui into map folder
Ifycode Jul 17, 2021
12ee51b
Separate map-module
Ifycode Jul 20, 2021
8b8b86f
Clean up post-module
Ifycode Jul 20, 2021
11ace13
Add post-toolbar to map module - temporary
Ifycode Jul 20, 2021
02a249c
Update post-view-noui controller location in map-routes
Ifycode Jul 20, 2021
5553d04
Clean up post-routes
Ifycode Jul 20, 2021
d11f2ef
Move map-marker icon to map-module
Ifycode Jul 20, 2021
7c675e7
map module: Add mode-context related things in mode-context folder
Ifycode Jul 20, 2021
0f9197e
Fix missing post-toolbar issue
Ifycode Jul 21, 2021
fe82ee6
Adjust map module, post module, post-toolbar
Ifycode Jul 21, 2021
c029d82
Isolate map module
Ifycode Jul 21, 2021
ed736d5
Re-group data-module content
Ifycode Jul 23, 2021
c7f963f
Move detail and modify to data-module, change names to post-detail an…
Ifycode Jul 23, 2021
aeca36a
Move post-lock into post detail and rename post-edit for splitting later
Ifycode Jul 23, 2021
603a765
Move post-edit and post detail routes to data-module
Ifycode Jul 23, 2021
c929b28
Remove post-view-unavailable remnant
Ifycode Jul 23, 2021
33a7bac
Fix broken page - Move main.html and post-create directive to posts
Ifycode Jul 23, 2021
b9e0eb5
Separate data-view-right (with some part of post edit) and collection…
Ifycode Jul 23, 2021
230604a
Move post-card to map-view for now
Ifycode Jul 23, 2021
0f14b1d
Group post-toolbar items together in map-module file
Ifycode Jul 23, 2021
a2db700
Move post-create route to data-view, seperate post-create code
Ifycode Jul 24, 2021
b920b05
Fix paths in data-module, create 'not-yet-grouped' folder
Ifycode Jul 24, 2021
fbf949f
Sort out files common to post edit, detail and create
Ifycode Jul 24, 2021
10ec7ec
Move post-entity.service to post-edit-detail-create folder
Ifycode Jul 25, 2021
f447aae
Isolate data module
Ifycode Jul 25, 2021
1542727
Move settings.survey route to settings.route and lazy load settings m…
Ifycode Jul 25, 2021
a9dc4d1
Separate data routes from module
Ifycode Jul 26, 2021
29529e6
Split data.js bundle with webpack and lazyload data module
Ifycode Jul 26, 2021
25379c3
Fix unknown provider error: move post survey and post lock service to…
Ifycode Jul 26, 2021
aa8c212
lazyload data-module through post-create route
Ifycode Jul 26, 2021
abe273b
data module lazyload comment
Ifycode Jul 26, 2021
103cbed
group post-edit
Ifycode Jul 27, 2021
d4115ac
Move post-filters service to common, and isolate filters
Ifycode Jul 27, 2021
50d952b
Move add-post-text-button and post-view service to data-module (for now)
Ifycode Jul 27, 2021
a2eee2e
Move add-post-text-button and post-view service to data-module (for now)
Ifycode Jul 27, 2021
47787df
Isolate posts module (remnant)
Ifycode Jul 27, 2021
34c4ac3
Move settings.survey.id route to settings.route and lazyload settings…
Ifycode Jul 27, 2021
ee0352b
Separate posts module from post routes
Ifycode Jul 28, 2021
bebdc01
Remove posts routes config from posts module - forgot this
Ifycode Jul 28, 2021
75bfbaf
Split up bundle in webpack
Ifycode Jul 28, 2021
f7ac279
Fix collection service require link in common module
Ifycode Jul 28, 2021
2d7709d
Delete posts module and move collection, filters and svaed searches t…
Ifycode Jul 29, 2021
6a0fa1b
Lazy load settings module from settings controller only
Ifycode Aug 2, 2021
93c7b89
Isolate auth - Move auth into its own folder
Ifycode Aug 3, 2021
8f673a5
Move donation module to common module
Ifycode Aug 3, 2021
51d36ee
Fix for all links to settings not previously working
Ifycode Aug 4, 2021
99cf1bf
Merge pull request #1692 from Ifycode/fix-settings-survey
Angamanga Aug 4, 2021
13a2987
Merge branch 'feature/migration' into split-views
Ifycode Aug 4, 2021
ae886c0
Isolate modebar - make modebar a separate module
Ifycode Aug 6, 2021
3edbd62
Move ushahidi logo related code from common to modebar
Ifycode Aug 6, 2021
9da6cb4
Migration: Setting initial page-metadata + trigger page-title change …
Angamanga Aug 6, 2021
a8b61e2
Merge branch 'develop' into feature/migration
Angamanga Aug 10, 2021
2329395
updating .gitignore
Angamanga Aug 10, 2021
f6e943c
MIGRATION(dev-environment): Adding install-script for all folders
Angamanga Aug 10, 2021
2c756a9
MIGRATION(18n): Adding missing strings
Angamanga Aug 10, 2021
0f134ef
Merge pull request #1693 from Ifycode/posts-to-map
Angamanga Aug 10, 2021
e7b62ef
Merge pull request #1695 from Ifycode/auth-common
Angamanga Aug 10, 2021
0bde1c1
Merge branch 'feature/migration' into isolate-modebar
Angamanga Aug 10, 2021
bdec8cc
Merge pull request #1696 from Ifycode/isolate-modebar
Angamanga Aug 10, 2021
995bbfb
Fix error from last merge
Ifycode Aug 11, 2021
17959b6
Remove unused saved searches files
Ifycode Aug 11, 2021
88bba88
Merge pull request #1698 from Ifycode/saved-searches
Angamanga Aug 11, 2021
77f4d8c
Merge branch 'feature/migration' into migrate-page-settings
Angamanga Aug 11, 2021
b8fee31
Move loading-dots to settings
Ifycode Aug 12, 2021
d6c96af
Move category-selector to settings
Ifycode Aug 12, 2021
cb8a65e
Migration(Donations): Adding monetization-meta tag
Angamanga Aug 13, 2021
80cb151
Move filter-system to map or settings, color-picker to settings
Ifycode Aug 15, 2021
052b951
Remove unused service imports
Ifycode Aug 15, 2021
7870c09
Remove unused service imports
Ifycode Aug 15, 2021
2e1cba4
Remove unused service imports
Ifycode Aug 15, 2021
d968fa6
Remove unused service imports
Ifycode Aug 16, 2021
6c032f9
Move 14 services/endpoints to settings module
Ifycode Aug 16, 2021
f53e729
Move 3 services to auth, map and data respectively
Ifycode Aug 16, 2021
135feb9
Merge pull request #1699 from Ifycode/split-common
Angamanga Aug 16, 2021
bfe8c9d
Merge pull request #1700 from Ifycode/common-services
Angamanga Aug 16, 2021
805e2b5
Remove unused directives
Ifycode Aug 17, 2021
8326877
fix translation-switch directive spelling
Ifycode Aug 17, 2021
ab54e67
Merge branch 'load-fb-ondemand' into migrate-page-settings
Angamanga Aug 18, 2021
e48e25a
MIGRATION(GA-scripts): Moving GA and Google Maps scripts to index.ejs
Angamanga Aug 18, 2021
9764a63
MIGRATION(Page-settings): Adding div for Intercom
Angamanga Aug 18, 2021
5f9bb47
MIGRATION(Page-settings): Removing page-settings from legacy-app
Angamanga Aug 19, 2021
3c30f05
Merge pull request #1704 from ushahidi/migrate-page-settings
Angamanga Aug 19, 2021
e9d4b34
MIGRATION(webpack-config): Updating build-configs for production
Angamanga Aug 19, 2021
31732af
MIGRATION(refactor): Restructuring api-module
Angamanga Aug 19, 2021
ed8f2d9
MIGRATION: Removing duplicate files
Angamanga Aug 19, 2021
70ac9ae
MIGRATION(config): Moving config.json files to ./app folder
Angamanga Aug 19, 2021
5e4aac0
MIGRATION: Adding npm test-script
Angamanga Aug 19, 2021
702bcac
MIGRATION: Adding lint and format-scripts
Angamanga Aug 19, 2021
f206095
MIGRATION: Running format-scripts
Angamanga Aug 19, 2021
bf4ad63
remove unused services
Ifycode Aug 19, 2021
f7dbc30
Merge pull request #1702 from Ifycode/remove-unused
Angamanga Aug 20, 2021
7c1c18c
MIGRATION(linting): Adjusting format-scripts
Angamanga Aug 24, 2021
971a5e8
fix(ci): adjust Dockerfile and Github actions
tuxpiper Aug 26, 2021
ec5aa61
Merge branch 'feature/migration' into services-batch-1
Angamanga Aug 30, 2021
cb27c92
Merge pull request #1701 from Ifycode/services-batch-1
Angamanga Aug 31, 2021
539f9d5
MIGRATION(tests): Running tests without systemjs
Angamanga Sep 7, 2021
826ab63
Merge branch 'feature/migration' of github.com:ushahidi/platform-clie…
Angamanga Sep 7, 2021
8d85c54
MIGRATION(tests): Updating mock-service to reflect previously made ch…
Angamanga Sep 8, 2021
2c1299b
MIGRATION(tests): Deleting tests for removed files
Angamanga Sep 8, 2021
226e4fa
MIGRATION(tests): Updating paths in tests
Angamanga Sep 8, 2021
a77fa58
Merge branch 'develop' into feature/migration
Angamanga Sep 14, 2021
62908df
MIGRATION(skip-to-content): Adding back skip-to-content-link
Angamanga Sep 15, 2021
51b67c7
MIGRATION(Config): Moving bootstrapConfig to root
Angamanga Sep 17, 2021
8a7b182
MIGRATION(PageLoad): Adding css for loading-dots and error-message
Angamanga Sep 17, 2021
0f8e6b3
MIGRATION(PageLoad): Adding loading-dots and error-messages when ente…
Angamanga Sep 17, 2021
a58cc54
Using only one .env file
Angamanga Sep 28, 2021
e8a5577
Using dotenv in legacy-app
Angamanga Sep 30, 2021
e6bae6e
Adjusting scripts
Angamanga Sep 30, 2021
8bff9ba
Merge branch 'develop' into feature/migration
Angamanga Sep 30, 2021
24c186e
Fixing mistake in install-script
Angamanga Oct 1, 2021
b33f571
Merge branch 'develop' into feature/migration
Angamanga Oct 1, 2021
f9800cf
Moving gmail-files to legacy-app-folder
Angamanga Oct 1, 2021
b73daf8
Fixing tests
Angamanga Oct 1, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
File renamed without changes.
File renamed without changes.
19 changes: 11 additions & 8 deletions .github/workflows/test-and-ship.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 30
## While tests are not fixed
continue-on-error: true

strategy:
matrix:
node_version: [ 8.x, 10.x , 12.x ]
node_version:
- 8.x
- 10.x
- 12.x
include:
- node_version: 8.x
run_lint_tests: "True"
Expand Down Expand Up @@ -40,7 +45,7 @@ jobs:
set -e;

npm install -g gulp;
npm install;
npm run install;

- name: List installed dependencies
run: |
Expand All @@ -49,15 +54,13 @@ jobs:
- name: Run lint tests
if: ${{ matrix.run_lint_tests }}
run: |
TEST_SUITE="lint" test/test.sh
cd legacy ;
TEST_SUITE="lint" test/test.sh ;

- name: Run tests
run: |
TEST_SUITE="unit" test/test.sh ;

#
# gulp send-stats-to-coveralls ;

npm run test;

ship:
needs: [ test ]
if: github.event_name == 'push' # not on PRs
Expand Down
52 changes: 26 additions & 26 deletions .gitignore
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
.idea
.sass-cache
bower_components
node_modules
npm-debug.log
.gulpconfig.json
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# dotrun package
.docker-project
.yarn.*.hash
.dotrun.json

npm-debug.log*
yarn-debug.log*
yarn-error.log*

# build
/build

# local configuratinon
.env.*.local
.env.local
.env
test/coverage/
build/*
dist/*
.DS_Store
server/www/locales/
*.aes
*.swp
*.swo
buildargs.env
deployment.env
docker.env
vault.txt
*.swo
*.swp
*.svg
server/www/img/icons/
server/www/
app/locales/
package-lock.json
app/stats.html

# junk
*.DS_Store
*.fuse*
14 changes: 8 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ FROM ushahidi/node-ci:node-10-gulp-4

RUN mkdir -p /var/app
WORKDIR /var/app
COPY package.json .
RUN npm-install-silent.sh
COPY ./package.json ./
COPY ./root/package.json ./root/package.json
COPY ./legacy/package.json ./legacy/package.json
COPY ./utilities/package.json ./utilities/package.json
COPY ./api/package.json ./api/package.json
RUN npm run install

COPY . ./
ARG TX_USERNAME
ARG TX_PASSWORD
RUN TX_USERNAME="${TX_USERNAME}" TX_PASSWORD="${TX_PASSWORD}" gulp build
RUN npm run build


FROM nginx
Expand All @@ -22,7 +24,7 @@ RUN apt update && \
ARG HTTP_PORT=8080

WORKDIR /usr/share/nginx/html
COPY --from=0 /var/app/server/www/ /var/app/app/config.js.j2 /var/app/app/config.json.j2 ./
COPY --from=0 /var/app/build /var/app/app/config.js.j2 /var/app/app/config.json.j2 ./
COPY docker/nginx.default.conf /etc/nginx/conf.d/default.conf
COPY docker/nginx.run.sh /nginx.run.sh
RUN sed -i 's/$HTTP_PORT/'$HTTP_PORT'/' /etc/nginx/conf.d/default.conf && \
Expand Down
4 changes: 4 additions & 0 deletions api/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": ["important-stuff", "plugin:prettier/recommended"],
"parser": "@babel/eslint-parser"
}
72 changes: 72 additions & 0 deletions api/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# next.js build output
.next
dist

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
.DS_Store
8 changes: 8 additions & 0 deletions api/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.gitignore
.prettierignore
yarn.lock
yarn-error.log
package-lock.json
dist
coverage
pnpm-lock.yaml
24 changes: 24 additions & 0 deletions api/babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"presets": ["@babel/preset-env"],
"plugins": [
[
"@babel/plugin-transform-runtime",
{
"useESModules": true,
"regenerator": false
}
]
],
"env": {
"test": {
"presets": [
[
"@babel/preset-env",
{
"targets": "current node"
}
]
]
}
}
}
8 changes: 8 additions & 0 deletions api/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
transform: {
"^.+\\.(j|t)sx?$": "babel-jest",
},
moduleNameMapper: {
"\\.(css)$": "identity-obj-proxy",
},
};
Loading