@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.
Files changed (110) hide show
  1. package/dist/context/FetchContext.d.ts +1 -1
  2. package/dist/context/FetchContext.d.ts.map +1 -1
  3. package/dist/context/FetchContext.js +3 -3
  4. package/dist/context/FetchContext.js.map +1 -1
  5. package/dist/context/index.js +1 -1
  6. package/dist/context/index.js.map +1 -1
  7. package/dist/index.js +4 -4
  8. package/dist/index.js.map +1 -1
  9. package/dist/model/dashboard.d.ts +2 -2
  10. package/dist/model/dashboard.d.ts.map +1 -1
  11. package/dist/model/dashboard.js.map +1 -1
  12. package/dist/model/datasource-api.d.ts +22 -2
  13. package/dist/model/datasource-api.d.ts.map +1 -1
  14. package/dist/model/datasource-api.js +58 -4
  15. package/dist/model/datasource-api.js.map +1 -1
  16. package/dist/model/datasource.d.ts +2 -2
  17. package/dist/model/datasource.d.ts.map +1 -1
  18. package/dist/model/datasource.js.map +1 -1
  19. package/dist/model/ephemeralDashboard.d.ts +2 -2
  20. package/dist/model/ephemeralDashboard.d.ts.map +1 -1
  21. package/dist/model/ephemeralDashboard.js.map +1 -1
  22. package/dist/model/folder.d.ts +1 -1
  23. package/dist/model/folder.d.ts.map +1 -1
  24. package/dist/model/folder.js.map +1 -1
  25. package/dist/model/index.js +13 -13
  26. package/dist/model/index.js.map +1 -1
  27. package/dist/model/resource.d.ts +2 -2
  28. package/dist/model/resource.d.ts.map +1 -1
  29. package/dist/model/resource.js.map +1 -1
  30. package/dist/model/role.d.ts +1 -1
  31. package/dist/model/role.d.ts.map +1 -1
  32. package/dist/model/role.js.map +1 -1
  33. package/dist/model/roleBindings.d.ts +1 -1
  34. package/dist/model/roleBindings.d.ts.map +1 -1
  35. package/dist/model/roleBindings.js.map +1 -1
  36. package/dist/model/secret.d.ts +1 -1
  37. package/dist/model/secret.d.ts.map +1 -1
  38. package/dist/model/secret.js.map +1 -1
  39. package/dist/model/user.d.ts +1 -1
  40. package/dist/model/user.d.ts.map +1 -1
  41. package/dist/model/user.js.map +1 -1
  42. package/dist/model/variable.d.ts +2 -2
  43. package/dist/model/variable.d.ts.map +1 -1
  44. package/dist/model/variable.js.map +1 -1
  45. package/dist/schema/datasource.d.ts +6 -6
  46. package/dist/schema/datasource.d.ts.map +1 -1
  47. package/dist/schema/datasource.js +3 -3
  48. package/dist/schema/datasource.js.map +1 -1
  49. package/dist/schema/index.js +6 -6
  50. package/dist/schema/index.js.map +1 -1
  51. package/dist/schema/metadata.js +1 -1
  52. package/dist/schema/role.d.ts +5 -5
  53. package/dist/schema/role.d.ts.map +1 -1
  54. package/dist/schema/role.js +2 -2
  55. package/dist/schema/role.js.map +1 -1
  56. package/dist/schema/rolebinding.d.ts +5 -5
  57. package/dist/schema/rolebinding.d.ts.map +1 -1
  58. package/dist/schema/rolebinding.js +2 -2
  59. package/dist/schema/rolebinding.js.map +1 -1
  60. package/dist/schema/secret.d.ts +22 -22
  61. package/dist/schema/secret.d.ts.map +1 -1
  62. package/dist/schema/secret.js +2 -2
  63. package/dist/schema/secret.js.map +1 -1
  64. package/dist/schema/user.d.ts +1 -1
  65. package/dist/schema/user.d.ts.map +1 -1
  66. package/dist/schema/user.js +2 -2
  67. package/dist/schema/user.js.map +1 -1
  68. package/dist/test/index.js +1 -1
  69. package/dist/test/index.js.map +1 -1
  70. package/dist/test/render.d.ts +2 -2
  71. package/dist/test/render.d.ts.map +1 -1
  72. package/dist/test/render.js +2 -2
  73. package/dist/test/render.js.map +1 -1
  74. package/dist/test/setup-tests.d.ts +1 -1
  75. package/dist/test/setup-tests.d.ts.map +1 -1
  76. package/dist/test/setup-tests.js +2 -1
  77. package/dist/test/setup-tests.js.map +1 -1
  78. package/dist/{cjs/model/datasource-api.js → types/globals.d.js} +2 -4
  79. package/dist/types/globals.d.js.map +1 -0
  80. package/dist/util/index.js +1 -1
  81. package/dist/util/index.js.map +1 -1
  82. package/package.json +9 -9
  83. package/dist/cjs/context/FetchContext.js +0 -53
  84. package/dist/cjs/context/index.js +0 -30
  85. package/dist/cjs/index.js +0 -33
  86. package/dist/cjs/model/dashboard.js +0 -16
  87. package/dist/cjs/model/datasource.js +0 -16
  88. package/dist/cjs/model/ephemeralDashboard.js +0 -16
  89. package/dist/cjs/model/folder.js +0 -16
  90. package/dist/cjs/model/http.js +0 -16
  91. package/dist/cjs/model/index.js +0 -42
  92. package/dist/cjs/model/kind.js +0 -39
  93. package/dist/cjs/model/resource.js +0 -36
  94. package/dist/cjs/model/role.js +0 -60
  95. package/dist/cjs/model/roleBindings.js +0 -16
  96. package/dist/cjs/model/secret.js +0 -16
  97. package/dist/cjs/model/user.js +0 -16
  98. package/dist/cjs/model/variable.js +0 -34
  99. package/dist/cjs/schema/datasource.js +0 -66
  100. package/dist/cjs/schema/index.js +0 -35
  101. package/dist/cjs/schema/metadata.js +0 -41
  102. package/dist/cjs/schema/role.js +0 -86
  103. package/dist/cjs/schema/rolebinding.js +0 -65
  104. package/dist/cjs/schema/secret.js +0 -211
  105. package/dist/cjs/schema/user.js +0 -57
  106. package/dist/cjs/test/index.js +0 -30
  107. package/dist/cjs/test/render.js +0 -38
  108. package/dist/cjs/test/setup-tests.js +0 -18
  109. package/dist/cjs/util/fetch.js +0 -82
  110. package/dist/cjs/util/index.js +0 -30
@@ -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 { render, RenderOptions, RenderResult } from '@testing-library/react';\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport { 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":["render","QueryClient","QueryClientProvider","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,MAAM,QAAqC,yBAAyB;AAC7E,SAASC,WAAW,EAAEC,mBAAmB,QAAQ,wBAAwB;AAGzE,MAAMC,cAAc,IAAIF,YAAY;IAAEG,gBAAgB;QAAEC,SAAS;YAAEC,sBAAsB;QAAM;IAAE;AAAE;AAEnG;;CAEC,GACD,OAAO,SAASC,kBAAkBC,EAAgB,EAAEC,OAAwC;IAC1F,OAAOT,qBAAO,KAACE;QAAoBQ,QAAQP;kBAAcK;QAA2BC;AACtF"}
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
- import '@testing-library/jest-dom/extend-expect';
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":"AAcA,OAAO,yCAAyC,CAAC"}
1
+ {"version":3,"file":"setup-tests.d.ts","sourceRoot":"","sources":["../../src/test/setup-tests.ts"],"names":[],"mappings":""}
@@ -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
- import '@testing-library/jest-dom/extend-expect';
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\n// Add testing library assertions\nimport '@testing-library/jest-dom/extend-expect';\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,iCAAiC;AACjC,OAAO,0CAA0C"}
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
- "use strict";
14
- Object.defineProperty(exports, "__esModule", {
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"}
@@ -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 './fetch';
13
+ export * from "./fetch.js";
14
14
 
15
15
  //# sourceMappingURL=index.js.map
@@ -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,UAAU"}
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.2",
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/perses.git"
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/cjs/index.js",
16
+ "main": "dist/index.js",
16
17
  "types": "dist/index.d.ts",
17
18
  "dependencies": {
18
- "@perses-dev/spec": "0.3.0-beta.2",
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 jest --passWithNoTests",
33
- "test:watch": "cross-env TZ=UTC jest --watch",
34
- "lint": "eslint src --ext .ts,.tsx",
35
- "lint:fix": "eslint --fix src --ext .ts,.tsx"
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
- });
@@ -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,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
- }
@@ -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
- }
@@ -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
- });
@@ -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,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';