altair-graphql-core 4.0.10
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/LICENSE +21 -0
- package/README.md +1 -0
- package/build/config.d.ts +140 -0
- package/build/config.js +87 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +6 -0
- package/build/plugin/base.d.ts +10 -0
- package/build/plugin/base.js +10 -0
- package/build/plugin/context/context.interface.d.ts +77 -0
- package/build/plugin/context/context.interface.js +2 -0
- package/build/plugin/event/event.interfaces.d.ts +29 -0
- package/build/plugin/event/event.interfaces.js +3 -0
- package/build/plugin/panel.d.ts +17 -0
- package/build/plugin/panel.js +27 -0
- package/build/plugin/plugin.interfaces.d.ts +49 -0
- package/build/plugin/plugin.interfaces.js +40 -0
- package/build/plugin/ui-action.d.ts +11 -0
- package/build/plugin/ui-action.js +21 -0
- package/build/subscriptions/index.d.ts +17 -0
- package/build/subscriptions/index.js +13 -0
- package/build/subscriptions/providers/action-cable.d.ts +8 -0
- package/build/subscriptions/providers/action-cable.js +56 -0
- package/build/subscriptions/providers/app-sync.d.ts +17 -0
- package/build/subscriptions/providers/app-sync.js +85 -0
- package/build/subscriptions/providers/graphql-ws.d.ts +9 -0
- package/build/subscriptions/providers/graphql-ws.js +79 -0
- package/build/subscriptions/providers/ws.d.ts +9 -0
- package/build/subscriptions/providers/ws.js +71 -0
- package/build/subscriptions/subscription-provider.d.ts +19 -0
- package/build/subscriptions/subscription-provider.js +12 -0
- package/build/theme/defaults/dark.d.ts +3 -0
- package/build/theme/defaults/dark.js +33 -0
- package/build/theme/defaults/dracula.d.ts +3 -0
- package/build/theme/defaults/dracula.js +28 -0
- package/build/theme/defaults/light.d.ts +3 -0
- package/build/theme/defaults/light.js +4 -0
- package/build/theme/index.d.ts +187 -0
- package/build/theme/index.js +23 -0
- package/build/theme/theme.d.ts +102 -0
- package/build/theme/theme.js +124 -0
- package/build/types/shared.d.ts +5 -0
- package/build/types/shared.js +2 -0
- package/build/types/state/collection.interfaces.d.ts +25 -0
- package/build/types/state/collection.interfaces.js +2 -0
- package/build/types/state/dialog.interfaces.d.ts +8 -0
- package/build/types/state/dialog.interfaces.js +2 -0
- package/build/types/state/docs.interfaces.d.ts +19 -0
- package/build/types/state/docs.interfaces.js +2 -0
- package/build/types/state/donation.interfaces.d.ts +3 -0
- package/build/types/state/donation.interfaces.js +2 -0
- package/build/types/state/environments.interfaces.d.ts +21 -0
- package/build/types/state/environments.interfaces.js +3 -0
- package/build/types/state/gql-schema.interfaces.d.ts +8 -0
- package/build/types/state/gql-schema.interfaces.js +2 -0
- package/build/types/state/header.interfaces.d.ts +6 -0
- package/build/types/state/header.interfaces.js +2 -0
- package/build/types/state/history.interfaces.d.ts +6 -0
- package/build/types/state/history.interfaces.js +2 -0
- package/build/types/state/layout.interfaces.d.ts +7 -0
- package/build/types/state/layout.interfaces.js +2 -0
- package/build/types/state/local.interfaces.d.ts +18 -0
- package/build/types/state/local.interfaces.js +2 -0
- package/build/types/state/per-window.interfaces.d.ts +25 -0
- package/build/types/state/per-window.interfaces.js +2 -0
- package/build/types/state/postrequest.interfaces.d.ts +4 -0
- package/build/types/state/postrequest.interfaces.js +2 -0
- package/build/types/state/prerequest.interfaces.d.ts +4 -0
- package/build/types/state/prerequest.interfaces.js +2 -0
- package/build/types/state/query.interfaces.d.ts +41 -0
- package/build/types/state/query.interfaces.js +4 -0
- package/build/types/state/settings.interfaces.d.ts +80 -0
- package/build/types/state/settings.interfaces.js +4 -0
- package/build/types/state/state.interfaces.d.ts +16 -0
- package/build/types/state/state.interfaces.js +2 -0
- package/build/types/state/stream.interfaces.d.ts +7 -0
- package/build/types/state/stream.interfaces.js +2 -0
- package/build/types/state/variable.interfaces.d.ts +10 -0
- package/build/types/state/variable.interfaces.js +2 -0
- package/build/types/state/window.interfaces.d.ts +35 -0
- package/build/types/state/window.interfaces.js +2 -0
- package/build/types/state/windows-meta.interfaces.d.ts +9 -0
- package/build/types/state/windows-meta.interfaces.js +2 -0
- package/build/utils/is_electron.d.ts +2 -0
- package/build/utils/is_electron.js +3 -0
- package/build/utils/logger.d.ts +5 -0
- package/build/utils/logger.js +45 -0
- package/package.json +64 -0
- package/tsconfig.json +19 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { GraphQLSchema } from 'graphql';
|
|
2
|
+
import { PerWindowState } from './per-window.interfaces';
|
|
3
|
+
export interface WindowState {
|
|
4
|
+
[id: string]: PerWindowState;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Data structure for exported windows
|
|
8
|
+
*/
|
|
9
|
+
export interface ExportWindowState {
|
|
10
|
+
version: 1;
|
|
11
|
+
type: 'window';
|
|
12
|
+
windowName: string;
|
|
13
|
+
apiUrl: string;
|
|
14
|
+
query: string;
|
|
15
|
+
headers: Array<{
|
|
16
|
+
key: string;
|
|
17
|
+
value: string;
|
|
18
|
+
}>;
|
|
19
|
+
variables: string;
|
|
20
|
+
subscriptionUrl: string;
|
|
21
|
+
subscriptionConnectionParams?: string;
|
|
22
|
+
preRequestScript?: string;
|
|
23
|
+
preRequestScriptEnabled?: boolean;
|
|
24
|
+
postRequestScript?: string;
|
|
25
|
+
postRequestScriptEnabled?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* ID of the collection this query belongs to
|
|
28
|
+
*/
|
|
29
|
+
collectionId?: number;
|
|
30
|
+
/**
|
|
31
|
+
* ID for window in collection
|
|
32
|
+
*/
|
|
33
|
+
windowIdInCollection?: string;
|
|
34
|
+
gqlSchema?: GraphQLSchema;
|
|
35
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.createLogger = void 0;
|
|
7
|
+
var loglevel_1 = __importDefault(require("loglevel"));
|
|
8
|
+
var loglevel_plugin_prefix_1 = __importDefault(require("loglevel-plugin-prefix"));
|
|
9
|
+
loglevel_plugin_prefix_1.default.reg(loglevel_1.default);
|
|
10
|
+
exports.createLogger = function (environment) {
|
|
11
|
+
if (!environment.production) {
|
|
12
|
+
loglevel_1.default.setLevel('TRACE');
|
|
13
|
+
}
|
|
14
|
+
var PREVIOUS_VERSION_KEY = 'altair__debug_previous_version';
|
|
15
|
+
var CURRENT_VERSION_KEY = 'altair__debug_current_version';
|
|
16
|
+
var previousVersion = function () { return localStorage.getItem(PREVIOUS_VERSION_KEY); };
|
|
17
|
+
var currentVersion = function () { return localStorage.getItem(CURRENT_VERSION_KEY); };
|
|
18
|
+
if (currentVersion() && currentVersion() !== environment.version) {
|
|
19
|
+
// New app version
|
|
20
|
+
// prev = current
|
|
21
|
+
// current = env.version
|
|
22
|
+
localStorage.setItem(PREVIOUS_VERSION_KEY, currentVersion());
|
|
23
|
+
localStorage.setItem(CURRENT_VERSION_KEY, environment.version);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
localStorage.setItem(CURRENT_VERSION_KEY, currentVersion());
|
|
27
|
+
}
|
|
28
|
+
Object.defineProperty(window, '__ENABLE_DEBUG_MODE__', {
|
|
29
|
+
get: function () {
|
|
30
|
+
return window._ALTAIR__ENABLE_DEBUG_MODE__;
|
|
31
|
+
},
|
|
32
|
+
set: function (value) {
|
|
33
|
+
if (value) {
|
|
34
|
+
// Display debug information.
|
|
35
|
+
console.group('⚙️🛠Altair Debug Information');
|
|
36
|
+
console.log('Previous version:', previousVersion());
|
|
37
|
+
console.log('Current version:', currentVersion());
|
|
38
|
+
console.groupEnd();
|
|
39
|
+
loglevel_1.default.setLevel('TRACE');
|
|
40
|
+
}
|
|
41
|
+
window._ALTAIR__ENABLE_DEBUG_MODE__ = value;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
return loglevel_1.default;
|
|
45
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "altair-graphql-core",
|
|
3
|
+
"version": "4.0.10",
|
|
4
|
+
"description": "Several of the core logic for altair graphql client",
|
|
5
|
+
"main": "./build/index.js",
|
|
6
|
+
"types": "./build/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 0",
|
|
9
|
+
"declarations": "tsc --declaration",
|
|
10
|
+
"prepare": "npm run declarations"
|
|
11
|
+
},
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">= 6.9.1"
|
|
14
|
+
},
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/altair-graphql/altair.git"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"altair",
|
|
21
|
+
"graphql"
|
|
22
|
+
],
|
|
23
|
+
"author": "Samuel Imolorhe <altair@sirmuel.design> (https://sirmuel.design)",
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/altair-graphql/altair/issues"
|
|
27
|
+
},
|
|
28
|
+
"homepage": "https://github.com/altair-graphql/altair#readme",
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@types/actioncable": "^5.2.5",
|
|
31
|
+
"@types/node": "^14.14.41",
|
|
32
|
+
"@types/uuid": "^8.3.0",
|
|
33
|
+
"ajv": "^8.6.0",
|
|
34
|
+
"ajv-cli": "^5.0.0",
|
|
35
|
+
"react": "^17.0.2",
|
|
36
|
+
"ts-node": "^8.5.4",
|
|
37
|
+
"typescript": "4.0.7",
|
|
38
|
+
"typescript-json-schema": "^0.50.1"
|
|
39
|
+
},
|
|
40
|
+
"funding": {
|
|
41
|
+
"type": "opencollective",
|
|
42
|
+
"url": "https://opencollective.com/altair",
|
|
43
|
+
"logo": "https://opencollective.com/altair/logo.txt"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@apollo/client": "^3.3.20",
|
|
47
|
+
"actioncable": "^5.2.6",
|
|
48
|
+
"apollo-cache-inmemory": "^1.6.6",
|
|
49
|
+
"apollo-link": "^1.2.14",
|
|
50
|
+
"apollo-link-http": "^1.5.17",
|
|
51
|
+
"aws-appsync-auth-link": "^3.0.2",
|
|
52
|
+
"aws-appsync-subscription-link": "^3.0.3",
|
|
53
|
+
"deepmerge": "^4.2.2",
|
|
54
|
+
"graphql": "^15.5.1",
|
|
55
|
+
"graphql-ws": "^5.1.2",
|
|
56
|
+
"loglevel": "^1.7.1",
|
|
57
|
+
"loglevel-plugin-prefix": "^0.8.4",
|
|
58
|
+
"rxjs": "^7.1.0",
|
|
59
|
+
"subscriptions-transport-ws": "^0.9.19",
|
|
60
|
+
"util": "^0.12.4",
|
|
61
|
+
"uuid": "^8.3.2"
|
|
62
|
+
},
|
|
63
|
+
"gitHead": "fd40c59140744404f3f1088666e97a7fcbb0f949"
|
|
64
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"outDir": "build/",
|
|
4
|
+
"rootDir": "./src",
|
|
5
|
+
"declaration": true,
|
|
6
|
+
"target": "es5",
|
|
7
|
+
"module": "commonjs",
|
|
8
|
+
"lib": [
|
|
9
|
+
"dom",
|
|
10
|
+
"esnext"
|
|
11
|
+
],
|
|
12
|
+
"types": [
|
|
13
|
+
"node"
|
|
14
|
+
],
|
|
15
|
+
"noImplicitAny": true,
|
|
16
|
+
"skipLibCheck": true,
|
|
17
|
+
"esModuleInterop": true,
|
|
18
|
+
}
|
|
19
|
+
}
|