mirror of https://github.com/nextcloud/server.git
Merge branch 'master' into make-sass-command-compatible-with-macos
commit
8184673bf9
@ -0,0 +1,53 @@
|
||||
name: Block merging with outdated 3rdparty/
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, ready_for_review, reopened, synchronize]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: block-outdated-3rdparty-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
block-outdated-3rdparty:
|
||||
name: Block merging with outdated 3rdparty/
|
||||
|
||||
runs-on: ubuntu-latest-low
|
||||
|
||||
steps:
|
||||
- name: Check requirement
|
||||
uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
|
||||
id: changes
|
||||
continue-on-error: true
|
||||
with:
|
||||
filters: |
|
||||
src:
|
||||
- '3rdparty'
|
||||
- 'version.php'
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
|
||||
|
||||
- name: 3rdparty commit hash on current branch
|
||||
id: actual
|
||||
run: |
|
||||
echo "commit=$(git submodule status | grep ' 3rdparty' | egrep -o '[a-f0-9]{40}')" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Last 3rdparty commit on target branch
|
||||
id: target
|
||||
run: |
|
||||
echo "commit=$(git ls-remote https://github.com/nextcloud/3rdparty ${{ github.base_ref }} | awk '{ print $1}')" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Compare if 3rdparty commits are different
|
||||
run: |
|
||||
echo '3rdparty/ seems to not point to the last commit of the dedicated branch:'
|
||||
echo "Branch has: ${{ steps.actual.outputs.commit }}"
|
||||
echo "${{ github.base_ref }} has: ${{ steps.target.outputs.commit }}"
|
||||
|
||||
- name: Fail if 3rdparty commits are different
|
||||
if: ${{ steps.changes.outputs.src != 'false' && steps.actual.outputs.commit != steps.target.outputs.commit }}
|
||||
run: |
|
||||
exit 1
|
@ -1 +1 @@
|
||||
Subproject commit e8a165a3811f1b454694337aaff47c30888ca9fc
|
||||
Subproject commit e2747858e408e4d9dde72a8a7cf99f2d7f750d98
|
@ -0,0 +1,124 @@
|
||||
import { basename } from 'node:path'
|
||||
import mime from 'mime'
|
||||
|
||||
class FileSystemEntry {
|
||||
|
||||
private _isFile: boolean
|
||||
private _fullPath: string
|
||||
|
||||
constructor(isFile: boolean, fullPath: string) {
|
||||
this._isFile = isFile
|
||||
this._fullPath = fullPath
|
||||
}
|
||||
|
||||
get isFile() {
|
||||
return !!this._isFile
|
||||
}
|
||||
|
||||
get isDirectory() {
|
||||
return !this.isFile
|
||||
}
|
||||
|
||||
get name() {
|
||||
return basename(this._fullPath)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class FileSystemFileEntry extends FileSystemEntry {
|
||||
|
||||
private _contents: string
|
||||
private _lastModified: number
|
||||
|
||||
constructor(fullPath: string, contents: string, lastModified = Date.now()) {
|
||||
super(true, fullPath)
|
||||
this._contents = contents
|
||||
this._lastModified = lastModified
|
||||
}
|
||||
|
||||
file(success: (file: File) => void) {
|
||||
const lastModified = this._lastModified
|
||||
// Faking the mime by using the file extension
|
||||
const type = mime.getType(this.name) || ''
|
||||
success(new File([this._contents], this.name, { lastModified, type }))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class FileSystemDirectoryEntry extends FileSystemEntry {
|
||||
|
||||
private _entries: FileSystemEntry[]
|
||||
|
||||
constructor(fullPath: string, entries: FileSystemEntry[]) {
|
||||
super(false, fullPath)
|
||||
this._entries = entries || []
|
||||
}
|
||||
|
||||
createReader() {
|
||||
let read = false
|
||||
return {
|
||||
readEntries: (success: (entries: FileSystemEntry[]) => void) => {
|
||||
if (read) {
|
||||
return success([])
|
||||
}
|
||||
read = true
|
||||
success(this._entries)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* This mocks the File API's File class
|
||||
* It will allow us to test the Filesystem API as well as the
|
||||
* File API in the same test suite.
|
||||
*/
|
||||
export class DataTransferItem {
|
||||
|
||||
private _type: string
|
||||
private _entry: FileSystemEntry
|
||||
|
||||
getAsEntry?: () => FileSystemEntry
|
||||
|
||||
constructor(type = '', entry: FileSystemEntry, isFileSystemAPIAvailable = true) {
|
||||
this._type = type
|
||||
this._entry = entry
|
||||
|
||||
// Only when the Files API is available we are
|
||||
// able to get the entry
|
||||
if (isFileSystemAPIAvailable) {
|
||||
this.getAsEntry = () => this._entry
|
||||
}
|
||||
}
|
||||
|
||||
get kind() {
|
||||
return 'file'
|
||||
}
|
||||
|
||||
get type() {
|
||||
return this._type
|
||||
}
|
||||
|
||||
getAsFile(): File|null {
|
||||
if (this._entry.isFile && this._entry instanceof FileSystemFileEntry) {
|
||||
let file: File | null = null
|
||||
this._entry.file((f) => {
|
||||
file = f
|
||||
})
|
||||
return file
|
||||
}
|
||||
|
||||
// The browser will return an empty File object if the entry is a directory
|
||||
return new File([], this._entry.name, { type: '' })
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export const fileSystemEntryToDataTransferItem = (entry: FileSystemEntry, isFileSystemAPIAvailable = true): DataTransferItem => {
|
||||
return new DataTransferItem(
|
||||
entry.isFile ? 'text/plain' : 'httpd/unix-directory',
|
||||
entry,
|
||||
isFileSystemAPIAvailable,
|
||||
)
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
OC.L10N.register(
|
||||
"admin_audit",
|
||||
{
|
||||
"Auditing / Logging" : "Revision/Logning",
|
||||
"Auditing / Logging" : "Revision / Logning",
|
||||
"Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Bidrager med lognings funktionalitet til Nextcloud, såsom logning af fil tilgang eller andre sensitive handlinger"
|
||||
},
|
||||
"nplurals=2; plural=(n != 1);");
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ "translations": {
|
||||
"Auditing / Logging" : "Revision/Logning",
|
||||
"Auditing / Logging" : "Revision / Logning",
|
||||
"Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Bidrager med lognings funktionalitet til Nextcloud, såsom logning af fil tilgang eller andre sensitive handlinger"
|
||||
},"pluralForm" :"nplurals=2; plural=(n != 1);"
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue