@atlaskit/editor-card-provider 3.2.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/cjs/provider.js +2 -3
- package/dist/es2019/provider.js +1 -1
- package/dist/esm/provider.js +1 -1
- package/dist/types/provider.d.ts +1 -1
- package/dist/types-ts4.5/provider.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cjs/environments.js +0 -42
- package/dist/es2019/environments.js +0 -36
- package/dist/esm/environments.js +0 -36
- package/dist/types/environments.d.ts +0 -13
- package/dist/types-ts4.5/environments.d.ts +0 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-card-provider
|
|
2
2
|
|
|
3
|
+
## 3.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#75659](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/75659) [`28d133564298`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/28d133564298) - Removed duplicated version of environment.ts in editor-card-provider package and all usages were replaced with the corresponding type/function from linking-common.
|
|
8
|
+
|
|
3
9
|
## 3.2.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/dist/cjs/provider.js
CHANGED
|
@@ -18,7 +18,6 @@ var _dataloader = _interopRequireDefault(require("dataloader"));
|
|
|
18
18
|
var _linkingCommon = require("@atlaskit/linking-common");
|
|
19
19
|
var _linkExtractors = require("@atlaskit/link-extractors");
|
|
20
20
|
var _transformer = require("./transformer");
|
|
21
|
-
var _environments = require("./environments");
|
|
22
21
|
var _linkProvider = require("@atlaskit/link-provider");
|
|
23
22
|
var api = _interopRequireWildcard(require("./api"));
|
|
24
23
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
@@ -65,8 +64,8 @@ var EditorCardProvider = exports.EditorCardProvider = /*#__PURE__*/function () {
|
|
|
65
64
|
function EditorCardProvider(envKey, baseUrlOverride) {
|
|
66
65
|
var _this = this;
|
|
67
66
|
(0, _classCallCheck2.default)(this, EditorCardProvider);
|
|
68
|
-
this.baseUrl = baseUrlOverride || (0,
|
|
69
|
-
this.resolverUrl = (0,
|
|
67
|
+
this.baseUrl = baseUrlOverride || (0, _linkingCommon.getBaseUrl)(envKey);
|
|
68
|
+
this.resolverUrl = (0, _linkingCommon.getResolverUrl)(envKey, baseUrlOverride);
|
|
70
69
|
this.transformer = new _transformer.Transformer();
|
|
71
70
|
this.requestHeaders = {
|
|
72
71
|
Origin: this.baseUrl
|
package/dist/es2019/provider.js
CHANGED
|
@@ -5,7 +5,7 @@ import DataLoader from 'dataloader';
|
|
|
5
5
|
import { getStatus } from '@atlaskit/linking-common';
|
|
6
6
|
import { extractPreview } from '@atlaskit/link-extractors';
|
|
7
7
|
import { Transformer } from './transformer';
|
|
8
|
-
import { getBaseUrl, getResolverUrl } from '
|
|
8
|
+
import { getBaseUrl, getResolverUrl } from '@atlaskit/linking-common';
|
|
9
9
|
import { CardClient } from '@atlaskit/link-provider';
|
|
10
10
|
import * as api from './api';
|
|
11
11
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
package/dist/esm/provider.js
CHANGED
|
@@ -14,7 +14,7 @@ import DataLoader from 'dataloader';
|
|
|
14
14
|
import { getStatus } from '@atlaskit/linking-common';
|
|
15
15
|
import { extractPreview } from '@atlaskit/link-extractors';
|
|
16
16
|
import { Transformer } from './transformer';
|
|
17
|
-
import { getBaseUrl, getResolverUrl } from '
|
|
17
|
+
import { getBaseUrl, getResolverUrl } from '@atlaskit/linking-common';
|
|
18
18
|
import { CardClient } from '@atlaskit/link-provider';
|
|
19
19
|
import * as api from './api';
|
|
20
20
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
package/dist/types/provider.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'setimmediate';
|
|
2
2
|
import { CardAdf, CardAppearance, DatasourceAdf } from '@atlaskit/linking-common';
|
|
3
3
|
import { CardProvider } from './types';
|
|
4
|
-
import { EnvironmentsKeys } from '
|
|
4
|
+
import { EnvironmentsKeys } from '@atlaskit/linking-common';
|
|
5
5
|
export declare class EditorCardProvider implements CardProvider {
|
|
6
6
|
private baseUrl;
|
|
7
7
|
private resolverUrl;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'setimmediate';
|
|
2
2
|
import { CardAdf, CardAppearance, DatasourceAdf } from '@atlaskit/linking-common';
|
|
3
3
|
import { CardProvider } from './types';
|
|
4
|
-
import { EnvironmentsKeys } from '
|
|
4
|
+
import { EnvironmentsKeys } from '@atlaskit/linking-common';
|
|
5
5
|
export declare class EditorCardProvider implements CardProvider {
|
|
6
6
|
private baseUrl;
|
|
7
7
|
private resolverUrl;
|
package/package.json
CHANGED
package/dist/cjs/environments.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getResolverUrl = exports.getBaseUrl = exports.default = exports.BaseUrls = void 0;
|
|
7
|
-
// NOTE: This is copied from @atlaskit/link-provider.
|
|
8
|
-
// This should be moved into @atlaskit/linking-common, to be done in
|
|
9
|
-
// https://product-fabric.atlassian.net/browse/EDM-6042
|
|
10
|
-
var devBaseUrl = 'https://api-private.dev.atlassian.com';
|
|
11
|
-
var stgBaseUrl = 'https://pug.jira-dev.com/gateway/api';
|
|
12
|
-
var prodBaseUrl = 'https://api-private.atlassian.com';
|
|
13
|
-
var BaseUrls = exports.BaseUrls = {
|
|
14
|
-
dev: devBaseUrl,
|
|
15
|
-
development: devBaseUrl,
|
|
16
|
-
stg: stgBaseUrl,
|
|
17
|
-
staging: stgBaseUrl,
|
|
18
|
-
prd: prodBaseUrl,
|
|
19
|
-
prod: prodBaseUrl,
|
|
20
|
-
production: prodBaseUrl
|
|
21
|
-
};
|
|
22
|
-
var getBaseUrl = exports.getBaseUrl = function getBaseUrl(envKey) {
|
|
23
|
-
// If an environment is provided, then use Stargate.
|
|
24
|
-
if (envKey) {
|
|
25
|
-
return envKey in BaseUrls ? BaseUrls[envKey] : prodBaseUrl;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// Otherwise, use the current origin of the page.
|
|
29
|
-
return typeof window.location !== 'undefined' ? window.location.origin : '';
|
|
30
|
-
};
|
|
31
|
-
var getResolverUrl = exports.getResolverUrl = function getResolverUrl(envKey, baseUrlOverride) {
|
|
32
|
-
// If an environment is provided, then use Stargate directly for requests.
|
|
33
|
-
if (envKey || baseUrlOverride) {
|
|
34
|
-
var baseUrl = baseUrlOverride || getBaseUrl(envKey);
|
|
35
|
-
return "".concat(baseUrl, "/object-resolver");
|
|
36
|
-
} else {
|
|
37
|
-
// Otherwise, we fallback to using the Edge Proxy to access Stargate,
|
|
38
|
-
// which fixes some cookie issues with strict Browser policies.
|
|
39
|
-
return '/gateway/api/object-resolver';
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
var _default = exports.default = BaseUrls;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// NOTE: This is copied from @atlaskit/link-provider.
|
|
2
|
-
// This should be moved into @atlaskit/linking-common, to be done in
|
|
3
|
-
// https://product-fabric.atlassian.net/browse/EDM-6042
|
|
4
|
-
const devBaseUrl = 'https://api-private.dev.atlassian.com';
|
|
5
|
-
const stgBaseUrl = 'https://pug.jira-dev.com/gateway/api';
|
|
6
|
-
const prodBaseUrl = 'https://api-private.atlassian.com';
|
|
7
|
-
export const BaseUrls = {
|
|
8
|
-
dev: devBaseUrl,
|
|
9
|
-
development: devBaseUrl,
|
|
10
|
-
stg: stgBaseUrl,
|
|
11
|
-
staging: stgBaseUrl,
|
|
12
|
-
prd: prodBaseUrl,
|
|
13
|
-
prod: prodBaseUrl,
|
|
14
|
-
production: prodBaseUrl
|
|
15
|
-
};
|
|
16
|
-
export const getBaseUrl = envKey => {
|
|
17
|
-
// If an environment is provided, then use Stargate.
|
|
18
|
-
if (envKey) {
|
|
19
|
-
return envKey in BaseUrls ? BaseUrls[envKey] : prodBaseUrl;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// Otherwise, use the current origin of the page.
|
|
23
|
-
return typeof window.location !== 'undefined' ? window.location.origin : '';
|
|
24
|
-
};
|
|
25
|
-
export const getResolverUrl = (envKey, baseUrlOverride) => {
|
|
26
|
-
// If an environment is provided, then use Stargate directly for requests.
|
|
27
|
-
if (envKey || baseUrlOverride) {
|
|
28
|
-
const baseUrl = baseUrlOverride || getBaseUrl(envKey);
|
|
29
|
-
return `${baseUrl}/object-resolver`;
|
|
30
|
-
} else {
|
|
31
|
-
// Otherwise, we fallback to using the Edge Proxy to access Stargate,
|
|
32
|
-
// which fixes some cookie issues with strict Browser policies.
|
|
33
|
-
return '/gateway/api/object-resolver';
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
export default BaseUrls;
|
package/dist/esm/environments.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// NOTE: This is copied from @atlaskit/link-provider.
|
|
2
|
-
// This should be moved into @atlaskit/linking-common, to be done in
|
|
3
|
-
// https://product-fabric.atlassian.net/browse/EDM-6042
|
|
4
|
-
var devBaseUrl = 'https://api-private.dev.atlassian.com';
|
|
5
|
-
var stgBaseUrl = 'https://pug.jira-dev.com/gateway/api';
|
|
6
|
-
var prodBaseUrl = 'https://api-private.atlassian.com';
|
|
7
|
-
export var BaseUrls = {
|
|
8
|
-
dev: devBaseUrl,
|
|
9
|
-
development: devBaseUrl,
|
|
10
|
-
stg: stgBaseUrl,
|
|
11
|
-
staging: stgBaseUrl,
|
|
12
|
-
prd: prodBaseUrl,
|
|
13
|
-
prod: prodBaseUrl,
|
|
14
|
-
production: prodBaseUrl
|
|
15
|
-
};
|
|
16
|
-
export var getBaseUrl = function getBaseUrl(envKey) {
|
|
17
|
-
// If an environment is provided, then use Stargate.
|
|
18
|
-
if (envKey) {
|
|
19
|
-
return envKey in BaseUrls ? BaseUrls[envKey] : prodBaseUrl;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// Otherwise, use the current origin of the page.
|
|
23
|
-
return typeof window.location !== 'undefined' ? window.location.origin : '';
|
|
24
|
-
};
|
|
25
|
-
export var getResolverUrl = function getResolverUrl(envKey, baseUrlOverride) {
|
|
26
|
-
// If an environment is provided, then use Stargate directly for requests.
|
|
27
|
-
if (envKey || baseUrlOverride) {
|
|
28
|
-
var baseUrl = baseUrlOverride || getBaseUrl(envKey);
|
|
29
|
-
return "".concat(baseUrl, "/object-resolver");
|
|
30
|
-
} else {
|
|
31
|
-
// Otherwise, we fallback to using the Edge Proxy to access Stargate,
|
|
32
|
-
// which fixes some cookie issues with strict Browser policies.
|
|
33
|
-
return '/gateway/api/object-resolver';
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
export default BaseUrls;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export type EnvironmentsKeys = keyof typeof BaseUrls;
|
|
2
|
-
export declare const BaseUrls: {
|
|
3
|
-
dev: string;
|
|
4
|
-
development: string;
|
|
5
|
-
stg: string;
|
|
6
|
-
staging: string;
|
|
7
|
-
prd: string;
|
|
8
|
-
prod: string;
|
|
9
|
-
production: string;
|
|
10
|
-
};
|
|
11
|
-
export declare const getBaseUrl: (envKey?: keyof typeof BaseUrls) => string;
|
|
12
|
-
export declare const getResolverUrl: (envKey?: EnvironmentsKeys, baseUrlOverride?: string) => string;
|
|
13
|
-
export default BaseUrls;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export type EnvironmentsKeys = keyof typeof BaseUrls;
|
|
2
|
-
export declare const BaseUrls: {
|
|
3
|
-
dev: string;
|
|
4
|
-
development: string;
|
|
5
|
-
stg: string;
|
|
6
|
-
staging: string;
|
|
7
|
-
prd: string;
|
|
8
|
-
prod: string;
|
|
9
|
-
production: string;
|
|
10
|
-
};
|
|
11
|
-
export declare const getBaseUrl: (envKey?: keyof typeof BaseUrls) => string;
|
|
12
|
-
export declare const getResolverUrl: (envKey?: EnvironmentsKeys, baseUrlOverride?: string) => string;
|
|
13
|
-
export default BaseUrls;
|