-
Notifications
You must be signed in to change notification settings - Fork 3
Create basic app #2
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
Closed
Closed
Changes from 5 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
ea867a6
Use app layout from integration_twitter as blueprint
smesterheide e862277
Test OIDC auth flow against Keycloak
smesterheide 6323843
Store OIDC provider as app value
smesterheide e254349
Add user feedback when updating settings
smesterheide 9b6157d
Create local VO groups after user authenticates with AAI
smesterheide 3a8134a
Ignore and remove .cache file and vendor-bin directory
smesterheide a4caec6
Set platform in composer config
smesterheide 1478d90
Update info.xml to match schema
smesterheide 1550788
Set platform for composer bin plugin (test)
smesterheide 76b2519
Exclude lib/Vendor from linter
smesterheide File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| module.exports = { | ||
| extends: [ | ||
| '@nextcloud', | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"php":"8.1.8","version":"3.4.0:v3.4.0#47177af1cfb9dab5d1cc4daf91b7179c2efe7fad","indent":"\t","lineEnding":"\n","rules":{"encoding":true,"full_opening_tag":true,"blank_line_after_namespace":true,"braces":{"position_after_anonymous_constructs":"same","position_after_control_structures":"same","position_after_functions_and_oop_constructs":"same"},"class_definition":true,"constant_case":true,"elseif":true,"function_declaration":{"closure_function_spacing":"one"},"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ignore"},"no_break_comment":true,"no_closing_tag":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":true,"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":{"elements":["property","method","const"]},"align_multiline_comment":true,"array_indentation":true,"binary_operator_spaces":{"default":"single_space"},"blank_line_after_opening_tag":true,"no_unused_imports":true},"hashes":{"tests\/Unit\/Controller\/PageControllerTest.php":2207155758,"tests\/Integration\/AppTest.php":2950225233,"tests\/bootstrap.php":41908297,"appinfo\/routes.php":2458579438,"templates\/adminSettings.php":805129342,"templates\/personalSettings.php":1395204514,"templates\/index.php":2734865279,"node_modules\/flatted\/php\/flatted.php":3670498728,"lib\/Settings\/Admin.php":4177689181,"lib\/Settings\/AdminSection.php":3667266050,"lib\/Settings\/Personal.php":774712035,"lib\/Settings\/PersonalSection.php":237427933,"lib\/Vendor\/Firebase\/JWT\/BeforeValidException.php":3387887423,"lib\/Vendor\/Firebase\/JWT\/Key.php":2086644246,"lib\/Vendor\/Firebase\/JWT\/ExpiredException.php":1091148461,"lib\/Vendor\/Firebase\/JWT\/SignatureInvalidException.php":3046842981,"lib\/Vendor\/Firebase\/JWT\/JWT.php":23558362,"lib\/Vendor\/Firebase\/JWT\/JWK.php":909127881,"lib\/Controller\/LoginController.php":2413542052,"lib\/Controller\/PageController.php":4113731223,"lib\/Controller\/ConfigController.php":2824957717,"lib\/Service\/ProviderService.php":661513495,"lib\/AppInfo\/Application.php":3846310732,"lib\/Backend\/GroupBackend.php":986210557,"lib\/Service\/VirtualOrganisationService.php":3422386287}} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,155 +1,71 @@ | ||
| # This file is licensed under the Affero General Public License version 3 or | ||
| # later. See the COPYING file. | ||
| # @author Bernhard Posselt <dev@bernhard-posselt.com> | ||
| # @copyright Bernhard Posselt 2016 | ||
|
|
||
| # Generic Makefile for building and packaging a Nextcloud app which uses npm and | ||
| # Composer. | ||
| # | ||
| # Dependencies: | ||
| # * make | ||
| # * which | ||
| # * curl: used if phpunit and composer are not installed to fetch them from the web | ||
| # * tar: for building the archive | ||
| # * npm: for building and testing everything JS | ||
| # | ||
| # If no composer.json is in the app root directory, the Composer step | ||
| # will be skipped. The same goes for the package.json which can be located in | ||
| # the app root or the js/ directory. | ||
| # | ||
| # The npm command by launches the npm build script: | ||
| # | ||
| # npm run build | ||
| # | ||
| # The npm test command launches the npm test script: | ||
| # | ||
| # npm run test | ||
| # | ||
| # The idea behind this is to be completely testing and build tool agnostic. All | ||
| # build tools and additional package managers should be installed locally in | ||
| # your project, since this won't pollute people's global namespace. | ||
| # | ||
| # The following npm scripts in your package.json install and update the bower | ||
| # and npm dependencies and use gulp as build system (notice how everything is | ||
| # run from the node_modules folder): | ||
| # | ||
| # "scripts": { | ||
| # "test": "node node_modules/gulp-cli/bin/gulp.js karma", | ||
| # "prebuild": "npm install && node_modules/bower/bin/bower install && node_modules/bower/bin/bower update", | ||
| # "build": "node node_modules/gulp-cli/bin/gulp.js" | ||
| # }, | ||
|
|
||
| app_name=$(notdir $(CURDIR)) | ||
| build_tools_directory=$(CURDIR)/build/tools | ||
| source_build_directory=$(CURDIR)/build/artifacts/source | ||
| source_package_name=$(source_build_directory)/$(app_name) | ||
| appstore_build_directory=$(CURDIR)/build/artifacts/appstore | ||
| appstore_package_name=$(appstore_build_directory)/$(app_name) | ||
| npm=$(shell which npm 2> /dev/null) | ||
| composer=$(shell which composer 2> /dev/null) | ||
|
|
||
| all: build | ||
| all: dev-setup lint build-js-production test | ||
|
|
||
| # Dev env management | ||
| dev-setup: clean clean-dev composer npm-init | ||
|
|
||
| # Fetches the PHP and JS dependencies and compiles the JS. If no composer.json | ||
| # is present, the composer step is skipped, if no package.json or js/package.json | ||
| # is present, the npm step is skipped | ||
| .PHONY: build | ||
| build: | ||
| ifneq (,$(wildcard $(CURDIR)/composer.json)) | ||
| make composer | ||
| endif | ||
| ifneq (,$(wildcard $(CURDIR)/package.json)) | ||
| make npm | ||
| endif | ||
| ifneq (,$(wildcard $(CURDIR)/js/package.json)) | ||
| make npm | ||
| endif | ||
|
|
||
| # Installs and updates the composer dependencies. If composer is not installed | ||
| # a copy is fetched from the web | ||
| .PHONY: composer | ||
| composer: | ||
| ifeq (, $(composer)) | ||
| @echo "No composer command available, downloading a copy from the web" | ||
| mkdir -p $(build_tools_directory) | ||
| curl -sS https://getcomposer.org/installer | php | ||
| mv composer.phar $(build_tools_directory) | ||
| php $(build_tools_directory)/composer.phar install --prefer-dist | ||
| php $(build_tools_directory)/composer.phar update --prefer-dist | ||
| else | ||
| composer install --prefer-dist | ||
| composer update --prefer-dist | ||
| endif | ||
|
|
||
| # Installs npm dependencies | ||
| .PHONY: npm | ||
| npm: | ||
| ifeq (,$(wildcard $(CURDIR)/package.json)) | ||
| cd js && $(npm) run build | ||
| else | ||
| npm-init: | ||
| npm ci | ||
|
|
||
| npm-update: | ||
| npm update | ||
|
|
||
| # Building | ||
| build-js: | ||
| npm run dev | ||
|
|
||
| build-js-production: | ||
| npm run build | ||
| endif | ||
|
|
||
| # Removes the appstore build | ||
| .PHONY: clean | ||
| watch-js: | ||
| npm run watch | ||
|
|
||
| serve-js: | ||
| npm run serve | ||
|
|
||
| # Linting | ||
| lint: | ||
| npm run lint | ||
|
|
||
| lint-fix: | ||
| npm run lint:fix | ||
|
|
||
| # Style linting | ||
| stylelint: | ||
| npm run stylelint | ||
|
|
||
| stylelint-fix: | ||
| npm run stylelint:fix | ||
|
|
||
| # Cleaning | ||
| clean: | ||
| rm -rf ./build | ||
| rm -rf js/* | ||
|
|
||
| # Same as clean but also removes dependencies installed by composer, bower and | ||
| # npm | ||
| .PHONY: distclean | ||
| distclean: clean | ||
| rm -rf vendor | ||
| clean-dev: | ||
| rm -rf node_modules | ||
| rm -rf js/vendor | ||
| rm -rf js/node_modules | ||
|
|
||
| # Builds the source and appstore package | ||
| .PHONY: dist | ||
| dist: | ||
| make source | ||
| make appstore | ||
|
|
||
| # Builds the source package | ||
| .PHONY: source | ||
| source: | ||
| rm -rf $(source_build_directory) | ||
| mkdir -p $(source_build_directory) | ||
| tar cvzf $(source_package_name).tar.gz ../$(app_name) \ | ||
| --exclude-vcs \ | ||
| --exclude="../$(app_name)/build" \ | ||
| --exclude="../$(app_name)/js/node_modules" \ | ||
| --exclude="../$(app_name)/node_modules" \ | ||
| --exclude="../$(app_name)/*.log" \ | ||
| --exclude="../$(app_name)/js/*.log" \ | ||
|
|
||
| # Builds the source package for the app store, ignores php and js tests | ||
| .PHONY: appstore | ||
| appstore: | ||
| rm -rf $(appstore_build_directory) | ||
| mkdir -p $(appstore_build_directory) | ||
| tar cvzf $(appstore_package_name).tar.gz ../$(app_name) \ | ||
| --exclude-vcs \ | ||
| --exclude="../$(app_name)/build" \ | ||
| --exclude="../$(app_name)/tests" \ | ||
| --exclude="../$(app_name)/Makefile" \ | ||
| --exclude="../$(app_name)/*.log" \ | ||
| --exclude="../$(app_name)/phpunit*xml" \ | ||
| --exclude="../$(app_name)/composer.*" \ | ||
| --exclude="../$(app_name)/js/node_modules" \ | ||
| --exclude="../$(app_name)/js/tests" \ | ||
| --exclude="../$(app_name)/js/test" \ | ||
| --exclude="../$(app_name)/js/*.log" \ | ||
| --exclude="../$(app_name)/js/package.json" \ | ||
| --exclude="../$(app_name)/js/bower.json" \ | ||
| --exclude="../$(app_name)/js/karma.*" \ | ||
| --exclude="../$(app_name)/js/protractor.*" \ | ||
| --exclude="../$(app_name)/package.json" \ | ||
| --exclude="../$(app_name)/bower.json" \ | ||
| --exclude="../$(app_name)/karma.*" \ | ||
| --exclude="../$(app_name)/protractor\.*" \ | ||
| --exclude="../$(app_name)/.*" \ | ||
| --exclude="../$(app_name)/js/.*" \ | ||
|
|
||
| .PHONY: test | ||
| test: composer | ||
| $(CURDIR)/vendor/phpunit/phpunit/phpunit -c phpunit.xml | ||
| $(CURDIR)/vendor/phpunit/phpunit/phpunit -c phpunit.integration.xml | ||
|
|
||
| # Tests | ||
| test: | ||
| ./vendor/phpunit/phpunit/phpunit -c phpunit.xml | ||
| ./vendor/phpunit/phpunit/phpunit -c phpunit.integration.xml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,155 @@ | ||
| # This file is licensed under the Affero General Public License version 3 or | ||
| # later. See the COPYING file. | ||
| # @author Bernhard Posselt <dev@bernhard-posselt.com> | ||
| # @copyright Bernhard Posselt 2016 | ||
|
|
||
| # Generic Makefile for building and packaging a Nextcloud app which uses npm and | ||
| # Composer. | ||
| # | ||
| # Dependencies: | ||
| # * make | ||
| # * which | ||
| # * curl: used if phpunit and composer are not installed to fetch them from the web | ||
| # * tar: for building the archive | ||
| # * npm: for building and testing everything JS | ||
| # | ||
| # If no composer.json is in the app root directory, the Composer step | ||
| # will be skipped. The same goes for the package.json which can be located in | ||
| # the app root or the js/ directory. | ||
| # | ||
| # The npm command by launches the npm build script: | ||
| # | ||
| # npm run build | ||
| # | ||
| # The npm test command launches the npm test script: | ||
| # | ||
| # npm run test | ||
| # | ||
| # The idea behind this is to be completely testing and build tool agnostic. All | ||
| # build tools and additional package managers should be installed locally in | ||
| # your project, since this won't pollute people's global namespace. | ||
| # | ||
| # The following npm scripts in your package.json install and update the bower | ||
| # and npm dependencies and use gulp as build system (notice how everything is | ||
| # run from the node_modules folder): | ||
| # | ||
| # "scripts": { | ||
| # "test": "node node_modules/gulp-cli/bin/gulp.js karma", | ||
| # "prebuild": "npm install && node_modules/bower/bin/bower install && node_modules/bower/bin/bower update", | ||
| # "build": "node node_modules/gulp-cli/bin/gulp.js" | ||
| # }, | ||
|
|
||
| app_name=$(notdir $(CURDIR)) | ||
| build_tools_directory=$(CURDIR)/build/tools | ||
| source_build_directory=$(CURDIR)/build/artifacts/source | ||
| source_package_name=$(source_build_directory)/$(app_name) | ||
| appstore_build_directory=$(CURDIR)/build/artifacts/appstore | ||
| appstore_package_name=$(appstore_build_directory)/$(app_name) | ||
| npm=$(shell which npm 2> /dev/null) | ||
| composer=$(shell which composer 2> /dev/null) | ||
|
|
||
| all: build | ||
|
|
||
| # Fetches the PHP and JS dependencies and compiles the JS. If no composer.json | ||
| # is present, the composer step is skipped, if no package.json or js/package.json | ||
| # is present, the npm step is skipped | ||
| .PHONY: build | ||
| build: | ||
| ifneq (,$(wildcard $(CURDIR)/composer.json)) | ||
| make composer | ||
| endif | ||
| ifneq (,$(wildcard $(CURDIR)/package.json)) | ||
| make npm | ||
| endif | ||
| ifneq (,$(wildcard $(CURDIR)/js/package.json)) | ||
| make npm | ||
| endif | ||
|
|
||
| # Installs and updates the composer dependencies. If composer is not installed | ||
| # a copy is fetched from the web | ||
| .PHONY: composer | ||
| composer: | ||
| ifeq (, $(composer)) | ||
| @echo "No composer command available, downloading a copy from the web" | ||
| mkdir -p $(build_tools_directory) | ||
| curl -sS https://getcomposer.org/installer | php | ||
| mv composer.phar $(build_tools_directory) | ||
| php $(build_tools_directory)/composer.phar install --prefer-dist | ||
| else | ||
| composer install --prefer-dist | ||
| endif | ||
|
|
||
| # Installs npm dependencies | ||
| .PHONY: npm | ||
| npm: | ||
| ifeq (,$(wildcard $(CURDIR)/package.json)) | ||
| cd js && $(npm) run build | ||
| else | ||
| npm run build | ||
| endif | ||
|
|
||
| # Removes the appstore build | ||
| .PHONY: clean | ||
| clean: | ||
| rm -rf ./build | ||
|
|
||
| # Same as clean but also removes dependencies installed by composer, bower and | ||
| # npm | ||
| .PHONY: distclean | ||
| distclean: clean | ||
| rm -rf vendor | ||
| rm -rf node_modules | ||
| rm -rf js/vendor | ||
| rm -rf js/node_modules | ||
|
|
||
| # Builds the source and appstore package | ||
| .PHONY: dist | ||
| dist: | ||
| make source | ||
| make appstore | ||
|
|
||
| # Builds the source package | ||
| .PHONY: source | ||
| source: | ||
| rm -rf $(source_build_directory) | ||
| mkdir -p $(source_build_directory) | ||
| tar cvzf $(source_package_name).tar.gz ../$(app_name) \ | ||
| --exclude-vcs \ | ||
| --exclude="../$(app_name)/build" \ | ||
| --exclude="../$(app_name)/js/node_modules" \ | ||
| --exclude="../$(app_name)/node_modules" \ | ||
| --exclude="../$(app_name)/*.log" \ | ||
| --exclude="../$(app_name)/js/*.log" \ | ||
|
|
||
| # Builds the source package for the app store, ignores php and js tests | ||
| .PHONY: appstore | ||
| appstore: | ||
| rm -rf $(appstore_build_directory) | ||
| mkdir -p $(appstore_build_directory) | ||
| tar cvzf $(appstore_package_name).tar.gz ../$(app_name) \ | ||
| --exclude-vcs \ | ||
| --exclude="../$(app_name)/build" \ | ||
| --exclude="../$(app_name)/tests" \ | ||
| --exclude="../$(app_name)/Makefile" \ | ||
| --exclude="../$(app_name)/*.log" \ | ||
| --exclude="../$(app_name)/phpunit*xml" \ | ||
| --exclude="../$(app_name)/composer.*" \ | ||
| --exclude="../$(app_name)/js/node_modules" \ | ||
| --exclude="../$(app_name)/js/tests" \ | ||
| --exclude="../$(app_name)/js/test" \ | ||
| --exclude="../$(app_name)/js/*.log" \ | ||
| --exclude="../$(app_name)/js/package.json" \ | ||
| --exclude="../$(app_name)/js/bower.json" \ | ||
| --exclude="../$(app_name)/js/karma.*" \ | ||
| --exclude="../$(app_name)/js/protractor.*" \ | ||
| --exclude="../$(app_name)/package.json" \ | ||
| --exclude="../$(app_name)/bower.json" \ | ||
| --exclude="../$(app_name)/karma.*" \ | ||
| --exclude="../$(app_name)/protractor\.*" \ | ||
| --exclude="../$(app_name)/.*" \ | ||
| --exclude="../$(app_name)/js/.*" \ | ||
|
|
||
| .PHONY: test | ||
| test: composer | ||
| $(CURDIR)/vendor/phpunit/phpunit/phpunit -c phpunit.xml | ||
| $(CURDIR)/vendor/phpunit/phpunit/phpunit -c phpunit.integration.xml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.