@backstage/plugin-scaffolder-backend 1.15.2-next.0 → 1.15.2-next.1

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
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var ScaffolderEntitiesProcessor = require('./cjs/ScaffolderEntitiesProcessor-b514f9e5.cjs.js');
5
+ var ScaffolderEntitiesProcessor = require('./cjs/ScaffolderEntitiesProcessor-1d387347.cjs.js');
6
6
  var pluginScaffolderNode = require('@backstage/plugin-scaffolder-node');
7
7
  require('@backstage/catalog-model');
8
8
  require('@backstage/errors');
@@ -23,8 +23,6 @@ require('isbinaryfile');
23
23
  require('isolated-vm');
24
24
  require('lodash/get');
25
25
  require('octokit');
26
- require('child_process');
27
- require('stream');
28
26
  require('libsodium-wrappers');
29
27
  require('@octokit/webhooks');
30
28
  require('azure-devops-node-api');
@@ -39,6 +37,7 @@ require('zen-observable');
39
37
  require('p-queue');
40
38
  require('winston');
41
39
  require('nunjucks');
40
+ require('stream');
42
41
  require('lodash');
43
42
  require('@backstage/plugin-permission-node');
44
43
  require('prom-client');
@@ -48,6 +47,8 @@ require('os');
48
47
  require('@backstage/plugin-catalog-node');
49
48
 
50
49
  const createTemplateAction = pluginScaffolderNode.createTemplateAction;
50
+ const executeShellCommand = pluginScaffolderNode.executeShellCommand;
51
+ const fetchContents = pluginScaffolderNode.fetchContents;
51
52
 
52
53
  exports.DatabaseTaskStore = ScaffolderEntitiesProcessor.DatabaseTaskStore;
53
54
  exports.ScaffolderEntitiesProcessor = ScaffolderEntitiesProcessor.ScaffolderEntitiesProcessor;
@@ -84,7 +85,7 @@ exports.createPublishGitlabAction = ScaffolderEntitiesProcessor.createPublishGit
84
85
  exports.createPublishGitlabMergeRequestAction = ScaffolderEntitiesProcessor.createPublishGitlabMergeRequestAction;
85
86
  exports.createRouter = ScaffolderEntitiesProcessor.createRouter;
86
87
  exports.createWaitAction = ScaffolderEntitiesProcessor.createWaitAction;
87
- exports.executeShellCommand = ScaffolderEntitiesProcessor.executeShellCommand;
88
- exports.fetchContents = ScaffolderEntitiesProcessor.fetchContents;
89
88
  exports.createTemplateAction = createTemplateAction;
89
+ exports.executeShellCommand = executeShellCommand;
90
+ exports.fetchContents = fetchContents;
90
91
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../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 */\n\nimport {\n ActionContext as ActionContextNode,\n createTemplateAction as createTemplateActionNode,\n TaskSecrets as TaskSecretsNode,\n TemplateAction as TemplateActionNode,\n} from '@backstage/plugin-scaffolder-node';\nimport { JsonObject } from '@backstage/types';\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"],"names":["createTemplateActionNode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCO,MAAM,oBAAuB,GAAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../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 */\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';\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"],"names":["createTemplateActionNode","executeShellCommandNode","fetchContentsNode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCO,MAAM,oBAAuB,GAAAA,0CAAA;AA6B7B,MAAM,mBAAsB,GAAAC,yCAAA;AAS5B,MAAM,aAAgB,GAAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- /// <reference types="node" />
2
1
  import * as _backstage_plugin_scaffolder_node from '@backstage/plugin-scaffolder-node';
3
- import { TemplateAction as TemplateAction$1, TaskSecrets as TaskSecrets$1, ActionContext as ActionContext$1 } from '@backstage/plugin-scaffolder-node';
2
+ import { TemplateAction as TemplateAction$1, TaskSecrets as TaskSecrets$1, ActionContext as ActionContext$1, ExecuteShellCommandOptions, executeShellCommand as executeShellCommand$1, fetchContents as fetchContents$1 } from '@backstage/plugin-scaffolder-node';
4
3
  import * as _backstage_types from '@backstage/types';
5
4
  import { JsonValue, HumanDuration, JsonObject, Observable } from '@backstage/types';
6
5
  import { ScmIntegrations, ScmIntegrationRegistry, GithubCredentialsProvider } from '@backstage/integration';
@@ -10,8 +9,6 @@ import { Config } from '@backstage/config';
10
9
  import { Duration } from 'luxon';
11
10
  import { Octokit } from 'octokit';
12
11
  import { createPullRequest } from 'octokit-plugin-create-pull-request';
13
- import { SpawnOptionsWithoutStdio } from 'child_process';
14
- import { Writable } from 'stream';
15
12
  import { Knex } from 'knex';
16
13
  import * as _backstage_plugin_scaffolder_common from '@backstage/plugin-scaffolder-common';
17
14
  import { TaskSpec, TemplateEntityStepV1beta3, TemplateParametersV1beta3 } from '@backstage/plugin-scaffolder-common';
@@ -194,20 +191,6 @@ declare function createFetchTemplateAction(options: {
194
191
  replace?: boolean | undefined;
195
192
  }, _backstage_types.JsonObject>;
196
193
 
197
- /**
198
- * A helper function that reads the contents of a directory from the given URL.
199
- * Can be used in your own actions, and also used behind fetch:template and fetch:plain
200
- *
201
- * @public
202
- */
203
- declare function fetchContents(options: {
204
- reader: UrlReader;
205
- integrations: ScmIntegrations;
206
- baseUrl?: string;
207
- fetchUrl?: string;
208
- outputPath: string;
209
- }): Promise<void>;
210
-
211
194
  /**
212
195
  * Creates new action that enables deletion of files and directories in the workspace.
213
196
  * @public
@@ -727,24 +710,6 @@ declare function createGithubEnvironmentAction(options: {
727
710
  token?: string | undefined;
728
711
  }, _backstage_types.JsonObject>;
729
712
 
730
- /** @public */
731
- type RunCommandOptions = {
732
- /** command to run */
733
- command: string;
734
- /** arguments to pass the command */
735
- args: string[];
736
- /** options to pass to spawn */
737
- options?: SpawnOptionsWithoutStdio;
738
- /** stream to capture stdout and stderr output */
739
- logStream?: Writable;
740
- };
741
- /**
742
- * Run a command in a sub-process, normally a shell command.
743
- *
744
- * @public
745
- */
746
- declare const executeShellCommand: (options: RunCommandOptions) => Promise<void>;
747
-
748
713
  /**
749
714
  * Registry of all registered template actions.
750
715
  * @public
@@ -1154,5 +1119,27 @@ type TaskSecrets = TaskSecrets$1;
1154
1119
  * @deprecated Use `TemplateAction` from `@backstage/plugin-scaffolder-node` instead
1155
1120
  */
1156
1121
  type TemplateAction<TInput extends JsonObject> = TemplateAction$1<TInput>;
1122
+ /**
1123
+ * Options for {@link executeShellCommand}.
1124
+ *
1125
+ * @public
1126
+ * @deprecated Use `ExecuteShellCommandOptions` from `@backstage/plugin-scaffolder-node` instead
1127
+ */
1128
+ type RunCommandOptions = ExecuteShellCommandOptions;
1129
+ /**
1130
+ * Run a command in a sub-process, normally a shell command.
1131
+ *
1132
+ * @public
1133
+ * @deprecated Use `executeShellCommand` from `@backstage/plugin-scaffolder-node` instead
1134
+ */
1135
+ declare const executeShellCommand: typeof executeShellCommand$1;
1136
+ /**
1137
+ * A helper function that reads the contents of a directory from the given URL.
1138
+ * Can be used in your own actions, and also used behind fetch:template and fetch:plain
1139
+ *
1140
+ * @public
1141
+ * @deprecated Use `fetchContents` from `@backstage/plugin-scaffolder-node` instead
1142
+ */
1143
+ declare const fetchContents: typeof fetchContents$1;
1157
1144
 
1158
1145
  export { ActionContext, ActionPermissionRuleInput, CreateBuiltInActionsOptions, CreateGithubPullRequestActionOptions, CreateGithubPullRequestClientFactoryInput, CreateWorkerOptions, CurrentClaimedTask, DatabaseTaskStore, DatabaseTaskStoreOptions, OctokitWithPullRequestPluginClient, RouterOptions, RunCommandOptions, ScaffolderEntitiesProcessor, SerializedTask, SerializedTaskEvent, TaskBroker, TaskBrokerDispatchOptions, TaskBrokerDispatchResult, TaskCompletionState, TaskContext, TaskEventType, TaskManager, TaskSecrets, TaskStatus, TaskStore, TaskStoreCreateTaskOptions, TaskStoreCreateTaskResult, TaskStoreEmitOptions, TaskStoreListEventsOptions, TaskStoreShutDownTaskOptions, TaskWorker, TemplateAction, TemplateActionRegistry, TemplateFilter, TemplateGlobal, 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 };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@backstage/plugin-scaffolder-backend",
3
3
  "description": "The Backstage backend plugin that helps you create new things",
4
- "version": "1.15.2-next.0",
4
+ "version": "1.15.2-next.1",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "types": "./dist/index.d.ts",
7
7
  "license": "Apache-2.0",
@@ -44,22 +44,22 @@
44
44
  "build:assets": "node scripts/build-nunjucks.js"
45
45
  },
46
46
  "dependencies": {
47
- "@backstage/backend-common": "^0.19.2-next.0",
48
- "@backstage/backend-plugin-api": "^0.5.5-next.0",
49
- "@backstage/backend-tasks": "^0.5.5-next.0",
47
+ "@backstage/backend-common": "^0.19.2-next.1",
48
+ "@backstage/backend-plugin-api": "^0.6.0-next.1",
49
+ "@backstage/backend-tasks": "^0.5.5-next.1",
50
50
  "@backstage/catalog-client": "^1.4.3",
51
51
  "@backstage/catalog-model": "^1.4.1",
52
52
  "@backstage/config": "^1.0.8",
53
53
  "@backstage/errors": "^1.2.1",
54
54
  "@backstage/integration": "^1.5.1",
55
- "@backstage/plugin-auth-node": "^0.2.17-next.0",
56
- "@backstage/plugin-catalog-backend": "^1.12.0-next.0",
55
+ "@backstage/plugin-auth-node": "^0.2.17-next.1",
56
+ "@backstage/plugin-catalog-backend": "^1.12.0-next.1",
57
57
  "@backstage/plugin-catalog-common": "^1.0.15",
58
- "@backstage/plugin-catalog-node": "^1.4.1-next.0",
58
+ "@backstage/plugin-catalog-node": "^1.4.1-next.1",
59
59
  "@backstage/plugin-permission-common": "^0.7.7",
60
- "@backstage/plugin-permission-node": "^0.7.11-next.0",
60
+ "@backstage/plugin-permission-node": "^0.7.11-next.1",
61
61
  "@backstage/plugin-scaffolder-common": "^1.3.2",
62
- "@backstage/plugin-scaffolder-node": "^0.1.6-next.0",
62
+ "@backstage/plugin-scaffolder-node": "^0.1.6-next.1",
63
63
  "@backstage/types": "^1.1.0",
64
64
  "@gitbeaker/core": "^35.6.0",
65
65
  "@gitbeaker/node": "^35.1.0",
@@ -98,8 +98,8 @@
98
98
  "zod": "^3.21.4"
99
99
  },
100
100
  "devDependencies": {
101
- "@backstage/backend-test-utils": "^0.1.40-next.0",
102
- "@backstage/cli": "^0.22.10-next.0",
101
+ "@backstage/backend-test-utils": "^0.2.0-next.1",
102
+ "@backstage/cli": "^0.22.10-next.1",
103
103
  "@types/command-exists": "^1.2.0",
104
104
  "@types/fs-extra": "^9.0.1",
105
105
  "@types/git-url-parse": "^9.0.0",