@backstage/plugin-scaffolder-backend 0.0.0-nightly-20220708025041 → 0.0.0-nightly-20220709024234

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/index.cjs.js CHANGED
@@ -36,6 +36,8 @@ var zod = require('zod');
36
36
  var url = require('url');
37
37
  var os = require('os');
38
38
  var pluginCatalogBackend = require('@backstage/plugin-catalog-backend');
39
+ var backendPluginApi = require('@backstage/backend-plugin-api');
40
+ var pluginCatalogNode = require('@backstage/plugin-catalog-node');
39
41
 
40
42
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
41
43
 
@@ -571,8 +573,9 @@ function createFetchTemplateAction(options) {
571
573
  await fs__default["default"].ensureDir(outputPath);
572
574
  } else {
573
575
  const inputFilePath = backendCommon.resolveSafeChildPath(templateDir, location);
574
- if (await isbinaryfile.isBinaryFile(inputFilePath)) {
575
- ctx.logger.info(`Copying binary file ${location} to template output path.`);
576
+ const stats = await fs__default["default"].promises.lstat(inputFilePath);
577
+ if (stats.isSymbolicLink() || await isbinaryfile.isBinaryFile(inputFilePath)) {
578
+ ctx.logger.info(`Copying file binary or symbolic link at ${location}, to template output path.`);
576
579
  await fs__default["default"].copy(inputFilePath, outputPath);
577
580
  } else {
578
581
  const statsObj = await fs__default["default"].stat(inputFilePath);
@@ -4141,6 +4144,21 @@ class ScaffolderEntitiesProcessor {
4141
4144
  }
4142
4145
  }
4143
4146
 
4147
+ const scaffolderCatalogModule = backendPluginApi.createBackendModule({
4148
+ moduleId: "scaffolder.module",
4149
+ pluginId: "catalog",
4150
+ register(env) {
4151
+ env.registerInit({
4152
+ deps: {
4153
+ catalogProcessingExtensionPoint: pluginCatalogNode.catalogProcessingExtentionPoint
4154
+ },
4155
+ async init({ catalogProcessingExtensionPoint }) {
4156
+ catalogProcessingExtensionPoint.addProcessor(new ScaffolderEntitiesProcessor());
4157
+ }
4158
+ });
4159
+ }
4160
+ });
4161
+
4144
4162
  exports.DatabaseTaskStore = DatabaseTaskStore;
4145
4163
  exports.ScaffolderEntitiesProcessor = ScaffolderEntitiesProcessor;
4146
4164
  exports.TaskManager = TaskManager;
@@ -4173,4 +4191,5 @@ exports.createRouter = createRouter;
4173
4191
  exports.createTemplateAction = createTemplateAction;
4174
4192
  exports.executeShellCommand = executeShellCommand;
4175
4193
  exports.fetchContents = fetchContents;
4194
+ exports.scaffolderCatalogModule = scaffolderCatalogModule;
4176
4195
  //# sourceMappingURL=index.cjs.js.map