@backstage/plugin-scaffolder-backend 1.25.0 → 1.26.0-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/dist/index.cjs.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var router = require('./cjs/router-L9rspgmo.cjs.js');
3
+ var router = require('./cjs/router-CC-UhVkG.cjs.js');
4
4
  var github = require('@backstage/plugin-scaffolder-backend-module-github');
5
5
  var gitlab = require('@backstage/plugin-scaffolder-backend-module-gitlab');
6
6
  var azure = require('@backstage/plugin-scaffolder-backend-module-azure');
@@ -34,6 +34,7 @@ require('lodash/get');
34
34
  require('@backstage/plugin-scaffolder-backend-module-gitea');
35
35
  require('uuid');
36
36
  require('@backstage/plugin-scaffolder-node/alpha');
37
+ require('os');
37
38
  require('zen-observable');
38
39
  require('lodash');
39
40
  require('p-queue');
@@ -47,7 +48,6 @@ require('@backstage/plugin-permission-common');
47
48
  require('winston-transport');
48
49
  require('triple-beam');
49
50
  require('url');
50
- require('os');
51
51
 
52
52
  function _interopNamespaceCompat(e) {
53
53
  if (e && typeof e === 'object' && 'default' in e) return e;
@@ -111,6 +111,7 @@ exports.createFetchCatalogEntityAction = router.createFetchCatalogEntityAction;
111
111
  exports.createFetchPlainAction = router.createFetchPlainAction;
112
112
  exports.createFetchPlainFileAction = router.createFetchPlainFileAction;
113
113
  exports.createFetchTemplateAction = router.createFetchTemplateAction;
114
+ exports.createFetchTemplateFileAction = router.createFetchTemplateFileAction;
114
115
  exports.createFilesystemDeleteAction = router.createFilesystemDeleteAction;
115
116
  exports.createFilesystemRenameAction = router.createFilesystemRenameAction;
116
117
  exports.createRouter = router.createRouter;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../src/scaffolder/actions/deprecated.ts","../src/deprecated.ts"],"sourcesContent":["/*\n * Copyright 2023 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 * as github from '@backstage/plugin-scaffolder-backend-module-github';\nimport * as gitlab from '@backstage/plugin-scaffolder-backend-module-gitlab';\nimport * as azure from '@backstage/plugin-scaffolder-backend-module-azure';\nimport * as bitbucket from '@backstage/plugin-scaffolder-backend-module-bitbucket';\nimport * as bitbucketCloud from '@backstage/plugin-scaffolder-backend-module-bitbucket-cloud';\nimport * as bitbucketServer from '@backstage/plugin-scaffolder-backend-module-bitbucket-server';\nimport * as gerrit from '@backstage/plugin-scaffolder-backend-module-gerrit';\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-github` instead\n */\nexport const createGithubActionsDispatchAction =\n github.createGithubActionsDispatchAction;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-github` instead\n */\nexport const createGithubDeployKeyAction = github.createGithubDeployKeyAction;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-github` instead\n */\nexport const createGithubEnvironmentAction =\n github.createGithubEnvironmentAction;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-github` instead\n */\nexport const createGithubIssuesLabelAction =\n github.createGithubIssuesLabelAction;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-github` instead\n */\nexport type CreateGithubPullRequestActionOptions =\n github.CreateGithubPullRequestActionOptions;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-github` instead\n */\nexport const createGithubRepoCreateAction = github.createGithubRepoCreateAction;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-github` instead\n */\nexport const createGithubRepoPushAction = github.createGithubRepoPushAction;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-github` instead\n */\nexport const createGithubWebhookAction = github.createGithubWebhookAction;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-github` instead\n */\nexport const createPublishGithubAction = github.createPublishGithubAction;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-github` instead\n */\nexport const createPublishGithubPullRequestAction =\n github.createPublishGithubPullRequestAction;\n\n/**\n * @public @deprecated use \"createPublishBitbucketCloudAction\" from \\@backstage/plugin-scaffolder-backend-module-bitbucket-cloud or \"createPublishBitbucketServerAction\" from \\@backstage/plugin-scaffolder-backend-module-bitbucket-server instead\n */\nexport const createPublishBitbucketAction =\n bitbucket.createPublishBitbucketAction;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-bitbucket-cloud` instead\n */\nexport const createPublishBitbucketCloudAction =\n bitbucketCloud.createPublishBitbucketCloudAction;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-bitbucket-server` instead\n */\nexport const createPublishBitbucketServerAction =\n bitbucketServer.createPublishBitbucketServerAction;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-bitbucket-server` instead\n */\nexport const createPublishBitbucketServerPullRequestAction =\n bitbucketServer.createPublishBitbucketServerPullRequestAction;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-azure` instead\n */\nexport const createPublishAzureAction = azure.createPublishAzureAction;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-gerrit` instead\n */\nexport const createPublishGerritAction = gerrit.createPublishGerritAction;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-gerrit` instead\n */\nexport const createPublishGerritReviewAction =\n gerrit.createPublishGerritReviewAction;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-gitlab` instead\n */\nexport const createPublishGitlabAction = gitlab.createPublishGitlabAction;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-gitlab` instead\n */\nexport const createPublishGitlabMergeRequestAction =\n gitlab.createPublishGitlabMergeRequestAction;\n","/*\n * Copyright 2023 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 {\n ActionContext as ActionContextNode,\n createTemplateAction as createTemplateActionNode,\n TaskSecrets as TaskSecretsNode,\n TemplateAction as TemplateActionNode,\n executeShellCommand as executeShellCommandNode,\n ExecuteShellCommandOptions as ExecuteShellCommandOptionsNode,\n fetchContents as fetchContentsNode,\n} from '@backstage/plugin-scaffolder-node';\nimport { JsonObject } from '@backstage/types';\nimport { ScaffolderEntitiesProcessor as ScaffolderEntitiesProcessorModule } from '@backstage/plugin-catalog-backend-module-scaffolder-entity-model';\n\n/**\n * @public\n * @deprecated Import from {@link @backstage/plugin-scaffolder-node#ActionContext} instead\n */\nexport type ActionContext<TInput extends JsonObject> =\n ActionContextNode<TInput>;\n\n/**\n * @public\n * @deprecated Use `createTemplateAction` from `@backstage/plugin-scaffolder-node` instead\n */\nexport const createTemplateAction = createTemplateActionNode;\n\n/**\n * @public\n * @deprecated Use `TaskSecrets` from `@backstage/plugin-scaffolder-node` instead\n */\nexport type TaskSecrets = TaskSecretsNode;\n\n/**\n * @public\n * @deprecated Use `TemplateAction` from `@backstage/plugin-scaffolder-node` instead\n */\nexport type TemplateAction<TInput extends JsonObject> =\n TemplateActionNode<TInput>;\n\n/**\n * Options for {@link executeShellCommand}.\n *\n * @public\n * @deprecated Use `ExecuteShellCommandOptions` from `@backstage/plugin-scaffolder-node` instead\n */\nexport type RunCommandOptions = ExecuteShellCommandOptionsNode;\n\n/**\n * Run a command in a sub-process, normally a shell command.\n *\n * @public\n * @deprecated Use `executeShellCommand` from `@backstage/plugin-scaffolder-node` instead\n */\nexport const executeShellCommand = executeShellCommandNode;\n\n/**\n * A helper function that reads the contents of a directory from the given URL.\n * Can be used in your own actions, and also used behind fetch:template and fetch:plain\n *\n * @public\n * @deprecated Use `fetchContents` from `@backstage/plugin-scaffolder-node` instead\n */\nexport const fetchContents = fetchContentsNode;\n\n/**\n * Adds support for scaffolder specific entity kinds to the catalog.\n *\n * @public\n * @deprecated Import from `@backstage/plugin-catalog-backend-module-scaffolder-entity-model` instead\n */\nexport const ScaffolderEntitiesProcessor = ScaffolderEntitiesProcessorModule;\n"],"names":["github","bitbucket","bitbucketCloud","bitbucketServer","azure","gerrit","gitlab","createTemplateActionNode","executeShellCommandNode","fetchContentsNode","ScaffolderEntitiesProcessorModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BO,MAAM,oCACXA,iBAAO,CAAA,kCAAA;AAMF,MAAM,8BAA8BA,iBAAO,CAAA,4BAAA;AAM3C,MAAM,gCACXA,iBAAO,CAAA,8BAAA;AAMF,MAAM,gCACXA,iBAAO,CAAA,8BAAA;AAaF,MAAM,+BAA+BA,iBAAO,CAAA,6BAAA;AAM5C,MAAM,6BAA6BA,iBAAO,CAAA,2BAAA;AAM1C,MAAM,4BAA4BA,iBAAO,CAAA,0BAAA;AAMzC,MAAM,4BAA4BA,iBAAO,CAAA,0BAAA;AAMzC,MAAM,uCACXA,iBAAO,CAAA,qCAAA;AAKF,MAAM,+BACXC,oBAAU,CAAA,6BAAA;AAML,MAAM,oCACXC,yBAAe,CAAA,kCAAA;AAMV,MAAM,qCACXC,0BAAgB,CAAA,mCAAA;AAMX,MAAM,gDACXA,0BAAgB,CAAA,8CAAA;AAMX,MAAM,2BAA2BC,gBAAM,CAAA,yBAAA;AAMvC,MAAM,4BAA4BC,iBAAO,CAAA,0BAAA;AAMzC,MAAM,kCACXA,iBAAO,CAAA,gCAAA;AAMF,MAAM,4BAA4BC,iBAAO,CAAA,0BAAA;AAMzC,MAAM,wCACXA,iBAAO,CAAA;;AC1GF,MAAM,oBAAuB,GAAAC,0CAAA;AA6B7B,MAAM,mBAAsB,GAAAC,yCAAA;AAS5B,MAAM,aAAgB,GAAAC,mCAAA;AAQtB,MAAM,2BAA8B,GAAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../src/scaffolder/actions/deprecated.ts","../src/deprecated.ts"],"sourcesContent":["/*\n * Copyright 2023 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 * as github from '@backstage/plugin-scaffolder-backend-module-github';\nimport * as gitlab from '@backstage/plugin-scaffolder-backend-module-gitlab';\nimport * as azure from '@backstage/plugin-scaffolder-backend-module-azure';\nimport * as bitbucket from '@backstage/plugin-scaffolder-backend-module-bitbucket';\nimport * as bitbucketCloud from '@backstage/plugin-scaffolder-backend-module-bitbucket-cloud';\nimport * as bitbucketServer from '@backstage/plugin-scaffolder-backend-module-bitbucket-server';\nimport * as gerrit from '@backstage/plugin-scaffolder-backend-module-gerrit';\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-github` instead\n */\nexport const createGithubActionsDispatchAction =\n github.createGithubActionsDispatchAction;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-github` instead\n */\nexport const createGithubDeployKeyAction = github.createGithubDeployKeyAction;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-github` instead\n */\nexport const createGithubEnvironmentAction =\n github.createGithubEnvironmentAction;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-github` instead\n */\nexport const createGithubIssuesLabelAction =\n github.createGithubIssuesLabelAction;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-github` instead\n */\nexport type CreateGithubPullRequestActionOptions =\n github.CreateGithubPullRequestActionOptions;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-github` instead\n */\nexport const createGithubRepoCreateAction = github.createGithubRepoCreateAction;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-github` instead\n */\nexport const createGithubRepoPushAction = github.createGithubRepoPushAction;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-github` instead\n */\nexport const createGithubWebhookAction = github.createGithubWebhookAction;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-github` instead\n */\nexport const createPublishGithubAction = github.createPublishGithubAction;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-github` instead\n */\nexport const createPublishGithubPullRequestAction =\n github.createPublishGithubPullRequestAction;\n\n/**\n * @public @deprecated use \"createPublishBitbucketCloudAction\" from \\@backstage/plugin-scaffolder-backend-module-bitbucket-cloud or \"createPublishBitbucketServerAction\" from \\@backstage/plugin-scaffolder-backend-module-bitbucket-server instead\n */\nexport const createPublishBitbucketAction =\n bitbucket.createPublishBitbucketAction;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-bitbucket-cloud` instead\n */\nexport const createPublishBitbucketCloudAction =\n bitbucketCloud.createPublishBitbucketCloudAction;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-bitbucket-server` instead\n */\nexport const createPublishBitbucketServerAction =\n bitbucketServer.createPublishBitbucketServerAction;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-bitbucket-server` instead\n */\nexport const createPublishBitbucketServerPullRequestAction =\n bitbucketServer.createPublishBitbucketServerPullRequestAction;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-azure` instead\n */\nexport const createPublishAzureAction = azure.createPublishAzureAction;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-gerrit` instead\n */\nexport const createPublishGerritAction = gerrit.createPublishGerritAction;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-gerrit` instead\n */\nexport const createPublishGerritReviewAction =\n gerrit.createPublishGerritReviewAction;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-gitlab` instead\n */\nexport const createPublishGitlabAction = gitlab.createPublishGitlabAction;\n\n/**\n * @public\n * @deprecated use import from `@backstage/plugin-scaffolder-backend-module-gitlab` instead\n */\nexport const createPublishGitlabMergeRequestAction =\n gitlab.createPublishGitlabMergeRequestAction;\n","/*\n * Copyright 2023 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 {\n ActionContext as ActionContextNode,\n createTemplateAction as createTemplateActionNode,\n TaskSecrets as TaskSecretsNode,\n TemplateAction as TemplateActionNode,\n executeShellCommand as executeShellCommandNode,\n ExecuteShellCommandOptions as ExecuteShellCommandOptionsNode,\n fetchContents as fetchContentsNode,\n} from '@backstage/plugin-scaffolder-node';\nimport { JsonObject } from '@backstage/types';\nimport { ScaffolderEntitiesProcessor as ScaffolderEntitiesProcessorModule } from '@backstage/plugin-catalog-backend-module-scaffolder-entity-model';\n\n/**\n * @public\n * @deprecated Import from {@link @backstage/plugin-scaffolder-node#ActionContext} instead\n */\nexport type ActionContext<TInput extends JsonObject> =\n ActionContextNode<TInput>;\n\n/**\n * @public\n * @deprecated Use `createTemplateAction` from `@backstage/plugin-scaffolder-node` instead\n */\nexport const createTemplateAction = createTemplateActionNode;\n\n/**\n * @public\n * @deprecated Use `TaskSecrets` from `@backstage/plugin-scaffolder-node` instead\n */\nexport type TaskSecrets = TaskSecretsNode;\n\n/**\n * @public\n * @deprecated Use `TemplateAction` from `@backstage/plugin-scaffolder-node` instead\n */\nexport type TemplateAction<TInput extends JsonObject> =\n TemplateActionNode<TInput>;\n\n/**\n * Options for {@link executeShellCommand}.\n *\n * @public\n * @deprecated Use `ExecuteShellCommandOptions` from `@backstage/plugin-scaffolder-node` instead\n */\nexport type RunCommandOptions = ExecuteShellCommandOptionsNode;\n\n/**\n * Run a command in a sub-process, normally a shell command.\n *\n * @public\n * @deprecated Use `executeShellCommand` from `@backstage/plugin-scaffolder-node` instead\n */\nexport const executeShellCommand = executeShellCommandNode;\n\n/**\n * A helper function that reads the contents of a directory from the given URL.\n * Can be used in your own actions, and also used behind fetch:template and fetch:plain\n *\n * @public\n * @deprecated Use `fetchContents` from `@backstage/plugin-scaffolder-node` instead\n */\nexport const fetchContents = fetchContentsNode;\n\n/**\n * Adds support for scaffolder specific entity kinds to the catalog.\n *\n * @public\n * @deprecated Import from `@backstage/plugin-catalog-backend-module-scaffolder-entity-model` instead\n */\nexport const ScaffolderEntitiesProcessor = ScaffolderEntitiesProcessorModule;\n"],"names":["github","bitbucket","bitbucketCloud","bitbucketServer","azure","gerrit","gitlab","createTemplateActionNode","executeShellCommandNode","fetchContentsNode","ScaffolderEntitiesProcessorModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BO,MAAM,oCACXA,iBAAO,CAAA,kCAAA;AAMF,MAAM,8BAA8BA,iBAAO,CAAA,4BAAA;AAM3C,MAAM,gCACXA,iBAAO,CAAA,8BAAA;AAMF,MAAM,gCACXA,iBAAO,CAAA,8BAAA;AAaF,MAAM,+BAA+BA,iBAAO,CAAA,6BAAA;AAM5C,MAAM,6BAA6BA,iBAAO,CAAA,2BAAA;AAM1C,MAAM,4BAA4BA,iBAAO,CAAA,0BAAA;AAMzC,MAAM,4BAA4BA,iBAAO,CAAA,0BAAA;AAMzC,MAAM,uCACXA,iBAAO,CAAA,qCAAA;AAKF,MAAM,+BACXC,oBAAU,CAAA,6BAAA;AAML,MAAM,oCACXC,yBAAe,CAAA,kCAAA;AAMV,MAAM,qCACXC,0BAAgB,CAAA,mCAAA;AAMX,MAAM,gDACXA,0BAAgB,CAAA,8CAAA;AAMX,MAAM,2BAA2BC,gBAAM,CAAA,yBAAA;AAMvC,MAAM,4BAA4BC,iBAAO,CAAA,0BAAA;AAMzC,MAAM,kCACXA,iBAAO,CAAA,gCAAA;AAMF,MAAM,4BAA4BC,iBAAO,CAAA,0BAAA;AAMzC,MAAM,wCACXA,iBAAO,CAAA;;AC1GF,MAAM,oBAAuB,GAAAC,0CAAA;AA6B7B,MAAM,mBAAsB,GAAAC,yCAAA;AAS5B,MAAM,aAAgB,GAAAC,mCAAA;AAQtB,MAAM,2BAA8B,GAAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index.d.ts CHANGED
@@ -206,6 +206,28 @@ declare function createFetchTemplateAction(options: {
206
206
  token?: string | undefined;
207
207
  }, _backstage_types.JsonObject>;
208
208
 
209
+ /**
210
+ * Downloads a single file and templates variables into file.
211
+ * Then places the result in the workspace, or optionally in a subdirectory
212
+ * specified by the 'targetPath' input option.
213
+ * @public
214
+ */
215
+ declare function createFetchTemplateFileAction(options: {
216
+ reader: UrlReaderService;
217
+ integrations: ScmIntegrations;
218
+ additionalTemplateFilters?: Record<string, TemplateFilter$1>;
219
+ additionalTemplateGlobals?: Record<string, TemplateGlobal$1>;
220
+ }): _backstage_plugin_scaffolder_node.TemplateAction<{
221
+ url: string;
222
+ targetPath: string;
223
+ values: any;
224
+ cookiecutterCompat?: boolean | undefined;
225
+ replace?: boolean | undefined;
226
+ trimBlocks?: boolean | undefined;
227
+ lstripBlocks?: boolean | undefined;
228
+ token?: string | undefined;
229
+ }, _backstage_types.JsonObject>;
230
+
209
231
  /**
210
232
  * Creates new action that enables deletion of files and directories in the workspace.
211
233
  * @public
@@ -444,6 +466,7 @@ type TaskStoreEmitOptions<TBody = JsonObject> = {
444
466
  * @public
445
467
  */
446
468
  type TaskStoreListEventsOptions = {
469
+ isTaskRecoverable?: boolean;
447
470
  taskId: string;
448
471
  after?: number | undefined;
449
472
  };
@@ -486,6 +509,9 @@ type TaskStoreCreateTaskResult = {
486
509
  interface TaskStore {
487
510
  cancelTask?(options: TaskStoreEmitOptions): Promise<void>;
488
511
  createTask(options: TaskStoreCreateTaskOptions): Promise<TaskStoreCreateTaskResult>;
512
+ retryTask?(options: {
513
+ taskId: string;
514
+ }): Promise<void>;
489
515
  recoverTasks?(options: TaskStoreRecoverTaskOptions): Promise<{
490
516
  ids: string[];
491
517
  }>;
@@ -504,11 +530,44 @@ interface TaskStore {
504
530
  taskId: string;
505
531
  }[];
506
532
  }>;
533
+ list?(options: {
534
+ filters?: {
535
+ createdBy?: string | string[];
536
+ status?: TaskStatus | TaskStatus[];
537
+ };
538
+ pagination?: {
539
+ limit?: number;
540
+ offset?: number;
541
+ };
542
+ order?: {
543
+ order: 'asc' | 'desc';
544
+ field: string;
545
+ }[];
546
+ }): Promise<{
547
+ tasks: SerializedTask[];
548
+ totalTasks?: number;
549
+ }>;
550
+ /**
551
+ * @deprecated Make sure to pass `createdBy` and `status` in the `filters` parameter instead
552
+ */
507
553
  list?(options: {
508
554
  createdBy?: string;
509
555
  status?: TaskStatus;
556
+ filters?: {
557
+ createdBy?: string | string[];
558
+ status?: TaskStatus | TaskStatus[];
559
+ };
560
+ pagination?: {
561
+ limit?: number;
562
+ offset?: number;
563
+ };
564
+ order?: {
565
+ order: 'asc' | 'desc';
566
+ field: string;
567
+ }[];
510
568
  }): Promise<{
511
569
  tasks: SerializedTask[];
570
+ totalTasks?: number;
512
571
  }>;
513
572
  emitLogEvent(options: TaskStoreEmitOptions): Promise<void>;
514
573
  getTaskState?({ taskId }: {
@@ -562,8 +621,21 @@ declare class DatabaseTaskStore implements TaskStore {
562
621
  list(options: {
563
622
  createdBy?: string;
564
623
  status?: TaskStatus$1;
624
+ filters?: {
625
+ createdBy?: string | string[];
626
+ status?: TaskStatus$1 | TaskStatus$1[];
627
+ };
628
+ pagination?: {
629
+ limit?: number;
630
+ offset?: number;
631
+ };
632
+ order?: {
633
+ order: 'asc' | 'desc';
634
+ field: string;
635
+ }[];
565
636
  }): Promise<{
566
637
  tasks: SerializedTask$1[];
638
+ totalTasks?: number;
567
639
  }>;
568
640
  getTask(taskId: string): Promise<SerializedTask$1>;
569
641
  createTask(options: TaskStoreCreateTaskOptions): Promise<TaskStoreCreateTaskResult>;
@@ -612,6 +684,9 @@ declare class DatabaseTaskStore implements TaskStore {
612
684
  cancelTask(options: TaskStoreEmitOptions<{
613
685
  message: string;
614
686
  } & JsonObject>): Promise<void>;
687
+ retryTask?(options: {
688
+ taskId: string;
689
+ }): Promise<void>;
615
690
  recoverTasks(options: TaskStoreRecoverTaskOptions): Promise<{
616
691
  ids: string[];
617
692
  }>;
@@ -690,6 +765,9 @@ interface CurrentClaimedTask {
690
765
  * The creator of the task.
691
766
  */
692
767
  createdBy?: string;
768
+ /**
769
+ * The workspace of the task.
770
+ */
693
771
  workspace?: Promise<Buffer>;
694
772
  }
695
773
 
@@ -855,4 +933,4 @@ declare const fetchContents: typeof fetchContents$1;
855
933
  */
856
934
  declare const ScaffolderEntitiesProcessor: typeof ScaffolderEntitiesProcessor$1;
857
935
 
858
- export { type ActionContext, type ActionPermissionRuleInput, type CreateBuiltInActionsOptions, type CreateGithubPullRequestActionOptions, type CreateWorkerOptions, type CurrentClaimedTask, DatabaseTaskStore, type DatabaseTaskStoreOptions, type RouterOptions, type RunCommandOptions, ScaffolderEntitiesProcessor, type SerializedTask, type SerializedTaskEvent, type TaskBroker, type TaskBrokerDispatchOptions, type TaskBrokerDispatchResult, type TaskCompletionState, type TaskContext, type TaskEventType, TaskManager, type TaskSecrets, type TaskStatus, type TaskStore, type TaskStoreCreateTaskOptions, type TaskStoreCreateTaskResult, type TaskStoreEmitOptions, type TaskStoreListEventsOptions, type TaskStoreRecoverTaskOptions, type TaskStoreShutDownTaskOptions, TaskWorker, type TemplateAction, TemplateActionRegistry, type TemplateFilter, type TemplateGlobal, type TemplatePermissionRuleInput, createBuiltinActions, createCatalogRegisterAction, createCatalogWriteAction, createDebugLogAction, createFetchCatalogEntityAction, createFetchPlainAction, createFetchPlainFileAction, createFetchTemplateAction, createFilesystemDeleteAction, createFilesystemRenameAction, createGithubActionsDispatchAction, createGithubDeployKeyAction, createGithubEnvironmentAction, createGithubIssuesLabelAction, createGithubRepoCreateAction, createGithubRepoPushAction, createGithubWebhookAction, createPublishAzureAction, createPublishBitbucketAction, createPublishBitbucketCloudAction, createPublishBitbucketServerAction, createPublishBitbucketServerPullRequestAction, createPublishGerritAction, createPublishGerritReviewAction, createPublishGithubAction, createPublishGithubPullRequestAction, createPublishGitlabAction, createPublishGitlabMergeRequestAction, createRouter, createTemplateAction, createWaitAction, executeShellCommand, fetchContents };
936
+ export { type ActionContext, type ActionPermissionRuleInput, type CreateBuiltInActionsOptions, type CreateGithubPullRequestActionOptions, type CreateWorkerOptions, type CurrentClaimedTask, DatabaseTaskStore, type DatabaseTaskStoreOptions, type RouterOptions, type RunCommandOptions, ScaffolderEntitiesProcessor, type SerializedTask, type SerializedTaskEvent, type TaskBroker, type TaskBrokerDispatchOptions, type TaskBrokerDispatchResult, type TaskCompletionState, type TaskContext, type TaskEventType, TaskManager, type TaskSecrets, type TaskStatus, type TaskStore, type TaskStoreCreateTaskOptions, type TaskStoreCreateTaskResult, type TaskStoreEmitOptions, type TaskStoreListEventsOptions, type TaskStoreRecoverTaskOptions, type TaskStoreShutDownTaskOptions, TaskWorker, type TemplateAction, TemplateActionRegistry, type TemplateFilter, type TemplateGlobal, type TemplatePermissionRuleInput, createBuiltinActions, createCatalogRegisterAction, createCatalogWriteAction, createDebugLogAction, createFetchCatalogEntityAction, createFetchPlainAction, createFetchPlainFileAction, createFetchTemplateAction, createFetchTemplateFileAction, createFilesystemDeleteAction, createFilesystemRenameAction, createGithubActionsDispatchAction, createGithubDeployKeyAction, createGithubEnvironmentAction, createGithubIssuesLabelAction, createGithubRepoCreateAction, createGithubRepoPushAction, createGithubWebhookAction, createPublishAzureAction, createPublishBitbucketAction, createPublishBitbucketCloudAction, createPublishBitbucketServerAction, createPublishBitbucketServerPullRequestAction, createPublishGerritAction, createPublishGerritReviewAction, createPublishGithubAction, createPublishGithubPullRequestAction, createPublishGitlabAction, createPublishGitlabMergeRequestAction, createRouter, createTemplateAction, createWaitAction, executeShellCommand, fetchContents };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-scaffolder-backend",
3
- "version": "1.25.0",
3
+ "version": "1.26.0-next.0",
4
4
  "description": "The Backstage backend plugin that helps you create new things",
5
5
  "backstage": {
6
6
  "role": "backend-plugin",
@@ -34,6 +34,7 @@
34
34
  "default": "./dist/index.cjs.js"
35
35
  },
36
36
  "./alpha": {
37
+ "backstage": "@backstage/BackendFeature",
37
38
  "require": "./dist/alpha.cjs.js",
38
39
  "types": "./dist/alpha.d.ts",
39
40
  "default": "./dist/alpha.cjs.js"
@@ -61,29 +62,29 @@
61
62
  },
62
63
  "dependencies": {
63
64
  "@backstage/backend-common": "^0.25.0",
64
- "@backstage/backend-defaults": "^0.5.0",
65
- "@backstage/backend-plugin-api": "^1.0.0",
65
+ "@backstage/backend-defaults": "^0.5.1-next.0",
66
+ "@backstage/backend-plugin-api": "^1.0.1-next.0",
66
67
  "@backstage/catalog-client": "^1.7.0",
67
68
  "@backstage/catalog-model": "^1.7.0",
68
69
  "@backstage/config": "^1.2.0",
69
70
  "@backstage/errors": "^1.2.4",
70
71
  "@backstage/integration": "^1.15.0",
71
- "@backstage/plugin-auth-node": "^0.5.2",
72
+ "@backstage/plugin-auth-node": "^0.5.3-next.0",
72
73
  "@backstage/plugin-bitbucket-cloud-common": "^0.2.23",
73
- "@backstage/plugin-catalog-backend-module-scaffolder-entity-model": "^0.2.0",
74
- "@backstage/plugin-catalog-node": "^1.13.0",
74
+ "@backstage/plugin-catalog-backend-module-scaffolder-entity-model": "^0.2.1-next.0",
75
+ "@backstage/plugin-catalog-node": "^1.13.1-next.0",
75
76
  "@backstage/plugin-permission-common": "^0.8.1",
76
- "@backstage/plugin-permission-node": "^0.8.3",
77
- "@backstage/plugin-scaffolder-backend-module-azure": "^0.2.0",
78
- "@backstage/plugin-scaffolder-backend-module-bitbucket": "^0.3.0",
79
- "@backstage/plugin-scaffolder-backend-module-bitbucket-cloud": "^0.2.0",
80
- "@backstage/plugin-scaffolder-backend-module-bitbucket-server": "^0.2.0",
81
- "@backstage/plugin-scaffolder-backend-module-gerrit": "^0.2.0",
82
- "@backstage/plugin-scaffolder-backend-module-gitea": "^0.2.0",
83
- "@backstage/plugin-scaffolder-backend-module-github": "^0.5.0",
84
- "@backstage/plugin-scaffolder-backend-module-gitlab": "^0.5.0",
77
+ "@backstage/plugin-permission-node": "^0.8.4-next.0",
78
+ "@backstage/plugin-scaffolder-backend-module-azure": "^0.2.1-next.0",
79
+ "@backstage/plugin-scaffolder-backend-module-bitbucket": "^0.3.1-next.0",
80
+ "@backstage/plugin-scaffolder-backend-module-bitbucket-cloud": "^0.2.1-next.0",
81
+ "@backstage/plugin-scaffolder-backend-module-bitbucket-server": "^0.2.1-next.0",
82
+ "@backstage/plugin-scaffolder-backend-module-gerrit": "^0.2.1-next.0",
83
+ "@backstage/plugin-scaffolder-backend-module-gitea": "^0.2.1-next.0",
84
+ "@backstage/plugin-scaffolder-backend-module-github": "^0.5.1-next.0",
85
+ "@backstage/plugin-scaffolder-backend-module-gitlab": "^0.5.1-next.0",
85
86
  "@backstage/plugin-scaffolder-common": "^1.5.6",
86
- "@backstage/plugin-scaffolder-node": "^0.4.11",
87
+ "@backstage/plugin-scaffolder-node": "^0.5.0-next.0",
87
88
  "@backstage/types": "^1.1.1",
88
89
  "@opentelemetry/api": "^1.3.0",
89
90
  "@types/express": "^4.17.6",
@@ -114,11 +115,11 @@
114
115
  "zod": "^3.22.4"
115
116
  },
116
117
  "devDependencies": {
117
- "@backstage/backend-app-api": "^1.0.0",
118
- "@backstage/backend-defaults": "^0.5.0",
119
- "@backstage/backend-test-utils": "^1.0.0",
120
- "@backstage/cli": "^0.27.1",
121
- "@backstage/plugin-scaffolder-node-test-utils": "^0.1.12",
118
+ "@backstage/backend-app-api": "^1.0.1-next.0",
119
+ "@backstage/backend-defaults": "^0.5.1-next.0",
120
+ "@backstage/backend-test-utils": "^1.0.1-next.0",
121
+ "@backstage/cli": "^0.28.0-next.0",
122
+ "@backstage/plugin-scaffolder-node-test-utils": "^0.1.13-next.0",
122
123
  "@types/fs-extra": "^11.0.0",
123
124
  "@types/nunjucks": "^3.1.4",
124
125
  "@types/supertest": "^2.0.8",