This repository has been archived by the owner on Jan 6, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit efc590c
Showing
5,561 changed files
with
533,052 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains 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,10 @@ | ||
rm -rf .directus-build | ||
git clone https://github.com/directus/directus.git .directus-build | ||
|
||
pushd .directus-build | ||
npm install | ||
gulp build | ||
gulp deploy | ||
popd | ||
|
||
rm -rf .directus-build |
This file contains 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,27 @@ | ||
git subsplit init [email protected]:directus/directus.git | ||
|
||
# Collection | ||
git subsplit publish --heads="version/6.4" --no-tags --debug api/core/Directus/Collection:[email protected]:directus/directus-collection.git | ||
|
||
# Config | ||
git subsplit publish --heads="version/6.4" --no-tags --debug api/core/Directus/Config:[email protected]:directus/directus-config.git | ||
|
||
# Permissions | ||
git subsplit publish --heads="version/6.4" --no-tags --debug api/core/Directus/Permissions:[email protected]:directus/directus-permissions.git | ||
|
||
# Database | ||
git subsplit publish --heads="version/6.4" --no-tags --debug api/core/Directus/Database:[email protected]:directus/directus-database.git | ||
|
||
# Filesystem | ||
git subsplit publish --heads="version/6.4" --no-tags --debug api/core/Directus/Filesystem:[email protected]:directus/directus-filesystem.git | ||
|
||
# Hash | ||
git subsplit publish --heads="version/6.4" --no-tags --debug api/core/Directus/Hash:[email protected]:directus/directus-hash.git | ||
|
||
# Hooks | ||
git subsplit publish --heads="version/6.4" --no-tags --debug api/core/Directus/Hook:[email protected]:directus/directus-hook.git | ||
|
||
# Utils | ||
git subsplit publish --heads="version/6.4" --no-tags --debug api/core/Directus/Util:[email protected]:directus/directus-php-utils.git | ||
|
||
rm -rf .subsplit |
This file contains 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,11 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
$basePath = realpath(__DIR__ . '/../'); | ||
// Composer Autoloader | ||
$loader = require $basePath . '/vendor/autoload.php'; | ||
|
||
$cli = new \Directus\Console\Cli($basePath); | ||
$cli->run(); | ||
|
||
?> |
This file contains 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,25 @@ | ||
#!/bin/sh | ||
|
||
# | ||
# Command line runner for unit tests for composer projects | ||
# (c) Del 2015 http://www.babel.com.au/ | ||
# No Rights Reserved | ||
# | ||
|
||
# | ||
# Clean up after any previous test runs | ||
# | ||
mkdir -p documents | ||
rm -rf documents/coverage-html-new | ||
rm -f documents/coverage.xml | ||
|
||
# | ||
# Run phpunit | ||
# | ||
vendor/bin/phpunit --coverage-html documents/coverage-html-new --coverage-clover documents/coverage.xml | ||
|
||
if [ -d documents/coverage-html-new ]; then | ||
rm -rf documents/coverage-html | ||
mv documents/coverage-html-new documents/coverage-html | ||
fi | ||
|
This file contains 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 @@ | ||
<?php | ||
|
||
return [ | ||
'app' => [ | ||
'path' => '/', | ||
'env' => 'development', | ||
'debug' => true, | ||
'default_language' => 'en', | ||
'timezone' => 'America/New_York', | ||
], | ||
|
||
'settings' => [ | ||
'debug' => true, | ||
'displayErrorDetails' => true, | ||
'logger' => [ | ||
'name' => 'directus-api', | ||
'level' => Monolog\Logger::DEBUG, | ||
'path' => __DIR__ . '/logs/app.log', | ||
], | ||
], | ||
|
||
'database' => [ | ||
'type' => 'mysql', | ||
'host' => 'localhost', | ||
'port' => 3306, | ||
'name' => 'directus', | ||
'username' => 'root', | ||
'password' => 'pass', | ||
'prefix' => '', // not used | ||
'engine' => 'InnoDB', | ||
'charset' => 'utf8mb4' | ||
], | ||
|
||
'cache' => [ | ||
'enabled' => false, | ||
'response_ttl' => 3600, // seconds | ||
'adapter' => 'filesystem', | ||
'path' => '/storage/cache', | ||
// 'pool' => [ | ||
// 'adapter' => 'apc' | ||
// ], | ||
// 'pool' => [ | ||
// 'adapter' => 'apcu' | ||
// ], | ||
// 'pool' => [ | ||
// 'adapter' => 'filesystem', | ||
// 'path' => '../cache/', // relative to the api directory | ||
// ], | ||
// 'pool' => [ | ||
// 'adapter' => 'memcached', | ||
// 'host' => 'localhost', | ||
// 'port' => 11211 | ||
// ], | ||
// 'pool' => [ | ||
// 'adapter' => 'redis', | ||
// 'host' => 'localhost', | ||
// 'port' => 6379 | ||
// ], | ||
], | ||
|
||
'filesystem' => [ | ||
'adapter' => 'local', | ||
// By default media directory are located at the same level of directus root | ||
// To make them a level up outsite the root directory | ||
// use this instead | ||
// Ex: 'root' => realpath(ROOT_PATH.'/../storage/uploads'), | ||
// Note: ROOT_PATH constant doesn't end with trailing slash | ||
'root' => 'storage/uploads', | ||
// This is the url where all the media will be pointing to | ||
// here all assets will be (yourdomain)/storage/uploads | ||
// same with thumbnails (yourdomain)/storage/uploads/thumbs | ||
'root_url' => '/storage/uploads', | ||
'root_thumb_url' => '/storage/uploads/thumbs', | ||
// 'key' => 's3-key', | ||
// 'secret' => 's3-key', | ||
// 'region' => 's3-region', | ||
// 'version' => 's3-version', | ||
// 'bucket' => 's3-bucket' | ||
], | ||
|
||
// HTTP Settings | ||
'http' => [ | ||
'emulate_enabled' => false, | ||
// can be null, or an array list of method to be emulated | ||
// Ex: ['PATH', 'DELETE', 'PUT'] | ||
// 'emulate_methods' => null, | ||
'force_https' => false | ||
], | ||
|
||
'mail' => [ | ||
'transport' => 'mail', | ||
'from' => '[email protected]' | ||
], | ||
|
||
'cors' => [ | ||
'enabled' => false, | ||
'origin' => ['*'], | ||
'headers' => [ | ||
['Access-Control-Allow-Headers', 'Authorization, Content-Type, Access-Control-Allow-Origin'], | ||
['Access-Control-Allow-Methods', 'GET,POST,PUT,PATCH,DELETE'], | ||
['Access-Control-Allow-Credentials', 'false'] | ||
] | ||
], | ||
|
||
'rate_limit' => [ | ||
'enabled' => false, | ||
'limit' => 100, // number of request | ||
'interval' => 60, // seconds | ||
'adapter' => 'redis', | ||
'host' => '127.0.0.1', | ||
'port' => 6379, | ||
'timeout' => 10 | ||
], | ||
|
||
'hooks' => [], | ||
|
||
'filters' => [], | ||
|
||
'feedback' => [ | ||
'token' => 'a-kind-of-unique-token', | ||
'login' => true | ||
], | ||
|
||
// These tables will not be loaded in the directus schema | ||
'tableBlacklist' => [], | ||
|
||
'auth' => [ | ||
'secret_key' => '<secret-authentication-key>', | ||
'social_providers' => [ | ||
// 'okta' => [ | ||
// 'client_id' => '', | ||
// 'client_secret' => '', | ||
// 'base_url' => 'https://dev-000000.oktapreview.com/oauth2/default' | ||
// ], | ||
// 'github' => [ | ||
// 'client_id' => '', | ||
// 'client_secret' => '' | ||
// ], | ||
// 'facebook' => [ | ||
// 'client_id' => '', | ||
// 'client_secret' => '', | ||
// 'graph_api_version' => 'v2.8', | ||
// ], | ||
// 'google' => [ | ||
// 'client_id' => '', | ||
// 'client_secret' => '', | ||
// 'hosted_domain' => '*', | ||
// ], | ||
// 'twitter' => [ | ||
// 'identifier' => '', | ||
// 'secret' => '' | ||
// ] | ||
] | ||
], | ||
]; |
This file contains 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,15 @@ | ||
<?php | ||
|
||
return [ | ||
'paths' => [ | ||
'migrations' => '%%PHINX_CONFIG_DIR%%/../migrations/db/schemas', | ||
'seeds' => '%%PHINX_CONFIG_DIR%%/../migrations/db/seeds' | ||
], | ||
|
||
'version_order' => 'creation', | ||
|
||
'environments' => [ | ||
'default_migration_table' => 'directus_migrations', | ||
'default_database' => 'development' | ||
] | ||
]; |
Empty file.
87 changes: 87 additions & 0 deletions
87
migrations/db/schemas/20180220023138_create_activity_table.php
This file contains 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,87 @@ | ||
<?php | ||
|
||
use Phinx\Migration\AbstractMigration; | ||
|
||
class CreateActivityTable extends AbstractMigration | ||
{ | ||
/** | ||
* Change Method. | ||
* | ||
* Write your reversible migrations using this method. | ||
* | ||
* More information on writing migrations is available here: | ||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class | ||
* | ||
* The following commands can be used in this method and Phinx will | ||
* automatically reverse them when rolling back: | ||
* | ||
* createTable | ||
* renameTable | ||
* addColumn | ||
* renameColumn | ||
* addIndex | ||
* addForeignKey | ||
* | ||
* Remember to call "create()" or "update()" and NOT "save()" when working | ||
* with the Table class. | ||
*/ | ||
public function change() | ||
{ | ||
$table = $this->table('directus_activity', ['signed' => false]); | ||
|
||
$table->addColumn('type', 'string', [ | ||
'limit' => 45, | ||
'null' => false | ||
]); | ||
|
||
$table->addColumn('action', 'string', [ | ||
'limit' => 45, | ||
'null' => false | ||
]); | ||
|
||
$table->addColumn('user', 'integer', [ | ||
'signed' => false, | ||
'null' => false, | ||
'default' => 0 | ||
]); | ||
|
||
$table->addColumn('datetime', 'datetime', [ | ||
'default' => null | ||
]); | ||
|
||
$table->addColumn('ip', 'string', [ | ||
'limit' => 50, | ||
'default' => null | ||
]); | ||
|
||
$table->addColumn('user_agent', 'string', [ | ||
'limit' => 255 | ||
]); | ||
|
||
$table->addColumn('collection', 'string', [ | ||
'limit' => 64, | ||
'null' => false | ||
]); | ||
|
||
$table->addColumn('item', 'string',[ | ||
'limit' => 255 | ||
]); | ||
|
||
$table->addColumn('datetime_edited', 'datetime', [ | ||
'null' => true, | ||
'default' => null | ||
]); | ||
|
||
$table->addColumn('comment', 'text', [ | ||
'null' => true | ||
]); | ||
|
||
$table->addColumn('deleted_comment', 'boolean', [ | ||
'signed' => false, | ||
'null' => true, | ||
'default' => false | ||
]); | ||
|
||
$table->create(); | ||
} | ||
} |
60 changes: 60 additions & 0 deletions
60
migrations/db/schemas/20180220023144_create_activity_read_table.php
This file contains 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,60 @@ | ||
<?php | ||
|
||
use Phinx\Migration\AbstractMigration; | ||
|
||
class CreateActivityReadTable extends AbstractMigration | ||
{ | ||
/** | ||
* Change Method. | ||
* | ||
* Write your reversible migrations using this method. | ||
* | ||
* More information on writing migrations is available here: | ||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class | ||
* | ||
* The following commands can be used in this method and Phinx will | ||
* automatically reverse them when rolling back: | ||
* | ||
* createTable | ||
* renameTable | ||
* addColumn | ||
* renameColumn | ||
* addIndex | ||
* addForeignKey | ||
* | ||
* Remember to call "create()" or "update()" and NOT "save()" when working | ||
* with the Table class. | ||
*/ | ||
public function change() | ||
{ | ||
$table = $this->table('directus_activity_read', ['signed' => false]); | ||
|
||
$table->addColumn('activity', 'integer', [ | ||
'null' => false, | ||
'signed' => false | ||
]); | ||
|
||
$table->addColumn('user', 'integer', [ | ||
'signed' => false, | ||
'null' => false, | ||
'default' => 0 | ||
]); | ||
|
||
// TODO: Add the time when this was read? | ||
// $table->addColumn('datetime', 'datetime', [ | ||
// 'default' => null | ||
// ]); | ||
|
||
$table->addColumn('read', 'boolean', [ | ||
'signed' => false, | ||
'default' => false | ||
]); | ||
|
||
$table->addColumn('archived', 'boolean', [ | ||
'signed' => false, | ||
'default' => false | ||
]); | ||
|
||
$table->create(); | ||
} | ||
} |
Oops, something went wrong.