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

feat: add devcontainer for development #2778

Merged
merged 1 commit into from
Sep 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"image": "ghcr.io/juliushaertl/nextcloud-dev-php81:latest",
"forwardPorts": [80],
"containerEnv": {
"NEXTCLOUD_AUTOINSTALL_APPS": "news",
"XDEBUG_MODE": "debug"
},
"customizations": {
"vscode": {
"extensions": [
"felixfbecker.php-intellisense",
"octref.vetur"
],
"settings": {
"php.suggest.basic": false,
"git.alwaysSignOff": true
}
}
},
"workspaceMount": "source=${localWorkspaceFolder},target=/var/www/html/apps-extra/news,type=bind",
"workspaceFolder": "/var/www/html/apps-extra/news",
"overrideCommand": true,
"postAttachCommand": "bash ./.devcontainer/setup.sh",
"portsAttributes": {
"80": {
"label": "Webserver"
}
}
}
11 changes: 11 additions & 0 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

# SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: CC0-1.0

(
cd /tmp && /usr/local/bin/bootstrap.sh apache2ctl start
)

make composer
make npm

Unchanged files with check annotations Beta

type: String,
required: true,
},
config: {

Check warning on line 64 in src/components/ContentTemplate.vue

GitHub Actions / eslint node

Prop 'config' requires default value to be set
type: Object as PropType<Config>,
},
})
return this.$store.state.folders.folders
},
disableMoveFeed(): boolean {
console.log('feed', this.feed)

Check warning on line 64 in src/components/MoveFeed.vue

GitHub Actions / eslint node

Unexpected console statement
console.log('this.folder', this.folder)

Check warning on line 65 in src/components/MoveFeed.vue

GitHub Actions / eslint node

Unexpected console statement
return (this.folder !== undefined && this.folder.id === this.feed.folderId)
},
},
return response.sort(this.sort)
},
// Trigger the click event programmatically to benefit from the item handling inside the FeedItemRow component
clickItem(item: FeedItem, alignToTop = false) {

Check warning on line 238 in src/components/feed-display/FeedItemDisplayList.vue

GitHub Actions / eslint node

'alignToTop' is assigned a value but never used
if (!item) {
return
}
if (element) {
element.click()
const virtualScroll = this.$refs.virtualScroll

Check warning on line 251 in src/components/feed-display/FeedItemDisplayList.vue

GitHub Actions / eslint node

'virtualScroll' is assigned a value but never used
// TODO: This is still jerky and even can derail the current item
// virtualScroll.showElement(element, alignToTop)
}
commit(FEED_MUTATION_TYPES.ADD_FEED, response.data.feeds[0])
} catch (e) {
// TODO: show error to user if failure
console.log(e)

Check warning on line 90 in src/store/feed.ts

GitHub Actions / eslint node

Unexpected console statement
}
},
async [FEED_ACTION_TYPES.MOVE_FEED](
{ commit }: ActionParams<FeedState>,

Check warning on line 95 in src/store/feed.ts

GitHub Actions / eslint node

'commit' is defined but never used
{ feedId, folderId }: { feedId: number, folderId: number },
) {
// Check that url is resolvable
try {
const response = await FeedService.moveFeed({

Check warning on line 100 in src/store/feed.ts

GitHub Actions / eslint node

'response' is assigned a value but never used
feedId,
folderId,
})
// commit(FEED_MUTATION_TYPES.UPDATE_FEED, { id: feedId, folderId })
} catch (e) {
// TODO: show error to user if failure
console.log(e)

Check warning on line 110 in src/store/feed.ts

GitHub Actions / eslint node

Unexpected console statement
}
},
}
if ($checkElapsed) {
$updateInterval = $this->config->getAppValue(

Check failure on line 98 in lib/Command/Updater/Job.php

GitHub Actions / phpstan: Nextcloud pre-release with 8.2

Call to deprecated method getAppValue() of interface OCP\IConfig: 29.0.0 Use {@see IAppConfig} directly
Application::NAME,
'updateInterval',
Application::DEFAULT_SETTINGS['updateInterval']
*/
public function __construct(IConfig $config)
{
$this->client_timeout = $config->getAppValue(

Check failure on line 68 in lib/Config/FetcherConfig.php

GitHub Actions / phpstan: Nextcloud pre-release with 8.2

Call to deprecated method getAppValue() of interface OCP\IConfig: 29.0.0 Use {@see IAppConfig} directly
Application::NAME,
'feedFetcherTimeout',
Application::DEFAULT_SETTINGS['feedFetcherTimeout']
);
$this->redirects = $config->getAppValue(

Check failure on line 73 in lib/Config/FetcherConfig.php

GitHub Actions / phpstan: Nextcloud pre-release with 8.2

Call to deprecated method getAppValue() of interface OCP\IConfig: 29.0.0 Use {@see IAppConfig} directly
Application::NAME,
'maxRedirects',
Application::DEFAULT_SETTINGS['maxRedirects']
'compactExpand'
];
$exploreUrl = $this->settings->getAppValue(

Check failure on line 124 in lib/Controller/PageController.php

GitHub Actions / phpstan: Nextcloud pre-release with 8.2

Call to deprecated method getAppValue() of interface OCP\IConfig: 29.0.0 Use {@see IAppConfig} directly
$this->appName,
'exploreUrl',
Application::DEFAULT_SETTINGS['exploreUrl']
*/
public function version(): array
{
$version = $this->settings->getAppValue(

Check failure on line 53 in lib/Controller/UtilityApiController.php

GitHub Actions / phpstan: Nextcloud pre-release with 8.2

Call to deprecated method getAppValue() of interface OCP\IConfig: 29.0.0 Use {@see IAppConfig} directly
$this->appName,
'installed_version'
);
$this->statusService = $status;
$this->updaterService = $updaterService;
$interval = $this->config->getAppValue(

Check failure on line 49 in lib/Cron/UpdaterJob.php

GitHub Actions / phpstan: Nextcloud pre-release with 8.2

Call to deprecated method getAppValue() of interface OCP\IConfig: 29.0.0 Use {@see IAppConfig} directly
Application::NAME,
'updateInterval',
Application::DEFAULT_SETTINGS['updateInterval']
*/
protected function run($argument)
{
$uses_cron = (bool) $this->config->getAppValue(

Check failure on line 63 in lib/Cron/UpdaterJob.php

GitHub Actions / phpstan: Nextcloud pre-release with 8.2

Call to deprecated method getAppValue() of interface OCP\IConfig: 29.0.0 Use {@see IAppConfig} directly
Application::NAME,
'useCronUpdates',
Application::DEFAULT_SETTINGS['useCronUpdates']
*/
public function purgeOverThreshold(int $threshold = null, bool $purgeUnread = null): ?int
{
$threshold = (int) ($threshold ?? $this->config->getAppValue(

Check failure on line 155 in lib/Service/ItemServiceV2.php

GitHub Actions / phpstan: Nextcloud pre-release with 8.2

Call to deprecated method getAppValue() of interface OCP\IConfig: 29.0.0 Use {@see IAppConfig} directly
Application::NAME,
'autoPurgeCount',
Application::DEFAULT_SETTINGS['autoPurgeCount']
));
$purgeUnread = (bool) ($purgeUnread ?? $this->config->getAppValue(

Check failure on line 161 in lib/Service/ItemServiceV2.php

GitHub Actions / phpstan: Nextcloud pre-release with 8.2

Call to deprecated method getAppValue() of interface OCP\IConfig: 29.0.0 Use {@see IAppConfig} directly
Application::NAME,
'purgeUnread',
Application::DEFAULT_SETTINGS['purgeUnread']
public function isCronProperlyConfigured(): bool
{
//Is NC cron enabled?
$cronMode = $this->settings->getAppValue('core', 'backgroundjobs_mode');

Check failure on line 53 in lib/Service/StatusService.php

GitHub Actions / phpstan: Nextcloud pre-release with 8.2

Call to deprecated method getAppValue() of interface OCP\IConfig: 29.0.0 Use {@see IAppConfig} directly
//Expect nextcloud cron
$cronOff = !boolval($this->settings->getAppValue(
Application::NAME,