@huawei-ide/codearts 1.0.64 → 1.0.66

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.
Files changed (2) hide show
  1. package/index.js +8 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,16 +1,20 @@
1
1
  import { EventEmitter, getOS } from './util'
2
2
 
3
3
  let hcOrigin = '';
4
- const OriginSuffix = window.location.origin.match(/(?:\w+\.)*?gitcode((?:\.\w+)+)$/);
5
- if (OriginSuffix) {
6
- const suffix = OriginSuffix[1];
4
+ const gitcodeOriginSuffix = window.location.origin.match(/(?:\w+\.)*?gitcode((?:\.\w+)+)$/);
5
+ const atomgitOriginSuffix = window.location.origin.match(/(?:\w+\.)*?atomgit((?:\.\w+)+)$/);
6
+ if (gitcodeOriginSuffix) {
7
+ const suffix = gitcodeOriginSuffix[1];
7
8
  hcOrigin = `https://idea.gitcode${suffix}`; // Adapter for gitcode multiple domains
9
+ } else if(atomgitOriginSuffix) {
10
+ const suffix = atomgitOriginSuffix[1];
11
+ hcOrigin = `https://idea.atomgit${suffix}`; // Adapter for atomgit multiple domains
8
12
  } else {
9
13
  hcOrigin = 'https://idea.gitcode.com'; // Adapter for cangjie playground
10
14
  }
11
15
  const iframe = document.createElement('iframe');
12
16
  iframe.id = 'codeartside';
13
- iframe.src = hcOrigin + '/codearts-core-web-static/1.0.97/resources/server/gitcode.html';
17
+ iframe.src = hcOrigin + '/codearts-core-web-static/1.0.99/resources/server/gitcode.html';
14
18
 
15
19
  const OS = getOS();
16
20
  const ON_DID_CHANGE = 'onDidChange';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huawei-ide/codearts",
3
- "version": "1.0.64",
3
+ "version": "1.0.66",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {