Commit Graph

993 Commits

Author SHA1 Message Date
kirrg001
f574507214 Bump knex-migrator to version 3.2.1
no issue
2018-08-16 12:13:24 +02:00
Hannah Wolfe
290f74f815 Added advanced filtering to Dynamic Routing (#9757)
refs #9601, refs #9742

- Upgraded NQL to 0.1.0
- The new version of NQL supports aliases e.g. `tag: tags.slug`, which makes it possible to define `filter=tag:support`
- Furthermore, this allows us to support advanced filtering like tag:[a,b]
- In dynamic routing, we use mingo via NQL which has a slightly different feature set to GQL in the API:
   - AND NOT, OR and other advanced logic combos DO work on joined tables
   - Counts are not yet supported
- The Dynamic Routing beta docs should describe that API filtering and Dynamic Routing filtering is different
2018-08-16 12:13:24 +02:00
kirrg001
ef5dd6b878 Bump knex-migrator to version 3.2.0
no issue
2018-08-16 12:13:24 +02:00
kirrg001
a7faab3956 Changed min cli engine version to 1.9
refs https://github.com/TryGhost/Ghost-CLI/issues/759

- to be able to install Ghost 2.0, you have to be on the version Ghost CLI 1.9.0
- 1.9.0 will add a proper support for migrating to a new major version
2018-08-16 12:13:24 +02:00
kirrg001
23b4fd26c6 Moved knex-migrator execution into Ghost
refs #9742, refs https://github.com/TryGhost/Ghost-CLI/issues/759

- required a reordering of Ghost's bootstrap file, because:
  - we have to ensure that no database queries are executed within Ghost during the migrations
  - make 3 sections: check if db needs initialisation, bootstrap Ghost with minimal components (db/models, express apps, load settings+theme)
- create a new `migrator` utility, which tells you which state your db is in and offers an API to execute knex-migrator based on this state
- ensure we still detect an incompatible db: you connect your 2.0 blog with a 0.11 database
- enable maintenance mode if migrations are missing
- if the migration have failed, knex-migrator roll auto rollback
  - you can automatically switch to 1.0 again
- added socket communication for the CLI
2018-08-16 12:13:24 +02:00
kirrg001
91152efdc1 Changed http to https links
no issue

- use https
- replace broken links e.g. docs.ghost.org/themes
2018-08-16 12:13:24 +02:00
Kevin Ansfield
f6a45b6ade Version bump to 1.25.5 2018-08-14 14:43:41 +01:00
kirrg001
1b5eae2af5 Version bump to 1.25.4 2018-08-08 19:45:54 +02:00
Kevin Ansfield
3efee1ae54 Version bump to 1.25.3 2018-07-31 11:37:01 +01:00
kirrg001
a1723a687c Version bump to 1.25.2 2018-07-25 22:41:23 +02:00
kirrg001
fe367e4dbc Version bump to 1.25.1 2018-07-25 11:59:21 +02:00
kirrg001
701c688474 Version bump to 1.25.0 2018-07-24 15:27:37 +02:00
Kevin Ansfield
0eaa179213 Version bump to 1.24.9 2018-07-18 11:45:47 +01:00
kirrg001
a4ce3d1be8 Version bump to 1.24.8 2018-07-11 00:26:50 +02:00
Kevin Ansfield
46fdf3b4c4 Version bump to 1.24.7 2018-07-03 12:43:22 +01:00
kirrg001
8c1061cd30 Bump dependencies
no issue

- ghost-ignition@2.9.4
  - fixed log rotation (c8f256430a)
- multer@1.3.1
- uuid@3.3.2
- nock@9.4.0
2018-07-02 12:39:58 +02:00
kirrg001
e676648169 Version bump to 1.24.6 2018-06-26 19:08:01 +02:00
Katharina Irrgang
7027980ad2
Dynamic Routing Beta: Filter collections with NQL (#9704)
refs #9601

- replace jsonpath with [NQL](https://github.com/NexesJS/NQL)
- jsonpath was just a temporary solution (a short-term fix)
- with NQL we are able to filter collections more powerful in the near future
- NQL is not feature complete
- we still support `featured:true` for collections
2018-06-26 01:54:51 +02:00
Katharina Irrgang
fc9da07025
Dynamic Routing Beta: Added ability to disable+override rss (#9693)
refs #9601

- you can now use `rss:false`
- ability to define a custom rss url with a target template (+ content_type)
- ability to disable rss for channel or collection
2018-06-26 01:33:29 +02:00
kirrg001
11b61aebce Bump dependencies
no issue

- image-size@0.6.3
- moment-timezone@0.5.21
- oembed-parser@1.1.1
- simple-html-tokenizer@0.5.5
- nock@9.3.3
- sqlite3@4.0.1
2018-06-25 18:43:08 +02:00
kirrg001
15a85add57 Version bump to 1.24.5 2018-06-19 17:18:01 +02:00
Kevin Ansfield
a38998dfc7 Version bump to 1.24.4 2018-06-14 17:07:20 +01:00
Katharina Irrgang
835fd6c45b
Removed knex mock (#9685)
no issue

- this mock eat already too much of my/our time
- the idea of adding a knex mock was definitely a failed approach/try
- it's too much to maintaince and have not found a module which does this already
  - we have to support any query format
  - this is too crazy
- the idea was to use the knex mock for model unit tests, because if we want to unit test models we have to
  run through bookshelf, because the whole model layer depends on bookshelf e.g. events
- for now we simply use the real database
  - we could use the sqlite3 memory mode, but that would mean every unit test runs on sqlite3
  - something to consider for later e.g. run unit tests on one matrix
  - run the rest on another matrix for sqlite + mysql
2018-06-12 20:26:16 +02:00
Kevin Ansfield
5079830ddb Version bump to 1.24.3 2018-06-12 16:56:24 +01:00
Kevin Ansfield
ca20f3a6b0 Added /oembed API endpoint
refs https://github.com/TryGhost/Ghost/issues/9623
- add `oembed-parser` module for checking provider availability for a url and fetching data from the provider
  - require it in the `overrides.js` file before the general Promise override so that the `promise-wrt` sub-dependency doesn't attempt to extend the Bluebird promise implementation
- add `/oembed` authenticated endpoint
  - takes `?url=` query parameter to match against known providers
  - adds safeguard against oembed-parser's providers list not recognising http+https and www+non-www
  - responds with `ValidationError` if no provider is found
  - responds with oembed response from matched provider's oembed endpoint if match is found
2018-06-12 16:18:01 +01:00
Kevin Ansfield
7f3a31b350 Version bump to 1.24.2 2018-06-11 13:23:02 +01:00
kirrg001
98b7b63b7e Version bump to 1.24.1 2018-06-07 10:21:01 +02:00
kirrg001
2f69e51018 Bump dependencies
no issue

- ghost-ignition@2.9.3
- simple-html-tokenizer@0.5.3
2018-06-06 14:00:43 +02:00
kirrg001
5d42b63b58 Version bump to 1.24.0 2018-06-05 19:04:58 +02:00
kirrg001
fdde9f7c5d Bump dependencies
no issue

- body-parser@1.18.3
- extract-zip@1.6.7
- js-yaml@3.12.0
- moment@2.22.2
- moment-timezone@0.5.17
- grunt@1.0.3
- grunt-contrib-watch@1.1.0
- nock@9.3.0
- supertest@3.1.0
2018-06-04 15:48:07 +02:00
Kevin Ansfield
aecda1e7d6 Version bump to 1.23.1 2018-05-29 16:14:04 +01:00
Kevin Ansfield
371160eb8f Version bump to 1.23.0 2018-05-22 20:29:46 +01:00
Aileen Nowak
2cc032524e Bump gscan to version 1.4.3
no issue

- fixes a bug, that didn't catch errors caused by corrupt zip files
- uses a fork of the `extract-zip` dependency with a bug fix for https://github.com/maxogden/extract-zip/issues/65
2018-05-16 10:20:30 +08:00
Aileen Nowak
453738db17 Version bump to 1.22.8 2018-05-15 19:11:48 +08:00
Kevin Ansfield
5ef9b38524 Version bump to 1.22.7 2018-05-09 09:21:17 +01:00
Kevin Ansfield
ab6016f895 Version bump to 1.22.6 2018-05-08 15:58:04 +01:00
kirrg001
ac8272a383 Version bump to 1.22.5 2018-05-01 14:44:24 +02:00
kirrg001
45b3d50ced Bump dependencies
no issue

bookshelf-relations@0.2.1, bson-objectid@1.2.3, csv-parser@1.12.1, ghost-gql@0.0.10, ghost-ignition@2.9.2, ghost-storage-base@0.0.3, gscan@1.4.2, knex@0.14.6, knex-mig
rator@3.1.6, lodash@4.17.10, moment@2.22.1, moment-timezone@0.5.16, simple-html-tokenizer@0.5.1, superagent@3.8.3, eslint@4.19.1, grunt-contrib-watch@1.0.1, nock@9.2.5
2018-05-01 14:06:18 +02:00
kirrg001
932d5f4c60 Bump brute-knex to version 3.0.0
no issue

- drop node 4 support
- i finally got full access to brute-knex
- see https://github.com/llambda/brute-knex
2018-05-01 14:06:18 +02:00
kirrg001
5f5f0021db 🔥 Drop Node v4 Support
no issue

- support ends today
- see https://github.com/nodejs/Release
- removed `use strict`
2018-05-01 14:06:18 +02:00
Aileen Nowak
fef94b63ed Version bump to 1.22.4 2018-04-24 16:03:39 +08:00
Kevin Ansfield
bdf1313d8a Version bump to 1.22.3 2018-04-17 11:13:53 +01:00
Aileen Nowak
63642fd8ad YAML settings loader and parser
closes #9528

These code changes introduce a YAML parser which will load and parse YAML files from the `/content/settings` directory. There are three major parts involved:

1. `ensure-settings.js`: this fn takes care that on bootstrap, the supported files are present in the `/content/settings` directory. If the files are not present, they get copied back from our default files. The default files to copy from are located in `core/server/services/settings`.

2. `loader.js`: the settings loader reads the requested `yaml` file from the disk and passes it to the yaml parser, which returns a `json` object of the file. The settings loader throws an error, if the file is not accessible, e. g. because of permission errors.

3. `yaml-parser`: gets passed a `yaml` file and returns a `json` object. If the file is not parseable, it returns a clear error that contains the information, what and where the parsing error occurred (e. g. line number and reason).

- added a `get()` fn to settings services, that returns the settings object that's asked for. e. g. `settings.get('routes').then(()...` will return the `routes` settings.
- added a `getAll()` fn to settings services, that returns all available settings in an object. The object looks like: `{routes: {routes: {}, collections: {}, resources: {}}, globals: {value: {}}`, assuming that we have to supported settings `routes` and `globals`.

Further additions:
- config `contentPath` for `settings`
- config overrides for default `yaml` files location in `/core/server/services/settings`

**Important**: These code changes are in preparation for Dynamic Routing and not yet used. The process of copying the supported `yaml` files (in this first step, the `routes.yaml` file) is not yet activated.
2018-04-15 19:40:22 +02:00
Aileen Nowak
c8b29724e0 Added content/settings folder
refs #9528
refs TryGhost/Ghost-CLI#681

- added a new `/content/settings` folder
- bumped Ghost-CLI engine requirement to >= 1.7.0
2018-04-15 19:40:22 +02:00
kirrg001
cec8f69228 Version bump to 1.22.2 2018-04-11 22:35:59 +02:00
Aileen Nowak
87501fd41f
Added yarn lint to scripts (#9558)
no issue

- added `yarn lint` to scripts in `package.json`, which runs the existing `grunt lint` task
2018-04-09 19:43:16 +08:00
kirrg001
e986ce4af7 Bump ghost-ignition to version 2.9.1
no issue

- fixes a bug, which can slow down the process when using loggly transport
2018-04-02 21:05:16 +02:00
kirrg001
e3178fc158 Version bump to 1.22.1 2018-04-02 12:31:28 +02:00
Kevin Ansfield
3e33849e47 Version bump to 1.22.0 2018-03-27 21:08:21 +01:00
Katharina Irrgang
40d0a745df Multiple authors (#9426)
no issue

This PR adds the server side logic for multiple authors. This adds the ability to add multiple authors per post. We keep and support single authors (maybe till the next major - this is still in discussion)

### key notes

- `authors` are not fetched by default, only if we need them
- the migration script iterates over all posts and figures out if an author_id is valid and exists (in master we can add invalid author_id's) and then adds the relation (falls back to owner if invalid)
- ~~i had to push a fork of bookshelf to npm because we currently can't bump bookshelf + the two bugs i discovered are anyway not yet merged (https://github.com/kirrg001/bookshelf/commits/master)~~ replaced by new bookshelf release
- the implementation of single & multiple authors lives in a single place (introduction of a new concept: model relation)
- if you destroy an author, we keep the behaviour for now -> remove all posts where the primary author id matches. furthermore, remove all relations in posts_authors (e.g. secondary author)
- we make re-use of the `excludeAttrs` concept which was invented in the contributors PR (to protect editing authors as author/contributor role) -> i've added a clear todo that we need a logic to make a diff of the target relation -> both for tags and authors
- `authors` helper available (same as `tags` helper)
- `primary_author` computed field available
- `primary_author` functionality available (same as `primary_tag` e.g. permalinks, prev/next helper etc)
2018-03-27 15:16:15 +01:00