Skip to content

Commit ccdf9db

Browse files
committed
Initial fork from Directus 9 GPL
1 parent 4f2cde9 commit ccdf9db

File tree

2,168 files changed

+349731
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,168 files changed

+349731
-0
lines changed

.dockerignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
**/.editorconfig
2+
**/.dockerignore
3+
**/.git
4+
**/.DS_Store
5+
**/.vscode
6+
**/node_modules
7+
**/dist
8+
**/.env
9+
**/.cache

.editorconfig

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
root=true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
charset = utf-8
7+
indent_style = tab
8+
trim_trailing_whitespace = true
9+
10+
[*.{yml,yaml}]
11+
indent_style = space

.eslintignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
dist
3+
packages/extensions-sdk/templates
4+
extensions

.eslintrc.js

+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
const defaultRules = {
2+
// No console statements in production
3+
'no-console': process.env.NODE_ENV !== 'development' ? 'error' : 'off',
4+
// No debugger statements in production
5+
'no-debugger': process.env.NODE_ENV !== 'development' ? 'error' : 'off',
6+
// Enforce prettier formatting
7+
'prettier/prettier': 'error',
8+
'padding-line-between-statements': [
9+
'error',
10+
{
11+
blankLine: 'always',
12+
prev: [
13+
'block',
14+
'block-like',
15+
'cjs-export',
16+
'class',
17+
'export',
18+
'import',
19+
'multiline-block-like',
20+
'multiline-const',
21+
'multiline-expression',
22+
'multiline-let',
23+
'multiline-var',
24+
],
25+
next: '*',
26+
},
27+
{
28+
blankLine: 'always',
29+
prev: ['const', 'let'],
30+
next: ['block', 'block-like', 'cjs-export', 'class', 'export', 'import'],
31+
},
32+
{
33+
blankLine: 'always',
34+
prev: '*',
35+
next: ['multiline-block-like', 'multiline-const', 'multiline-expression', 'multiline-let', 'multiline-var'],
36+
},
37+
{ blankLine: 'any', prev: ['export', 'import'], next: ['export', 'import'] },
38+
],
39+
'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }],
40+
};
41+
42+
module.exports = {
43+
// Stop looking for ESLint configurations in parent folders
44+
root: true,
45+
// Global variables: Browser and Node.js
46+
env: {
47+
browser: true,
48+
node: true,
49+
},
50+
// Basic configuration for js files
51+
plugins: ['@typescript-eslint', 'prettier'],
52+
extends: ['eslint:recommended', 'prettier'],
53+
rules: defaultRules,
54+
parserOptions: {
55+
ecmaVersion: 2022,
56+
sourceType: 'module',
57+
},
58+
overrides: [
59+
// Jest
60+
{
61+
files: ['**/*.test.js'],
62+
env: {
63+
jest: true,
64+
},
65+
plugins: ['jest'],
66+
rules: defaultRules,
67+
},
68+
// Configuration for ts/vue files
69+
{
70+
files: ['*.ts', '*.vue'],
71+
parser: 'vue-eslint-parser',
72+
parserOptions: {
73+
parser: '@typescript-eslint/parser',
74+
},
75+
extends: [
76+
'plugin:vue/vue3-recommended',
77+
'eslint:recommended',
78+
'plugin:@typescript-eslint/recommended',
79+
'prettier',
80+
],
81+
rules: {
82+
...defaultRules,
83+
'vue/multi-word-component-names': 'off',
84+
// It's recommended to turn off this rule on TypeScript projects
85+
'no-undef': 'off',
86+
// Allow ts-directive comments (used to suppress TypeScript compiler errors)
87+
'@typescript-eslint/ban-ts-comment': 'off',
88+
// Allow usage of the any type (consider to enable this rule later on)
89+
'@typescript-eslint/no-explicit-any': 'off',
90+
// Allow usage of require statements (consider to enable this rule later on)
91+
'@typescript-eslint/no-var-requires': 'off',
92+
// Allow non-null assertions for now (consider to enable this rule later on)
93+
'@typescript-eslint/no-non-null-assertion': 'off',
94+
// Allow unused arguments and variables when they begin with an underscore
95+
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
96+
},
97+
},
98+
],
99+
};

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docs/* @phazonoverload
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
body:
2+
- type: markdown
3+
attributes:
4+
value: |
5+
Hi, thank you for taking the time to create a docs suggestion!
6+
7+
Please do be aware that this is _not_ the place to ask a question. To ask a question, [join our Discord server](https://directus.chat) instead!
8+
9+
- type: input
10+
attributes:
11+
label: Subject Area
12+
description: What topic should we create/improve documentation for?
13+
14+
- type: textarea
15+
attributes:
16+
label: Suggestions
17+
description: Please detail exactly what you think would be a good addition to the docs.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# This is based on Vue's great RFC template https://github.com/vuejs/rfcs/blob/master/0000-template.md
2+
body:
3+
- type: markdown
4+
attributes:
5+
value: |
6+
Hi, thank you for taking the time to create a feature request!
7+
8+
In order to make sure this feature request has the biggest chance of being implemented, please fill out the following sections in as much detail as you can.
9+
10+
- type: textarea
11+
attributes:
12+
label: Summary
13+
description: Brief explanation of the feature
14+
validations:
15+
required: true
16+
17+
- type: textarea
18+
attributes:
19+
label: Basic Example
20+
description: If the proposal involves a new or changed API, include a basic code example.
21+
22+
- type: textarea
23+
attributes:
24+
label: Motivation
25+
description: |
26+
Why are we doing this? What use cases does it support? What is the expected outcome?
27+
28+
Please focus on explaining the motivation so that if this RFC is not accepted, the motivation could be used to develop alternative solutions. In other words, enumerate the constraints you are trying to solve without coupling them too closely to the solution you have in mind.
29+
validations:
30+
required: true
31+
32+
- type: textarea
33+
attributes:
34+
label: Detailed Design
35+
description: |
36+
This is the bulk of the RFC. Explain the design in enough detail for somebody familiar with Directus to understand, and for somebody familiar with the implementation to implement. This should get into specifics and corner-cases, and include examples of how the feature is used. Any new terminology should be defined here.
37+
validations:
38+
required: true
39+
40+
- type: textarea
41+
attributes:
42+
label: Requirements List
43+
value: |
44+
### Must Have:
45+
- A
46+
- B
47+
48+
### Should Have:
49+
- C
50+
51+
### Could Have:
52+
- D
53+
54+
### Won't Have:
55+
- E
56+
description: |
57+
What is required to make this feature a success? Please use [the MoSCoW method](https://en.wikipedia.org/wiki/MoSCoW_method) to describe the requirements.
58+
validations:
59+
required: true
60+
61+
- type: textarea
62+
attributes:
63+
label: Drawbacks
64+
description: |
65+
Why should we **not** do this? Please consider:
66+
- implementation cost, both in term of code size and complexity
67+
- whether the proposed feature can be implemented in user space
68+
- the impact on teaching people Directus
69+
- integration of this feature with other existing and planned features
70+
- cost of migrating existing Directus applications (is it a breaking change?)
71+
72+
There are tradeoffs to choosing any path. Attempt to identify them here.
73+
validations:
74+
required: true
75+
76+
- type: textarea
77+
attributes:
78+
label: Alternatives
79+
description: |
80+
What other designs have been considered? What is the impact of not doing this?
81+
validations:
82+
required: true
83+
84+
- type: textarea
85+
attributes:
86+
label: Adoption Strategy
87+
description: |
88+
If we implement this proposal, how will existing Directus developers adopt it? Is this a breaking change? Can we write a migration? How will this affect other projects in the Directus ecosystem?
89+
validations:
90+
required: true
91+
92+
- type: textarea
93+
attributes:
94+
label: Unresolved Questions
95+
description: |
96+
What parts of this request are still unknown?

.github/FUNDING.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# These are supported funding model platforms
2+
3+
github: [directus]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
custom: # Replace with a single custom sponsorship URL

.github/ISSUE_TEMPLATE/bug_report.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Report a bug
2+
description: Create a report to help us improve
3+
body:
4+
- type: markdown
5+
attributes:
6+
value: |
7+
Hi, thank you for taking the time to create an issue! Before you get started, please ensure the following are correct:
8+
9+
- I'm using the [latest version of Directus](https://github.com/directus/directus/releases)
10+
- I've completed all [Troubleshooting Steps](https://docs.directus.io/getting-started/support/#troubleshooting-steps).
11+
- There's [no other issue](https://github.com/directus/directus/issues?q=is%3Aissue) that already describes the problem.
12+
13+
_For issues specific to Directus Cloud projects, please reach out through the Live Chat in our Cloud Dashboard._
14+
- type: textarea
15+
attributes:
16+
label: Describe the Bug
17+
description: A clear and concise description of what the bug is.
18+
validations:
19+
required: true
20+
- type: textarea
21+
attributes:
22+
label: To Reproduce
23+
description:
24+
Steps to reproduce the behavior. Contributors should be able to follow the steps provided in order to reproduce
25+
the bug.
26+
validations:
27+
required: true
28+
- type: input
29+
attributes:
30+
label: Directus Version
31+
placeholder: v9.x.x
32+
validations:
33+
required: true
34+
- type: dropdown
35+
id: deployment
36+
attributes:
37+
label: Hosting Strategy
38+
options:
39+
- Self-Hosted (Docker Image)
40+
- Self-Hosted (Custom)
41+
- Directus Cloud
42+
validations:
43+
required: true

.github/ISSUE_TEMPLATE/config.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Request a new feature
4+
url: https://github.com/directus/directus/discussions/new?category=feature-requests
5+
about: Share your ideas on how to make Directus better.
6+
- name: Suggest improvements for the docs
7+
url: https://github.com/directus/directus/discussions/new?category=docs-suggestions
8+
about: Share your ideas on how to improve the documentation of Directus.
9+
- name: Ask a question
10+
url: https://directus.chat/
11+
about: Please ask and answer questions here.
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Report a docs inaccuracy
2+
description: When something is wrong or incorrect in the docs
3+
labels: Documentation
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Hi, thank you for taking the time to create an issue! If you're asking for _new_ docs, or have a suggestion on how to enhance existing docs, please open [a docs suggestion](https://github.com/directus/directus/discussions/new?category=docs-suggestions) instead!
9+
- type: input
10+
attributes:
11+
label: Page
12+
description: A direct link to the page with the problem
13+
validations:
14+
required: true
15+
- type: textarea
16+
attributes:
17+
label: Describe the Inaccuracy
18+
description: A clear and concise description of what the problem is
19+
validations:
20+
required: true

.github/actions/prepare/action.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Prepare
2+
description: Install and build the app
3+
inputs:
4+
build:
5+
description: Build the production bundle of the platform
6+
required: false
7+
default: 'true'
8+
registry:
9+
description: NPM registry to set up for auth
10+
required: false
11+
12+
runs:
13+
using: 'composite'
14+
steps:
15+
- name: Install Node.js
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version: 18
19+
registry-url: ${{ inputs.registry }}
20+
21+
- uses: pnpm/action-setup@v2
22+
name: Install pnpm
23+
id: pnpm-install
24+
with:
25+
run_install: false
26+
27+
- name: Get pnpm store directory
28+
id: pnpm-cache
29+
shell: bash
30+
run: |
31+
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
32+
33+
- uses: actions/cache@v3
34+
name: Setup pnpm cache
35+
with:
36+
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
37+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
38+
restore-keys: |
39+
${{ runner.os }}-pnpm-store-
40+
41+
- name: Install dependencies
42+
shell: bash
43+
run: pnpm install
44+
45+
- name: Build
46+
if: inputs.build == 'true'
47+
shell: bash
48+
run: pnpm run build
49+
env:
50+
npm_config_workspace_concurrency: '1'
51+
NODE_OPTIONS: --max_old_space_size=6144

.github/codeql/codeql-config.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
paths-ignore:
2+
- '**/*.test.ts'
3+
- '**/*.test.js'
4+
- '**/node_modules'

.github/pull_request_template.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!--
2+
3+
Heya! Thanks for opening a Pull Request! Please make sure your PR adheres to the following requirements:
4+
5+
- The PR closes an Issue (not Discussion)
6+
- Tests are added/updated and are passing locally if applicable
7+
- Documentation was added/updated if applicable
8+
9+
Please make sure to "Link" the issue you're closing. Without a Linked issue, this PR won't be accepted. See https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue for more information.
10+
11+
-->

0 commit comments

Comments
 (0)