-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9011 from ckeditor/i/8811
Other (cloud-services-core): All classes available in the `@ckeditor/ckeditor-cloud-services-core` package have been moved to the `@ckeditor/ckeditor5-cloud-services` package. They should now be instantiated via factory methods on the `CloudServicesCore` plugin. Closes #8811. Feature (cloud-services): Created the `CloudServicesCore` plugin that exposes the base API for communication with CKEditor Cloud Services. MAJOR BREAKING CHANGE (cloud-services-core): The package has been merged into `@ckeditor/ckeditor5-cloud-services`. All classes that were available in the `@ckeditor/ckeditor-cloud-services-core` package have been moved to the `@ckeditor/ckeditor5-cloud-services` package. They should now be instantiated via factory methods on the `CloudServicesCore` plugin that's located in `@ckeditor/ckeditor5-cloud-services`. See #8811.
- Loading branch information
Showing
43 changed files
with
947 additions
and
199 deletions.
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
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
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
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
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
28 changes: 0 additions & 28 deletions
28
packages/ckeditor-cloud-services-core/docs/api/cloud-services-core.md
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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 @@ | ||
/** | ||
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
*/ | ||
|
||
describe( 'Cloud Services Core', () => { | ||
it( 'does not fail on CI because of 0 tests', () => { | ||
expect( 1 ).to.equal( 1 ); // Bacause it's easier than reconfiguring CI scripts. | ||
} ); | ||
} ); |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
packages/ckeditor5-build-decoupled-document/build/ckeditor.js.map
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
51 changes: 51 additions & 0 deletions
51
packages/ckeditor5-cloud-services/src/cloudservicescore.js
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,51 @@ | ||
/** | ||
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
*/ | ||
|
||
/** | ||
* @module cloud-services/cloudservicescore | ||
*/ | ||
|
||
import { ContextPlugin } from 'ckeditor5/src/core'; | ||
import Token from './token/token'; | ||
import UploadGateway from './uploadgateway/uploadgateway'; | ||
|
||
/** | ||
* The `CloudServicesCore` plugin exposes the base API for communication with CKEditor Cloud Services. | ||
* | ||
* @extends module:core/contextplugin~ContextPlugin | ||
*/ | ||
export default class CloudServicesCore extends ContextPlugin { | ||
/** | ||
* @inheritDoc | ||
*/ | ||
static get pluginName() { | ||
return 'CloudServicesCore'; | ||
} | ||
|
||
/** | ||
* Creates the {@link module:cloud-services/token~Token} instance. | ||
* | ||
* @param {String|Function} tokenUrlOrRefreshToken Endpoint address to download the token or a callback that provides the token. If the | ||
* value is a function it has to match the {@link module:cloud-services/token~refreshToken} interface. | ||
* @param {Object} [options] | ||
* @param {String} [options.initValue] Initial value of the token. | ||
* @param {Boolean} [options.autoRefresh=true] Specifies whether to start the refresh automatically. | ||
* @returns {module:cloud-services/token~Token} | ||
*/ | ||
createToken( tokenUrlOrRefreshToken, options ) { | ||
return new Token( tokenUrlOrRefreshToken, options ); | ||
} | ||
|
||
/** | ||
* Creates the {@link module:cloud-services/uploadgateway/uploadgateway~UploadGateway} instance. | ||
* | ||
* @param {module:cloud-services/token~Token} token Token used for authentication. | ||
* @param {String} apiAddress API address. | ||
* @returns {module:cloud-services/uploadgateway/uploadgateway~UploadGateway} | ||
*/ | ||
createUploadGateway( token, apiAddress ) { | ||
return new UploadGateway( token, apiAddress ); | ||
} | ||
} |
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
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
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
Oops, something went wrong.