@backstage/plugin-catalog-backend-module-puppetdb 0.2.11 → 0.2.12-next.0

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,16 @@
1
1
  # @backstage/plugin-catalog-backend-module-puppetdb
2
2
 
3
+ ## 0.2.12-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 3507fcd: Just some more circular dep cleanup
8
+ - Updated dependencies
9
+ - @backstage/config@1.3.3-next.0
10
+ - @backstage/catalog-model@1.7.5-next.0
11
+ - @backstage/backend-plugin-api@1.4.1-next.0
12
+ - @backstage/plugin-catalog-node@1.17.2-next.0
13
+
3
14
  ## 0.2.11
4
15
 
5
16
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"read.cjs.js","sources":["../../src/puppet/read.ts"],"sourcesContent":["/*\n * Copyright 2020 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 { PuppetDbEntityProviderConfig } from '../providers';\nimport { PuppetNode, ResourceTransformer } from './types';\nimport { ResourceEntity } from '@backstage/catalog-model';\nimport { defaultResourceTransformer } from './transformers';\nimport { ResponseError } from '@backstage/errors';\nimport { ENDPOINT_FACTSETS } from './constants';\nimport { LoggerService } from '@backstage/backend-plugin-api';\n\n/**\n * Reads nodes and their facts from PuppetDB.\n *\n * @param config - The provider configuration.\n * @param opts - Additional options.\n */\nexport async function readPuppetNodes(\n config: PuppetDbEntityProviderConfig,\n opts?: {\n transformer?: ResourceTransformer;\n logger?: LoggerService;\n },\n): Promise<ResourceEntity[]> {\n const transformFn = opts?.transformer ?? defaultResourceTransformer;\n const url = new URL(ENDPOINT_FACTSETS, config.baseUrl);\n\n if (config.query) {\n url.searchParams.set('query', config.query);\n }\n\n if (opts?.logger) {\n opts.logger.debug('Reading nodes from PuppetDB', { url: url.toString() });\n }\n\n const response = await fetch(url.toString(), {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n Accept: 'application/json',\n },\n });\n\n if (!response.ok) {\n throw await ResponseError.fromResponse(response);\n }\n\n const nodes = (await response.json()) as PuppetNode[];\n const entities: ResourceEntity[] = [];\n\n for (const node of nodes) {\n const entity = await transformFn(node, config);\n if (entity) {\n entities.push(entity);\n }\n }\n\n return entities;\n}\n"],"names":["defaultResourceTransformer","ENDPOINT_FACTSETS","ResponseError"],"mappings":";;;;;;AA8BsB,eAAA,eAAA,CACpB,QACA,IAI2B,EAAA;AAC3B,EAAM,MAAA,WAAA,GAAc,MAAM,WAAe,IAAAA,uCAAA;AACzC,EAAA,MAAM,GAAM,GAAA,IAAI,GAAI,CAAAC,2BAAA,EAAmB,OAAO,OAAO,CAAA;AAErD,EAAA,IAAI,OAAO,KAAO,EAAA;AAChB,IAAA,GAAA,CAAI,YAAa,CAAA,GAAA,CAAI,OAAS,EAAA,MAAA,CAAO,KAAK,CAAA;AAAA;AAG5C,EAAA,IAAI,MAAM,MAAQ,EAAA;AAChB,IAAK,IAAA,CAAA,MAAA,CAAO,MAAM,6BAA+B,EAAA,EAAE,KAAK,GAAI,CAAA,QAAA,IAAY,CAAA;AAAA;AAG1E,EAAA,MAAM,QAAW,GAAA,MAAM,KAAM,CAAA,GAAA,CAAI,UAAY,EAAA;AAAA,IAC3C,MAAQ,EAAA,KAAA;AAAA,IACR,OAAS,EAAA;AAAA,MACP,cAAgB,EAAA,kBAAA;AAAA,MAChB,MAAQ,EAAA;AAAA;AACV,GACD,CAAA;AAED,EAAI,IAAA,CAAC,SAAS,EAAI,EAAA;AAChB,IAAM,MAAA,MAAMC,oBAAc,CAAA,YAAA,CAAa,QAAQ,CAAA;AAAA;AAGjD,EAAM,MAAA,KAAA,GAAS,MAAM,QAAA,CAAS,IAAK,EAAA;AACnC,EAAA,MAAM,WAA6B,EAAC;AAEpC,EAAA,KAAA,MAAW,QAAQ,KAAO,EAAA;AACxB,IAAA,MAAM,MAAS,GAAA,MAAM,WAAY,CAAA,IAAA,EAAM,MAAM,CAAA;AAC7C,IAAA,IAAI,MAAQ,EAAA;AACV,MAAA,QAAA,CAAS,KAAK,MAAM,CAAA;AAAA;AACtB;AAGF,EAAO,OAAA,QAAA;AACT;;;;"}
1
+ {"version":3,"file":"read.cjs.js","sources":["../../src/puppet/read.ts"],"sourcesContent":["/*\n * Copyright 2020 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 { PuppetDbEntityProviderConfig } from '../providers/PuppetDbEntityProviderConfig';\nimport { PuppetNode, ResourceTransformer } from './types';\nimport { ResourceEntity } from '@backstage/catalog-model';\nimport { defaultResourceTransformer } from './transformers';\nimport { ResponseError } from '@backstage/errors';\nimport { ENDPOINT_FACTSETS } from './constants';\nimport { LoggerService } from '@backstage/backend-plugin-api';\n\n/**\n * Reads nodes and their facts from PuppetDB.\n *\n * @param config - The provider configuration.\n * @param opts - Additional options.\n */\nexport async function readPuppetNodes(\n config: PuppetDbEntityProviderConfig,\n opts?: {\n transformer?: ResourceTransformer;\n logger?: LoggerService;\n },\n): Promise<ResourceEntity[]> {\n const transformFn = opts?.transformer ?? defaultResourceTransformer;\n const url = new URL(ENDPOINT_FACTSETS, config.baseUrl);\n\n if (config.query) {\n url.searchParams.set('query', config.query);\n }\n\n if (opts?.logger) {\n opts.logger.debug('Reading nodes from PuppetDB', { url: url.toString() });\n }\n\n const response = await fetch(url.toString(), {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n Accept: 'application/json',\n },\n });\n\n if (!response.ok) {\n throw await ResponseError.fromResponse(response);\n }\n\n const nodes = (await response.json()) as PuppetNode[];\n const entities: ResourceEntity[] = [];\n\n for (const node of nodes) {\n const entity = await transformFn(node, config);\n if (entity) {\n entities.push(entity);\n }\n }\n\n return entities;\n}\n"],"names":["defaultResourceTransformer","ENDPOINT_FACTSETS","ResponseError"],"mappings":";;;;;;AA8BsB,eAAA,eAAA,CACpB,QACA,IAI2B,EAAA;AAC3B,EAAM,MAAA,WAAA,GAAc,MAAM,WAAe,IAAAA,uCAAA;AACzC,EAAA,MAAM,GAAM,GAAA,IAAI,GAAI,CAAAC,2BAAA,EAAmB,OAAO,OAAO,CAAA;AAErD,EAAA,IAAI,OAAO,KAAO,EAAA;AAChB,IAAA,GAAA,CAAI,YAAa,CAAA,GAAA,CAAI,OAAS,EAAA,MAAA,CAAO,KAAK,CAAA;AAAA;AAG5C,EAAA,IAAI,MAAM,MAAQ,EAAA;AAChB,IAAK,IAAA,CAAA,MAAA,CAAO,MAAM,6BAA+B,EAAA,EAAE,KAAK,GAAI,CAAA,QAAA,IAAY,CAAA;AAAA;AAG1E,EAAA,MAAM,QAAW,GAAA,MAAM,KAAM,CAAA,GAAA,CAAI,UAAY,EAAA;AAAA,IAC3C,MAAQ,EAAA,KAAA;AAAA,IACR,OAAS,EAAA;AAAA,MACP,cAAgB,EAAA,kBAAA;AAAA,MAChB,MAAQ,EAAA;AAAA;AACV,GACD,CAAA;AAED,EAAI,IAAA,CAAC,SAAS,EAAI,EAAA;AAChB,IAAM,MAAA,MAAMC,oBAAc,CAAA,YAAA,CAAa,QAAQ,CAAA;AAAA;AAGjD,EAAM,MAAA,KAAA,GAAS,MAAM,QAAA,CAAS,IAAK,EAAA;AACnC,EAAA,MAAM,WAA6B,EAAC;AAEpC,EAAA,KAAA,MAAW,QAAQ,KAAO,EAAA;AACxB,IAAA,MAAM,MAAS,GAAA,MAAM,WAAY,CAAA,IAAA,EAAM,MAAM,CAAA;AAC7C,IAAA,IAAI,MAAQ,EAAA;AACV,MAAA,QAAA,CAAS,KAAK,MAAM,CAAA;AAAA;AACtB;AAGF,EAAO,OAAA,QAAA;AACT;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog-backend-module-puppetdb",
3
- "version": "0.2.11",
3
+ "version": "0.2.12-next.0",
4
4
  "description": "A Backstage catalog backend module that helps integrate towards PuppetDB",
5
5
  "backstage": {
6
6
  "role": "backend-plugin-module",
@@ -65,19 +65,19 @@
65
65
  "test": "backstage-cli package test"
66
66
  },
67
67
  "dependencies": {
68
- "@backstage/backend-plugin-api": "^1.4.0",
69
- "@backstage/catalog-model": "^1.7.4",
70
- "@backstage/config": "^1.3.2",
71
- "@backstage/errors": "^1.2.7",
72
- "@backstage/plugin-catalog-node": "^1.17.1",
73
- "@backstage/types": "^1.2.1",
68
+ "@backstage/backend-plugin-api": "1.4.1-next.0",
69
+ "@backstage/catalog-model": "1.7.5-next.0",
70
+ "@backstage/config": "1.3.3-next.0",
71
+ "@backstage/errors": "1.2.7",
72
+ "@backstage/plugin-catalog-node": "1.17.2-next.0",
73
+ "@backstage/types": "1.2.1",
74
74
  "lodash": "^4.17.21",
75
75
  "luxon": "^3.0.0",
76
76
  "uuid": "^11.0.0"
77
77
  },
78
78
  "devDependencies": {
79
- "@backstage/backend-test-utils": "^1.6.0",
80
- "@backstage/cli": "^0.33.0",
79
+ "@backstage/backend-test-utils": "1.7.0-next.1",
80
+ "@backstage/cli": "0.33.1-next.1",
81
81
  "@types/lodash": "^4.14.151",
82
82
  "msw": "^1.0.0"
83
83
  },