@backstage/plugin-config-schema 0.1.37-next.1 → 0.1.37

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 CHANGED
@@ -1,5 +1,29 @@
1
1
  # @backstage/plugin-config-schema
2
2
 
3
+ ## 0.1.37
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/core-components@0.12.3
9
+ - @backstage/core-plugin-api@1.3.0
10
+ - @backstage/config@1.0.6
11
+ - @backstage/errors@1.1.4
12
+ - @backstage/theme@0.2.16
13
+ - @backstage/types@1.0.2
14
+
15
+ ## 0.1.37-next.2
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies
20
+ - @backstage/core-plugin-api@1.3.0-next.1
21
+ - @backstage/config@1.0.6-next.0
22
+ - @backstage/core-components@0.12.3-next.2
23
+ - @backstage/errors@1.1.4
24
+ - @backstage/theme@0.2.16
25
+ - @backstage/types@1.0.2
26
+
3
27
  ## 0.1.37-next.1
4
28
 
5
29
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../src/api/types.ts","../src/api/StaticSchemaLoader.ts","../src/routes.ts","../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\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\nimport { Schema } from 'jsonschema';\nimport { createApiRef } from '@backstage/core-plugin-api';\nimport { Observable } from '@backstage/types';\n\n/** @public */\nexport interface ConfigSchemaResult {\n schema?: Schema;\n}\n\n/** @public */\nexport interface ConfigSchemaApi {\n schema$(): Observable<ConfigSchemaResult>;\n}\n\n/** @public */\nexport const configSchemaApiRef = createApiRef<ConfigSchemaApi>({\n id: 'plugin.config-schema',\n});\n","/*\n * Copyright 2021 The Backstage Authors\n *\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\nimport ObservableImpl from 'zen-observable';\nimport { ResponseError } from '@backstage/errors';\nimport { Schema } from 'jsonschema';\nimport { ConfigSchemaApi, ConfigSchemaResult } from './types';\nimport { Observable } from '@backstage/types';\n\nconst DEFAULT_URL = 'config-schema.json';\n\n/**\n * A ConfigSchemaApi implementation that loads the configuration from a URL.\n *\n * @public\n */\nexport class StaticSchemaLoader implements ConfigSchemaApi {\n private readonly url: string;\n\n constructor(options: { url?: string } = {}) {\n this.url = options?.url ?? DEFAULT_URL;\n }\n\n schema$(): Observable<ConfigSchemaResult> {\n return new ObservableImpl(subscriber => {\n this.fetchSchema().then(\n schema => subscriber.next({ schema }),\n error => subscriber.error(error),\n );\n });\n }\n\n private async fetchSchema(): Promise<undefined | Schema> {\n const res = await fetch(this.url);\n\n if (!res.ok) {\n if (res.status === 404) {\n return undefined;\n }\n\n throw await ResponseError.fromResponse(res);\n }\n\n return await res.json();\n }\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\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 { createRouteRef } from '@backstage/core-plugin-api';\n\nexport const rootRouteRef = createRouteRef({\n id: 'config-schema',\n});\n","/*\n * Copyright 2021 The Backstage Authors\n *\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 { rootRouteRef } from './routes';\n\nimport {\n createPlugin,\n createRoutableExtension,\n} from '@backstage/core-plugin-api';\n\n/** @public */\nexport const configSchemaPlugin = createPlugin({\n id: 'config-schema',\n routes: {\n root: rootRouteRef,\n },\n});\n\n/** @public */\nexport const ConfigSchemaPage = configSchemaPlugin.provide(\n createRoutableExtension({\n name: 'ConfigSchemaPage',\n component: () =>\n import('./components/ConfigSchemaPage').then(m => m.ConfigSchemaPage),\n mountPoint: rootRouteRef,\n }),\n);\n"],"names":[],"mappings":";;;;AA+BO,MAAM,qBAAqB,YAA8B,CAAA;AAAA,EAC9D,EAAI,EAAA,sBAAA;AACN,CAAC;;ACXD,MAAM,WAAc,GAAA,oBAAA,CAAA;AAOb,MAAM,kBAA8C,CAAA;AAAA,EAGzD,WAAA,CAAY,OAA4B,GAAA,EAAI,EAAA;AAhC9C,IAAA,IAAA,EAAA,CAAA;AAiCI,IAAK,IAAA,CAAA,GAAA,GAAA,CAAM,EAAS,GAAA,OAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,OAAA,CAAA,GAAA,KAAT,IAAgB,GAAA,EAAA,GAAA,WAAA,CAAA;AAAA,GAC7B;AAAA,EAEA,OAA0C,GAAA;AACxC,IAAO,OAAA,IAAI,eAAe,CAAc,UAAA,KAAA;AACtC,MAAA,IAAA,CAAK,aAAc,CAAA,IAAA;AAAA,QACjB,CAAU,MAAA,KAAA,UAAA,CAAW,IAAK,CAAA,EAAE,QAAQ,CAAA;AAAA,QACpC,CAAA,KAAA,KAAS,UAAW,CAAA,KAAA,CAAM,KAAK,CAAA;AAAA,OACjC,CAAA;AAAA,KACD,CAAA,CAAA;AAAA,GACH;AAAA,EAEA,MAAc,WAA2C,GAAA;AACvD,IAAA,MAAM,GAAM,GAAA,MAAM,KAAM,CAAA,IAAA,CAAK,GAAG,CAAA,CAAA;AAEhC,IAAI,IAAA,CAAC,IAAI,EAAI,EAAA;AACX,MAAI,IAAA,GAAA,CAAI,WAAW,GAAK,EAAA;AACtB,QAAO,OAAA,KAAA,CAAA,CAAA;AAAA,OACT;AAEA,MAAM,MAAA,MAAM,aAAc,CAAA,YAAA,CAAa,GAAG,CAAA,CAAA;AAAA,KAC5C;AAEA,IAAO,OAAA,MAAM,IAAI,IAAK,EAAA,CAAA;AAAA,GACxB;AACF;;ACzCO,MAAM,eAAe,cAAe,CAAA;AAAA,EACzC,EAAI,EAAA,eAAA;AACN,CAAC,CAAA;;ACIM,MAAM,qBAAqB,YAAa,CAAA;AAAA,EAC7C,EAAI,EAAA,eAAA;AAAA,EACJ,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,YAAA;AAAA,GACR;AACF,CAAC,EAAA;AAGM,MAAM,mBAAmB,kBAAmB,CAAA,OAAA;AAAA,EACjD,uBAAwB,CAAA;AAAA,IACtB,IAAM,EAAA,kBAAA;AAAA,IACN,WAAW,MACT,OAAO,+BAAiC,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,gBAAgB,CAAA;AAAA,IACtE,UAAY,EAAA,YAAA;AAAA,GACb,CAAA;AACH;;;;"}
1
+ {"version":3,"file":"index.esm.js","sources":["../src/api/types.ts","../src/api/StaticSchemaLoader.ts","../src/routes.ts","../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\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\nimport { Schema } from 'jsonschema';\nimport { createApiRef } from '@backstage/core-plugin-api';\nimport { Observable } from '@backstage/types';\n\n/** @public */\nexport interface ConfigSchemaResult {\n schema?: Schema;\n}\n\n/** @public */\nexport interface ConfigSchemaApi {\n schema$(): Observable<ConfigSchemaResult>;\n}\n\n/** @public */\nexport const configSchemaApiRef = createApiRef<ConfigSchemaApi>({\n id: 'plugin.config-schema',\n});\n","/*\n * Copyright 2021 The Backstage Authors\n *\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\nimport ObservableImpl from 'zen-observable';\nimport { ResponseError } from '@backstage/errors';\nimport { Schema } from 'jsonschema';\nimport { ConfigSchemaApi, ConfigSchemaResult } from './types';\nimport { Observable } from '@backstage/types';\n\nconst DEFAULT_URL = 'config-schema.json';\n\n/**\n * A ConfigSchemaApi implementation that loads the configuration from a URL.\n *\n * @public\n */\nexport class StaticSchemaLoader implements ConfigSchemaApi {\n private readonly url: string;\n\n constructor(options: { url?: string } = {}) {\n this.url = options?.url ?? DEFAULT_URL;\n }\n\n schema$(): Observable<ConfigSchemaResult> {\n return new ObservableImpl(subscriber => {\n this.fetchSchema().then(\n schema => subscriber.next({ schema }),\n error => subscriber.error(error),\n );\n });\n }\n\n private async fetchSchema(): Promise<undefined | Schema> {\n const res = await fetch(this.url);\n\n if (!res.ok) {\n if (res.status === 404) {\n return undefined;\n }\n\n throw await ResponseError.fromResponse(res);\n }\n\n return await res.json();\n }\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\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 { createRouteRef } from '@backstage/core-plugin-api';\n\nexport const rootRouteRef = createRouteRef({\n id: 'config-schema',\n});\n","/*\n * Copyright 2021 The Backstage Authors\n *\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 { rootRouteRef } from './routes';\n\nimport {\n createPlugin,\n createRoutableExtension,\n} from '@backstage/core-plugin-api';\n\n/** @public */\nexport const configSchemaPlugin = createPlugin({\n id: 'config-schema',\n routes: {\n root: rootRouteRef,\n },\n});\n\n/** @public */\nexport const ConfigSchemaPage = configSchemaPlugin.provide(\n createRoutableExtension({\n name: 'ConfigSchemaPage',\n component: () =>\n import('./components/ConfigSchemaPage').then(m => m.ConfigSchemaPage),\n mountPoint: rootRouteRef,\n }),\n);\n"],"names":[],"mappings":";;;;AA+BO,MAAM,qBAAqB,YAA8B,CAAA;AAAA,EAC9D,EAAI,EAAA,sBAAA;AACN,CAAC;;ACXD,MAAM,WAAc,GAAA,oBAAA,CAAA;AAOb,MAAM,kBAA8C,CAAA;AAAA,EAGzD,WAAA,CAAY,OAA4B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,EAAA,kBAAA;AAAA,IACN,SAAA,EAAW,MACT,OAAO,6BAA+B,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,gBAAgB,CAAA;AAAA,IACtE,UAAY,EAAA,YAAA;AAAA,GACb,CAAA;AACH;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@backstage/plugin-config-schema",
3
3
  "description": "A Backstage plugin that lets you browse the configuration schema of your app",
4
- "version": "0.1.37-next.1",
4
+ "version": "0.1.37",
5
5
  "main": "dist/index.esm.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "license": "Apache-2.0",
@@ -23,9 +23,9 @@
23
23
  "clean": "backstage-cli package clean"
24
24
  },
25
25
  "dependencies": {
26
- "@backstage/config": "^1.0.6-next.0",
27
- "@backstage/core-components": "^0.12.3-next.1",
28
- "@backstage/core-plugin-api": "^1.2.1-next.0",
26
+ "@backstage/config": "^1.0.6",
27
+ "@backstage/core-components": "^0.12.3",
28
+ "@backstage/core-plugin-api": "^1.3.0",
29
29
  "@backstage/errors": "^1.1.4",
30
30
  "@backstage/theme": "^0.2.16",
31
31
  "@backstage/types": "^1.0.2",
@@ -40,10 +40,10 @@
40
40
  "react": "^16.13.1 || ^17.0.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@backstage/cli": "^0.22.1-next.1",
44
- "@backstage/core-app-api": "^1.3.1-next.0",
45
- "@backstage/dev-utils": "^1.0.11-next.1",
46
- "@backstage/test-utils": "^1.2.4-next.0",
43
+ "@backstage/cli": "^0.22.1",
44
+ "@backstage/core-app-api": "^1.4.0",
45
+ "@backstage/dev-utils": "^1.0.11",
46
+ "@backstage/test-utils": "^1.2.4",
47
47
  "@testing-library/jest-dom": "^5.10.1",
48
48
  "@testing-library/react": "^12.1.3",
49
49
  "@testing-library/user-event": "^14.0.0",