@perses-dev/client 0.55.0-beta.2 → 0.55.0-beta.6
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/dist/context/FetchContext.d.ts +1 -1
- package/dist/context/FetchContext.d.ts.map +1 -1
- package/dist/context/FetchContext.js +3 -3
- package/dist/context/FetchContext.js.map +1 -1
- package/dist/context/index.js +1 -1
- package/dist/context/index.js.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/model/dashboard.d.ts +2 -2
- package/dist/model/dashboard.d.ts.map +1 -1
- package/dist/model/dashboard.js.map +1 -1
- package/dist/model/datasource-api.d.ts +22 -2
- package/dist/model/datasource-api.d.ts.map +1 -1
- package/dist/model/datasource-api.js +58 -4
- package/dist/model/datasource-api.js.map +1 -1
- package/dist/model/datasource.d.ts +2 -2
- package/dist/model/datasource.d.ts.map +1 -1
- package/dist/model/datasource.js.map +1 -1
- package/dist/model/ephemeralDashboard.d.ts +2 -2
- package/dist/model/ephemeralDashboard.d.ts.map +1 -1
- package/dist/model/ephemeralDashboard.js.map +1 -1
- package/dist/model/folder.d.ts +1 -1
- package/dist/model/folder.d.ts.map +1 -1
- package/dist/model/folder.js.map +1 -1
- package/dist/model/index.js +13 -13
- package/dist/model/index.js.map +1 -1
- package/dist/model/resource.d.ts +2 -2
- package/dist/model/resource.d.ts.map +1 -1
- package/dist/model/resource.js.map +1 -1
- package/dist/model/role.d.ts +1 -1
- package/dist/model/role.d.ts.map +1 -1
- package/dist/model/role.js.map +1 -1
- package/dist/model/roleBindings.d.ts +1 -1
- package/dist/model/roleBindings.d.ts.map +1 -1
- package/dist/model/roleBindings.js.map +1 -1
- package/dist/model/secret.d.ts +1 -1
- package/dist/model/secret.d.ts.map +1 -1
- package/dist/model/secret.js.map +1 -1
- package/dist/model/user.d.ts +1 -1
- package/dist/model/user.d.ts.map +1 -1
- package/dist/model/user.js.map +1 -1
- package/dist/model/variable.d.ts +2 -2
- package/dist/model/variable.d.ts.map +1 -1
- package/dist/model/variable.js.map +1 -1
- package/dist/schema/datasource.d.ts +6 -6
- package/dist/schema/datasource.d.ts.map +1 -1
- package/dist/schema/datasource.js +3 -3
- package/dist/schema/datasource.js.map +1 -1
- package/dist/schema/index.js +6 -6
- package/dist/schema/index.js.map +1 -1
- package/dist/schema/metadata.js +1 -1
- package/dist/schema/role.d.ts +5 -5
- package/dist/schema/role.d.ts.map +1 -1
- package/dist/schema/role.js +2 -2
- package/dist/schema/role.js.map +1 -1
- package/dist/schema/rolebinding.d.ts +5 -5
- package/dist/schema/rolebinding.d.ts.map +1 -1
- package/dist/schema/rolebinding.js +2 -2
- package/dist/schema/rolebinding.js.map +1 -1
- package/dist/schema/secret.d.ts +22 -22
- package/dist/schema/secret.d.ts.map +1 -1
- package/dist/schema/secret.js +2 -2
- package/dist/schema/secret.js.map +1 -1
- package/dist/schema/user.d.ts +1 -1
- package/dist/schema/user.d.ts.map +1 -1
- package/dist/schema/user.js +2 -2
- package/dist/schema/user.js.map +1 -1
- package/dist/test/index.js +1 -1
- package/dist/test/index.js.map +1 -1
- package/dist/test/render.d.ts +2 -2
- package/dist/test/render.d.ts.map +1 -1
- package/dist/test/render.js +2 -2
- package/dist/test/render.js.map +1 -1
- package/dist/test/setup-tests.d.ts +1 -1
- package/dist/test/setup-tests.d.ts.map +1 -1
- package/dist/test/setup-tests.js +2 -1
- package/dist/test/setup-tests.js.map +1 -1
- package/dist/{cjs/model/datasource-api.js → types/globals.d.js} +2 -4
- package/dist/types/globals.d.js.map +1 -0
- package/dist/util/index.js +1 -1
- package/dist/util/index.js.map +1 -1
- package/package.json +9 -9
- package/dist/cjs/context/FetchContext.js +0 -53
- package/dist/cjs/context/index.js +0 -30
- package/dist/cjs/index.js +0 -33
- package/dist/cjs/model/dashboard.js +0 -16
- package/dist/cjs/model/datasource.js +0 -16
- package/dist/cjs/model/ephemeralDashboard.js +0 -16
- package/dist/cjs/model/folder.js +0 -16
- package/dist/cjs/model/http.js +0 -16
- package/dist/cjs/model/index.js +0 -42
- package/dist/cjs/model/kind.js +0 -39
- package/dist/cjs/model/resource.js +0 -36
- package/dist/cjs/model/role.js +0 -60
- package/dist/cjs/model/roleBindings.js +0 -16
- package/dist/cjs/model/secret.js +0 -16
- package/dist/cjs/model/user.js +0 -16
- package/dist/cjs/model/variable.js +0 -34
- package/dist/cjs/schema/datasource.js +0 -66
- package/dist/cjs/schema/index.js +0 -35
- package/dist/cjs/schema/metadata.js +0 -41
- package/dist/cjs/schema/role.js +0 -86
- package/dist/cjs/schema/rolebinding.js +0 -65
- package/dist/cjs/schema/secret.js +0 -211
- package/dist/cjs/schema/user.js +0 -57
- package/dist/cjs/test/index.js +0 -30
- package/dist/cjs/test/render.js +0 -38
- package/dist/cjs/test/setup-tests.js +0 -18
- package/dist/cjs/util/fetch.js +0 -82
- package/dist/cjs/util/index.js +0 -30
package/dist/test/render.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/test/render.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/test/render.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport type { RenderOptions, RenderResult } from '@testing-library/react';\nimport { render } from '@testing-library/react';\nimport type { ReactElement } from 'react';\n\nconst queryClient = new QueryClient({ defaultOptions: { queries: { refetchOnWindowFocus: false } } });\n\n/**\n * Test helper to render a React component with some common app-level providers wrapped around it.\n */\nexport function renderWithContext(ui: ReactElement, options?: Omit<RenderOptions, 'queries'>): RenderResult {\n return render(<QueryClientProvider client={queryClient}>{ui}</QueryClientProvider>, options);\n}\n"],"names":["QueryClient","QueryClientProvider","render","queryClient","defaultOptions","queries","refetchOnWindowFocus","renderWithContext","ui","options","client"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,WAAW,EAAEC,mBAAmB,QAAQ,wBAAwB;AAEzE,SAASC,MAAM,QAAQ,yBAAyB;AAGhD,MAAMC,cAAc,IAAIH,YAAY;IAAEI,gBAAgB;QAAEC,SAAS;YAAEC,sBAAsB;QAAM;IAAE;AAAE;AAEnG;;CAEC,GACD,OAAO,SAASC,kBAAkBC,EAAgB,EAAEC,OAAwC;IAC1F,OAAOP,qBAAO,KAACD;QAAoBS,QAAQP;kBAAcK;QAA2BC;AACtF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=setup-tests.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup-tests.d.ts","sourceRoot":"","sources":["../../src/test/setup-tests.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"setup-tests.d.ts","sourceRoot":"","sources":["../../src/test/setup-tests.ts"],"names":[],"mappings":""}
|
package/dist/test/setup-tests.js
CHANGED
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
+
import matchers from "@testing-library/jest-dom/matchers";
|
|
13
14
|
// Add testing library assertions
|
|
14
|
-
|
|
15
|
+
expect.extend(matchers);
|
|
15
16
|
|
|
16
17
|
//# sourceMappingURL=setup-tests.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/test/setup-tests.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\
|
|
1
|
+
{"version":3,"sources":["../../src/test/setup-tests.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport matchers from '@testing-library/jest-dom/matchers';\n\n// Add testing library assertions\nexpect.extend(matchers);\n"],"names":["matchers","expect","extend"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAOA,cAAc,qCAAqC;AAE1D,iCAAiC;AACjCC,OAAOC,MAAM,CAACF"}
|
|
@@ -10,7 +10,5 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
value: true
|
|
16
|
-
});
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=globals.d.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/types/globals.d.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ninterface Window {\n PERSES_APP_CONFIG?: { api_prefix?: string };\n}\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC"}
|
package/dist/util/index.js
CHANGED
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
-
export * from
|
|
13
|
+
export * from "./fetch.js";
|
|
14
14
|
|
|
15
15
|
//# sourceMappingURL=index.js.map
|
package/dist/util/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/util/index.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './fetch';\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,
|
|
1
|
+
{"version":3,"sources":["../../src/util/index.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './fetch';\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,aAAU"}
|
package/package.json
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@perses-dev/client",
|
|
3
|
-
"version": "0.55.0-beta.
|
|
3
|
+
"version": "0.55.0-beta.6",
|
|
4
4
|
"description": "Functions as an API client or Data fetching Layer for interacting with a backend service",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/perses/perses/blob/main/README.md",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/perses/
|
|
9
|
+
"url": "git+https://github.com/perses/shared.git"
|
|
10
10
|
},
|
|
11
11
|
"bugs": {
|
|
12
12
|
"url": "https://github.com/perses/perses/issues"
|
|
13
13
|
},
|
|
14
|
+
"type": "module",
|
|
14
15
|
"module": "dist/index.js",
|
|
15
|
-
"main": "dist/
|
|
16
|
+
"main": "dist/index.js",
|
|
16
17
|
"types": "dist/index.d.ts",
|
|
17
18
|
"dependencies": {
|
|
18
|
-
"@perses-dev/spec": "0.3.0-beta.
|
|
19
|
+
"@perses-dev/spec": "0.3.0-beta.5",
|
|
19
20
|
"zod": "^3.21.4"
|
|
20
21
|
},
|
|
21
22
|
"peerDependencies": {
|
|
@@ -24,15 +25,14 @@
|
|
|
24
25
|
"scripts": {
|
|
25
26
|
"clean": "rimraf dist/",
|
|
26
27
|
"build": "concurrently \"npm:build:*\"",
|
|
27
|
-
"build:cjs": "swc ./src -d dist/cjs --strip-leading-paths --config-file ../.cjs.swcrc",
|
|
28
28
|
"build:esm": "swc ./src -d dist --strip-leading-paths --config-file ../.swcrc",
|
|
29
29
|
"build:types": "tsc --project tsconfig.build.json",
|
|
30
30
|
"type-check": "tsc --noEmit",
|
|
31
31
|
"start": "concurrently -P \"npm:build:* -- {*}\" -- --watch",
|
|
32
|
-
"test": "cross-env TZ=UTC
|
|
33
|
-
"test:watch": "cross-env TZ=UTC
|
|
34
|
-
"lint": "
|
|
35
|
-
"lint:fix": "
|
|
32
|
+
"test": "cross-env TZ=UTC vitest run",
|
|
33
|
+
"test:watch": "cross-env TZ=UTC vitest",
|
|
34
|
+
"lint": "oxlint src",
|
|
35
|
+
"lint:fix": "oxlint --fix src"
|
|
36
36
|
},
|
|
37
37
|
"files": [
|
|
38
38
|
"dist"
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
// Copyright The Perses Authors
|
|
2
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
-
// you may not use this file except in compliance with the License.
|
|
4
|
-
// You may obtain a copy of the License at
|
|
5
|
-
//
|
|
6
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
//
|
|
8
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
-
// See the License for the specific language governing permissions and
|
|
12
|
-
// limitations under the License.
|
|
13
|
-
"use strict";
|
|
14
|
-
Object.defineProperty(exports, "__esModule", {
|
|
15
|
-
value: true
|
|
16
|
-
});
|
|
17
|
-
function _export(target, all) {
|
|
18
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
_export(exports, {
|
|
24
|
-
get FetchProvider () {
|
|
25
|
-
return FetchProvider;
|
|
26
|
-
},
|
|
27
|
-
get useFetch () {
|
|
28
|
-
return useFetch;
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
32
|
-
const _react = require("react");
|
|
33
|
-
const _fetch = require("../util/fetch");
|
|
34
|
-
const FetchContext = /*#__PURE__*/ (0, _react.createContext)(_fetch.fetch);
|
|
35
|
-
function FetchProvider({ fetchFn, children }) {
|
|
36
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(FetchContext.Provider, {
|
|
37
|
-
value: fetchFn,
|
|
38
|
-
children: children
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
function useFetch() {
|
|
42
|
-
const fetch = (0, _react.useContext)(FetchContext);
|
|
43
|
-
const fetchJson = (0, _react.useCallback)(async (...args)=>{
|
|
44
|
-
const response = await fetch(...args);
|
|
45
|
-
return await response.json();
|
|
46
|
-
}, [
|
|
47
|
-
fetch
|
|
48
|
-
]);
|
|
49
|
-
return {
|
|
50
|
-
fetch,
|
|
51
|
-
fetchJson
|
|
52
|
-
};
|
|
53
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
// Copyright The Perses Authors
|
|
2
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
-
// you may not use this file except in compliance with the License.
|
|
4
|
-
// You may obtain a copy of the License at
|
|
5
|
-
//
|
|
6
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
//
|
|
8
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
-
// See the License for the specific language governing permissions and
|
|
12
|
-
// limitations under the License.
|
|
13
|
-
"use strict";
|
|
14
|
-
Object.defineProperty(exports, "__esModule", {
|
|
15
|
-
value: true
|
|
16
|
-
});
|
|
17
|
-
_export_star(require("./FetchContext"), exports);
|
|
18
|
-
function _export_star(from, to) {
|
|
19
|
-
Object.keys(from).forEach(function(k) {
|
|
20
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
21
|
-
Object.defineProperty(to, k, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function() {
|
|
24
|
-
return from[k];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
return from;
|
|
30
|
-
}
|
package/dist/cjs/index.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
// Copyright The Perses Authors
|
|
2
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
-
// you may not use this file except in compliance with the License.
|
|
4
|
-
// You may obtain a copy of the License at
|
|
5
|
-
//
|
|
6
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
//
|
|
8
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
-
// See the License for the specific language governing permissions and
|
|
12
|
-
// limitations under the License.
|
|
13
|
-
"use strict";
|
|
14
|
-
Object.defineProperty(exports, "__esModule", {
|
|
15
|
-
value: true
|
|
16
|
-
});
|
|
17
|
-
_export_star(require("./util"), exports);
|
|
18
|
-
_export_star(require("./model"), exports);
|
|
19
|
-
_export_star(require("./schema"), exports);
|
|
20
|
-
_export_star(require("./context"), exports);
|
|
21
|
-
function _export_star(from, to) {
|
|
22
|
-
Object.keys(from).forEach(function(k) {
|
|
23
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
24
|
-
Object.defineProperty(to, k, {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function() {
|
|
27
|
-
return from[k];
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
return from;
|
|
33
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// Copyright The Perses Authors
|
|
2
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
-
// you may not use this file except in compliance with the License.
|
|
4
|
-
// You may obtain a copy of the License at
|
|
5
|
-
//
|
|
6
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
//
|
|
8
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
-
// See the License for the specific language governing permissions and
|
|
12
|
-
// limitations under the License.
|
|
13
|
-
"use strict";
|
|
14
|
-
Object.defineProperty(exports, "__esModule", {
|
|
15
|
-
value: true
|
|
16
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// Copyright The Perses Authors
|
|
2
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
-
// you may not use this file except in compliance with the License.
|
|
4
|
-
// You may obtain a copy of the License at
|
|
5
|
-
//
|
|
6
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
//
|
|
8
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
-
// See the License for the specific language governing permissions and
|
|
12
|
-
// limitations under the License.
|
|
13
|
-
"use strict";
|
|
14
|
-
Object.defineProperty(exports, "__esModule", {
|
|
15
|
-
value: true
|
|
16
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// Copyright The Perses Authors
|
|
2
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
-
// you may not use this file except in compliance with the License.
|
|
4
|
-
// You may obtain a copy of the License at
|
|
5
|
-
//
|
|
6
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
//
|
|
8
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
-
// See the License for the specific language governing permissions and
|
|
12
|
-
// limitations under the License.
|
|
13
|
-
"use strict";
|
|
14
|
-
Object.defineProperty(exports, "__esModule", {
|
|
15
|
-
value: true
|
|
16
|
-
});
|
package/dist/cjs/model/folder.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// Copyright The Perses Authors
|
|
2
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
-
// you may not use this file except in compliance with the License.
|
|
4
|
-
// You may obtain a copy of the License at
|
|
5
|
-
//
|
|
6
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
//
|
|
8
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
-
// See the License for the specific language governing permissions and
|
|
12
|
-
// limitations under the License.
|
|
13
|
-
"use strict";
|
|
14
|
-
Object.defineProperty(exports, "__esModule", {
|
|
15
|
-
value: true
|
|
16
|
-
});
|
package/dist/cjs/model/http.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// Copyright The Perses Authors
|
|
2
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
-
// you may not use this file except in compliance with the License.
|
|
4
|
-
// You may obtain a copy of the License at
|
|
5
|
-
//
|
|
6
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
//
|
|
8
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
-
// See the License for the specific language governing permissions and
|
|
12
|
-
// limitations under the License.
|
|
13
|
-
"use strict";
|
|
14
|
-
Object.defineProperty(exports, "__esModule", {
|
|
15
|
-
value: true
|
|
16
|
-
});
|
package/dist/cjs/model/index.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
// Copyright The Perses Authors
|
|
2
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
-
// you may not use this file except in compliance with the License.
|
|
4
|
-
// You may obtain a copy of the License at
|
|
5
|
-
//
|
|
6
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
//
|
|
8
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
-
// See the License for the specific language governing permissions and
|
|
12
|
-
// limitations under the License.
|
|
13
|
-
"use strict";
|
|
14
|
-
Object.defineProperty(exports, "__esModule", {
|
|
15
|
-
value: true
|
|
16
|
-
});
|
|
17
|
-
_export_star(require("./datasource"), exports);
|
|
18
|
-
_export_star(require("./folder"), exports);
|
|
19
|
-
_export_star(require("./kind"), exports);
|
|
20
|
-
_export_star(require("./resource"), exports);
|
|
21
|
-
_export_star(require("./datasource-api"), exports);
|
|
22
|
-
_export_star(require("./http"), exports);
|
|
23
|
-
_export_star(require("./secret"), exports);
|
|
24
|
-
_export_star(require("./role"), exports);
|
|
25
|
-
_export_star(require("./roleBindings"), exports);
|
|
26
|
-
_export_star(require("./user"), exports);
|
|
27
|
-
_export_star(require("./ephemeralDashboard"), exports);
|
|
28
|
-
_export_star(require("./variable"), exports);
|
|
29
|
-
_export_star(require("./dashboard"), exports);
|
|
30
|
-
function _export_star(from, to) {
|
|
31
|
-
Object.keys(from).forEach(function(k) {
|
|
32
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
33
|
-
Object.defineProperty(to, k, {
|
|
34
|
-
enumerable: true,
|
|
35
|
-
get: function() {
|
|
36
|
-
return from[k];
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
return from;
|
|
42
|
-
}
|
package/dist/cjs/model/kind.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// Copyright The Perses Authors
|
|
2
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
-
// you may not use this file except in compliance with the License.
|
|
4
|
-
// You may obtain a copy of the License at
|
|
5
|
-
//
|
|
6
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
//
|
|
8
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
-
// See the License for the specific language governing permissions and
|
|
12
|
-
// limitations under the License.
|
|
13
|
-
"use strict";
|
|
14
|
-
Object.defineProperty(exports, "__esModule", {
|
|
15
|
-
value: true
|
|
16
|
-
});
|
|
17
|
-
Object.defineProperty(exports, "KINDS", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function() {
|
|
20
|
-
return KINDS;
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
const KINDS = [
|
|
24
|
-
'Dashboard',
|
|
25
|
-
'Datasource',
|
|
26
|
-
'EphemeralDashboard',
|
|
27
|
-
'Folder',
|
|
28
|
-
'GlobalDatasource',
|
|
29
|
-
'GlobalRole',
|
|
30
|
-
'GlobalRoleBinding',
|
|
31
|
-
'GlobalSecret',
|
|
32
|
-
'GlobalVariable',
|
|
33
|
-
'Project',
|
|
34
|
-
'Role',
|
|
35
|
-
'RoleBinding',
|
|
36
|
-
'Secret',
|
|
37
|
-
'User',
|
|
38
|
-
'Variable'
|
|
39
|
-
];
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// Copyright The Perses Authors
|
|
2
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
-
// you may not use this file except in compliance with the License.
|
|
4
|
-
// You may obtain a copy of the License at
|
|
5
|
-
//
|
|
6
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
//
|
|
8
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
-
// See the License for the specific language governing permissions and
|
|
12
|
-
// limitations under the License.
|
|
13
|
-
"use strict";
|
|
14
|
-
Object.defineProperty(exports, "__esModule", {
|
|
15
|
-
value: true
|
|
16
|
-
});
|
|
17
|
-
function _export(target, all) {
|
|
18
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
_export(exports, {
|
|
24
|
-
get getMetadataProject () {
|
|
25
|
-
return getMetadataProject;
|
|
26
|
-
},
|
|
27
|
-
get isProjectMetadata () {
|
|
28
|
-
return isProjectMetadata;
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
function isProjectMetadata(metadata) {
|
|
32
|
-
return 'project' in metadata;
|
|
33
|
-
}
|
|
34
|
-
function getMetadataProject(metadata) {
|
|
35
|
-
return 'project' in metadata ? metadata.project : undefined;
|
|
36
|
-
}
|
package/dist/cjs/model/role.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
// Copyright The Perses Authors
|
|
2
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
-
// you may not use this file except in compliance with the License.
|
|
4
|
-
// You may obtain a copy of the License at
|
|
5
|
-
//
|
|
6
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
//
|
|
8
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
-
// See the License for the specific language governing permissions and
|
|
12
|
-
// limitations under the License.
|
|
13
|
-
"use strict";
|
|
14
|
-
Object.defineProperty(exports, "__esModule", {
|
|
15
|
-
value: true
|
|
16
|
-
});
|
|
17
|
-
function _export(target, all) {
|
|
18
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
_export(exports, {
|
|
24
|
-
get ACTIONS () {
|
|
25
|
-
return ACTIONS;
|
|
26
|
-
},
|
|
27
|
-
get GLOBAL_SCOPES () {
|
|
28
|
-
return GLOBAL_SCOPES;
|
|
29
|
-
},
|
|
30
|
-
get PROJECT_SCOPES () {
|
|
31
|
-
return PROJECT_SCOPES;
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
const ACTIONS = [
|
|
35
|
-
'*',
|
|
36
|
-
'create',
|
|
37
|
-
'read',
|
|
38
|
-
'update',
|
|
39
|
-
'delete'
|
|
40
|
-
];
|
|
41
|
-
const PROJECT_SCOPES = [
|
|
42
|
-
'*',
|
|
43
|
-
'Dashboard',
|
|
44
|
-
'Datasource',
|
|
45
|
-
'EphemeralDashboard',
|
|
46
|
-
'Folder',
|
|
47
|
-
'Project',
|
|
48
|
-
'Role',
|
|
49
|
-
'RoleBinding',
|
|
50
|
-
'Secret',
|
|
51
|
-
'Variable'
|
|
52
|
-
];
|
|
53
|
-
const GLOBAL_SCOPES = [
|
|
54
|
-
'GlobalDatasource',
|
|
55
|
-
'GlobalRole',
|
|
56
|
-
'GlobalRoleBinding',
|
|
57
|
-
'GlobalSecret',
|
|
58
|
-
'GlobalVariable',
|
|
59
|
-
'User'
|
|
60
|
-
];
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// Copyright The Perses Authors
|
|
2
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
-
// you may not use this file except in compliance with the License.
|
|
4
|
-
// You may obtain a copy of the License at
|
|
5
|
-
//
|
|
6
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
//
|
|
8
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
-
// See the License for the specific language governing permissions and
|
|
12
|
-
// limitations under the License.
|
|
13
|
-
"use strict";
|
|
14
|
-
Object.defineProperty(exports, "__esModule", {
|
|
15
|
-
value: true
|
|
16
|
-
});
|
package/dist/cjs/model/secret.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// Copyright The Perses Authors
|
|
2
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
-
// you may not use this file except in compliance with the License.
|
|
4
|
-
// You may obtain a copy of the License at
|
|
5
|
-
//
|
|
6
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
//
|
|
8
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
-
// See the License for the specific language governing permissions and
|
|
12
|
-
// limitations under the License.
|
|
13
|
-
"use strict";
|
|
14
|
-
Object.defineProperty(exports, "__esModule", {
|
|
15
|
-
value: true
|
|
16
|
-
});
|
package/dist/cjs/model/user.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// Copyright The Perses Authors
|
|
2
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
-
// you may not use this file except in compliance with the License.
|
|
4
|
-
// You may obtain a copy of the License at
|
|
5
|
-
//
|
|
6
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
//
|
|
8
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
-
// See the License for the specific language governing permissions and
|
|
12
|
-
// limitations under the License.
|
|
13
|
-
"use strict";
|
|
14
|
-
Object.defineProperty(exports, "__esModule", {
|
|
15
|
-
value: true
|
|
16
|
-
});
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
// Copyright The Perses Authors
|
|
2
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
-
// you may not use this file except in compliance with the License.
|
|
4
|
-
// You may obtain a copy of the License at
|
|
5
|
-
//
|
|
6
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
//
|
|
8
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
-
// See the License for the specific language governing permissions and
|
|
12
|
-
// limitations under the License.
|
|
13
|
-
"use strict";
|
|
14
|
-
Object.defineProperty(exports, "__esModule", {
|
|
15
|
-
value: true
|
|
16
|
-
});
|
|
17
|
-
function _export(target, all) {
|
|
18
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
_export(exports, {
|
|
24
|
-
get DEFAULT_ALL_VALUE () {
|
|
25
|
-
return DEFAULT_ALL_VALUE;
|
|
26
|
-
},
|
|
27
|
-
get getVariableProject () {
|
|
28
|
-
return getVariableProject;
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
function getVariableProject(variable) {
|
|
32
|
-
return 'project' in variable.metadata ? variable.metadata.project : undefined;
|
|
33
|
-
}
|
|
34
|
-
const DEFAULT_ALL_VALUE = '$__all';
|