@backstage/plugin-scaffolder-backend 1.10.1 → 1.11.0-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/CHANGELOG.md CHANGED
@@ -1,16 +1,56 @@
1
1
  # @backstage/plugin-scaffolder-backend
2
2
 
3
- ## 1.10.1
3
+ ## 1.11.0-next.1
4
+
5
+ ### Minor Changes
6
+
7
+ - 127154930f: Renamed the export `scaffolderCatalogModule` to `catalogModuleTemplateKind` in order to follow the new recommended naming patterns of backend system items. This is technically a breaking change but in an alpha export, so take care to change your imports if you have already migrated to the new backend system.
4
8
 
5
9
  ### Patch Changes
6
10
 
11
+ - 66cf22fdc4: Updated dependency `esbuild` to `^0.17.0`.
12
+ - Updated dependencies
13
+ - @backstage/plugin-catalog-backend@1.7.2-next.1
14
+ - @backstage/backend-common@0.18.2-next.1
15
+ - @backstage/backend-plugin-api@0.3.2-next.1
16
+ - @backstage/backend-tasks@0.4.3-next.1
17
+ - @backstage/catalog-client@1.3.1-next.0
18
+ - @backstage/catalog-model@1.1.6-next.0
19
+ - @backstage/config@1.0.6
20
+ - @backstage/errors@1.1.4
21
+ - @backstage/integration@1.4.2
22
+ - @backstage/types@1.0.2
23
+ - @backstage/plugin-auth-node@0.2.11-next.1
24
+ - @backstage/plugin-catalog-node@1.3.3-next.1
25
+ - @backstage/plugin-scaffolder-common@1.2.5-next.0
26
+ - @backstage/plugin-scaffolder-node@0.1.0-next.1
27
+
28
+ ## 1.11.0-next.0
29
+
30
+ ### Minor Changes
31
+
32
+ - 0b2952ee4b: Added the option to overwrite files in the `targetPath` of the `template:fetch` action
33
+
34
+ ### Patch Changes
35
+
36
+ - ad3edc402d: **Deprecations**: The following are deprecated and should instead be imported from the new package `@backstage/plugin-scaffolder-node`:
37
+
38
+ - `ActionContext`
39
+ - `createTemplateAction`
40
+ - `TaskSecrets`
41
+ - `TemplateAction`
42
+
7
43
  - Updated dependencies
8
- - @backstage/backend-common@0.18.1
9
- - @backstage/backend-tasks@0.4.2
10
- - @backstage/plugin-auth-node@0.2.10
11
- - @backstage/plugin-catalog-backend@1.7.1
12
- - @backstage/plugin-catalog-node@1.3.2
13
- - @backstage/backend-plugin-api@0.3.1
44
+ - @backstage/plugin-scaffolder-node@0.1.0-next.0
45
+ - @backstage/catalog-model@1.1.6-next.0
46
+ - @backstage/backend-common@0.18.2-next.0
47
+ - @backstage/catalog-client@1.3.1-next.0
48
+ - @backstage/plugin-catalog-backend@1.7.2-next.0
49
+ - @backstage/plugin-catalog-node@1.3.3-next.0
50
+ - @backstage/plugin-scaffolder-common@1.2.5-next.0
51
+ - @backstage/backend-tasks@0.4.3-next.0
52
+ - @backstage/plugin-auth-node@0.2.11-next.0
53
+ - @backstage/backend-plugin-api@0.3.2-next.0
14
54
 
15
55
  ## 1.10.0
16
56
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-scaffolder-backend",
3
- "version": "1.10.1",
3
+ "version": "1.11.0-next.1",
4
4
  "main": "../dist/index.cjs.js",
5
5
  "types": "../dist/index.alpha.d.ts"
6
6
  }
@@ -6,6 +6,7 @@
6
6
 
7
7
  /// <reference types="node" />
8
8
 
9
+ import { ActionContext as ActionContext_2 } from '@backstage/plugin-scaffolder-node';
9
10
  import { BackendFeature } from '@backstage/backend-plugin-api';
10
11
  import { CatalogApi } from '@backstage/catalog-client';
11
12
  import { CatalogProcessor } from '@backstage/plugin-catalog-backend';
@@ -25,52 +26,28 @@ import { Observable } from '@backstage/types';
25
26
  import { Octokit } from 'octokit';
26
27
  import { PluginDatabaseManager } from '@backstage/backend-common';
27
28
  import { PluginTaskScheduler } from '@backstage/backend-tasks';
28
- import { Schema } from 'jsonschema';
29
29
  import { ScmIntegrationRegistry } from '@backstage/integration';
30
30
  import { ScmIntegrations } from '@backstage/integration';
31
31
  import { SpawnOptionsWithoutStdio } from 'child_process';
32
+ import { TaskSecrets as TaskSecrets_2 } from '@backstage/plugin-scaffolder-node';
32
33
  import { TaskSpec } from '@backstage/plugin-scaffolder-common';
33
34
  import { TaskSpecV1beta3 } from '@backstage/plugin-scaffolder-common';
34
- import { TemplateInfo } from '@backstage/plugin-scaffolder-common';
35
+ import { TemplateAction as TemplateAction_2 } from '@backstage/plugin-scaffolder-node';
35
36
  import { UrlReader } from '@backstage/backend-common';
36
- import { UserEntity } from '@backstage/catalog-model';
37
37
  import { Writable } from 'stream';
38
38
 
39
39
  /**
40
- * ActionContext is passed into scaffolder actions.
41
40
  * @public
41
+ * @deprecated Import from {@link @backstage/plugin-scaffolder-node#ActionContext} instead
42
42
  */
43
- export declare type ActionContext<Input extends JsonObject> = {
44
- logger: Logger;
45
- logStream: Writable;
46
- secrets?: TaskSecrets;
47
- workspacePath: string;
48
- input: Input;
49
- output(name: string, value: JsonValue): void;
50
- /**
51
- * Creates a temporary directory for use by the action, which is then cleaned up automatically.
52
- */
53
- createTemporaryDirectory(): Promise<string>;
54
- templateInfo?: TemplateInfo;
55
- /**
56
- * Whether this action invocation is a dry-run or not.
57
- * This will only ever be true if the actions as marked as supporting dry-runs.
58
- */
59
- isDryRun?: boolean;
60
- /**
61
- * The user which triggered the action.
62
- */
63
- user?: {
64
- /**
65
- * The decorated entity from the Catalog
66
- */
67
- entity?: UserEntity;
68
- /**
69
- * An entity ref for the author of the task
70
- */
71
- ref?: string;
72
- };
73
- };
43
+ export declare type ActionContext<TInput extends JsonObject> = ActionContext_2<TInput>;
44
+
45
+ /**
46
+ * Registers support for the Template kind to the catalog backend plugin.
47
+ *
48
+ * @alpha
49
+ */
50
+ export declare const catalogModuleTemplateKind: () => BackendFeature;
74
51
 
75
52
  /**
76
53
  * A function to generate create a list of default actions that the scaffolder provides.
@@ -79,7 +56,7 @@ export declare type ActionContext<Input extends JsonObject> = {
79
56
  * @public
80
57
  * @returns A list of actions that can be used in the scaffolder
81
58
  */
82
- export declare const createBuiltinActions: (options: CreateBuiltInActionsOptions) => TemplateAction<JsonObject>[];
59
+ export declare const createBuiltinActions: (options: CreateBuiltInActionsOptions) => TemplateAction_2<JsonObject>[];
83
60
 
84
61
  /**
85
62
  * The options passed to {@link createBuiltinActions}
@@ -117,7 +94,7 @@ export declare interface CreateBuiltInActionsOptions {
117
94
  export declare function createCatalogRegisterAction(options: {
118
95
  catalogClient: CatalogApi;
119
96
  integrations: ScmIntegrations;
120
- }): TemplateAction< {
97
+ }): TemplateAction_2< {
121
98
  catalogInfoUrl: string;
122
99
  optional?: boolean | undefined;
123
100
  } | {
@@ -130,7 +107,7 @@ optional?: boolean | undefined;
130
107
  * Writes a catalog descriptor file containing the provided entity to a path in the workspace.
131
108
  * @public
132
109
  */
133
- export declare function createCatalogWriteAction(): TemplateAction< {
110
+ export declare function createCatalogWriteAction(): TemplateAction_2< {
134
111
  filePath?: string | undefined;
135
112
  entity: Entity;
136
113
  }>;
@@ -145,7 +122,7 @@ entity: Entity;
145
122
  *
146
123
  * @public
147
124
  */
148
- export declare function createDebugLogAction(): TemplateAction< {
125
+ export declare function createDebugLogAction(): TemplateAction_2< {
149
126
  message?: string | undefined;
150
127
  listWorkspace?: boolean | undefined;
151
128
  }>;
@@ -156,7 +133,7 @@ listWorkspace?: boolean | undefined;
156
133
  */
157
134
  export declare function createFetchCatalogEntityAction(options: {
158
135
  catalogClient: CatalogApi;
159
- }): TemplateAction< {
136
+ }): TemplateAction_2< {
160
137
  entityRef: string;
161
138
  optional?: boolean | undefined;
162
139
  }>;
@@ -169,7 +146,7 @@ optional?: boolean | undefined;
169
146
  export declare function createFetchPlainAction(options: {
170
147
  reader: UrlReader;
171
148
  integrations: ScmIntegrations;
172
- }): TemplateAction< {
149
+ }): TemplateAction_2< {
173
150
  url: string;
174
151
  targetPath?: string | undefined;
175
152
  }>;
@@ -186,7 +163,7 @@ export declare function createFetchTemplateAction(options: {
186
163
  integrations: ScmIntegrations;
187
164
  additionalTemplateFilters?: Record<string, TemplateFilter>;
188
165
  additionalTemplateGlobals?: Record<string, TemplateGlobal>;
189
- }): TemplateAction< {
166
+ }): TemplateAction_2< {
190
167
  url: string;
191
168
  targetPath?: string | undefined;
192
169
  values: any;
@@ -197,13 +174,14 @@ templateFileExtension?: string | boolean | undefined;
197
174
  copyWithoutRender?: string[] | undefined;
198
175
  copyWithoutTemplating?: string[] | undefined;
199
176
  cookiecutterCompat?: boolean | undefined;
177
+ replace?: boolean | undefined;
200
178
  }>;
201
179
 
202
180
  /**
203
181
  * Creates new action that enables deletion of files and directories in the workspace.
204
182
  * @public
205
183
  */
206
- export declare const createFilesystemDeleteAction: () => TemplateAction< {
184
+ export declare const createFilesystemDeleteAction: () => TemplateAction_2< {
207
185
  files: string[];
208
186
  }>;
209
187
 
@@ -211,7 +189,7 @@ files: string[];
211
189
  * Creates a new action that allows renames of files and directories in the workspace.
212
190
  * @public
213
191
  */
214
- export declare const createFilesystemRenameAction: () => TemplateAction< {
192
+ export declare const createFilesystemRenameAction: () => TemplateAction_2< {
215
193
  files: Array<{
216
194
  from: string;
217
195
  to: string;
@@ -226,7 +204,7 @@ overwrite?: boolean;
226
204
  export declare function createGithubActionsDispatchAction(options: {
227
205
  integrations: ScmIntegrations;
228
206
  githubCredentialsProvider?: GithubCredentialsProvider;
229
- }): TemplateAction< {
207
+ }): TemplateAction_2< {
230
208
  repoUrl: string;
231
209
  workflowId: string;
232
210
  branchOrTagName: string;
@@ -243,7 +221,7 @@ token?: string | undefined;
243
221
  export declare function createGithubIssuesLabelAction(options: {
244
222
  integrations: ScmIntegrationRegistry;
245
223
  githubCredentialsProvider?: GithubCredentialsProvider;
246
- }): TemplateAction< {
224
+ }): TemplateAction_2< {
247
225
  repoUrl: string;
248
226
  number: number;
249
227
  labels: string[];
@@ -290,7 +268,7 @@ export declare type CreateGithubPullRequestClientFactoryInput = {
290
268
  export declare function createGithubRepoCreateAction(options: {
291
269
  integrations: ScmIntegrationRegistry;
292
270
  githubCredentialsProvider?: GithubCredentialsProvider;
293
- }): TemplateAction< {
271
+ }): TemplateAction_2< {
294
272
  repoUrl: string;
295
273
  description?: string | undefined;
296
274
  homepage?: string | undefined;
@@ -349,7 +327,7 @@ export declare function createGithubRepoPushAction(options: {
349
327
  integrations: ScmIntegrationRegistry;
350
328
  config: Config;
351
329
  githubCredentialsProvider?: GithubCredentialsProvider;
352
- }): TemplateAction< {
330
+ }): TemplateAction_2< {
353
331
  repoUrl: string;
354
332
  description?: string | undefined;
355
333
  defaultBranch?: string | undefined;
@@ -387,7 +365,7 @@ export declare function createGithubWebhookAction(options: {
387
365
  integrations: ScmIntegrationRegistry;
388
366
  defaultWebhookSecret?: string;
389
367
  githubCredentialsProvider?: GithubCredentialsProvider;
390
- }): TemplateAction< {
368
+ }): TemplateAction_2< {
391
369
  repoUrl: string;
392
370
  webhookUrl: string;
393
371
  webhookSecret?: string | undefined;
@@ -406,7 +384,7 @@ token?: string | undefined;
406
384
  export declare function createPublishAzureAction(options: {
407
385
  integrations: ScmIntegrationRegistry;
408
386
  config: Config;
409
- }): TemplateAction< {
387
+ }): TemplateAction_2< {
410
388
  repoUrl: string;
411
389
  description?: string | undefined;
412
390
  defaultBranch?: string | undefined;
@@ -426,7 +404,7 @@ gitAuthorEmail?: string | undefined;
426
404
  export declare function createPublishBitbucketAction(options: {
427
405
  integrations: ScmIntegrationRegistry;
428
406
  config: Config;
429
- }): TemplateAction< {
407
+ }): TemplateAction_2< {
430
408
  repoUrl: string;
431
409
  description?: string | undefined;
432
410
  defaultBranch?: string | undefined;
@@ -447,7 +425,7 @@ gitAuthorEmail?: string | undefined;
447
425
  export declare function createPublishBitbucketCloudAction(options: {
448
426
  integrations: ScmIntegrationRegistry;
449
427
  config: Config;
450
- }): TemplateAction< {
428
+ }): TemplateAction_2< {
451
429
  repoUrl: string;
452
430
  description?: string | undefined;
453
431
  defaultBranch?: string | undefined;
@@ -464,7 +442,7 @@ token?: string | undefined;
464
442
  export declare function createPublishBitbucketServerAction(options: {
465
443
  integrations: ScmIntegrationRegistry;
466
444
  config: Config;
467
- }): TemplateAction< {
445
+ }): TemplateAction_2< {
468
446
  repoUrl: string;
469
447
  description?: string | undefined;
470
448
  defaultBranch?: string | undefined;
@@ -485,7 +463,7 @@ gitAuthorEmail?: string | undefined;
485
463
  export declare function createPublishGerritAction(options: {
486
464
  integrations: ScmIntegrationRegistry;
487
465
  config: Config;
488
- }): TemplateAction< {
466
+ }): TemplateAction_2< {
489
467
  repoUrl: string;
490
468
  description: string;
491
469
  defaultBranch?: string | undefined;
@@ -502,7 +480,7 @@ sourcePath?: string | undefined;
502
480
  export declare function createPublishGerritReviewAction(options: {
503
481
  integrations: ScmIntegrationRegistry;
504
482
  config: Config;
505
- }): TemplateAction< {
483
+ }): TemplateAction_2< {
506
484
  repoUrl: string;
507
485
  branch?: string | undefined;
508
486
  sourcePath?: string | undefined;
@@ -521,7 +499,7 @@ export declare function createPublishGithubAction(options: {
521
499
  integrations: ScmIntegrationRegistry;
522
500
  config: Config;
523
501
  githubCredentialsProvider?: GithubCredentialsProvider;
524
- }): TemplateAction< {
502
+ }): TemplateAction_2< {
525
503
  repoUrl: string;
526
504
  description?: string | undefined;
527
505
  homepage?: string | undefined;
@@ -580,7 +558,7 @@ requiredCommitSigning?: boolean | undefined;
580
558
  * Creates a Github Pull Request action.
581
559
  * @public
582
560
  */
583
- export declare const createPublishGithubPullRequestAction: ({ integrations, githubCredentialsProvider, clientFactory, }: CreateGithubPullRequestActionOptions) => TemplateAction< {
561
+ export declare const createPublishGithubPullRequestAction: ({ integrations, githubCredentialsProvider, clientFactory, }: CreateGithubPullRequestActionOptions) => TemplateAction_2< {
584
562
  title: string;
585
563
  branchName: string;
586
564
  description: string;
@@ -602,7 +580,7 @@ teamReviewers?: string[] | undefined;
602
580
  export declare function createPublishGitlabAction(options: {
603
581
  integrations: ScmIntegrationRegistry;
604
582
  config: Config;
605
- }): TemplateAction< {
583
+ }): TemplateAction_2< {
606
584
  repoUrl: string;
607
585
  defaultBranch?: string | undefined;
608
586
  repoVisibility?: "internal" | "private" | "public" | undefined;
@@ -622,7 +600,7 @@ topics?: string[] | undefined;
622
600
  */
623
601
  export declare const createPublishGitlabMergeRequestAction: (options: {
624
602
  integrations: ScmIntegrationRegistry;
625
- }) => TemplateAction< {
603
+ }) => TemplateAction_2< {
626
604
  repoUrl: string;
627
605
  title: string;
628
606
  description: string;
@@ -644,10 +622,10 @@ assignee?: string | undefined;
644
622
  export declare function createRouter(options: RouterOptions): Promise<express.Router>;
645
623
 
646
624
  /**
647
- * This function is used to create new template actions to get type safety.
648
625
  * @public
626
+ * @deprecated Use `createTemplateAction` from `@backstage/plugin-scaffolder-node` instead
649
627
  */
650
- export declare const createTemplateAction: <TInput extends JsonObject>(templateAction: TemplateAction<TInput>) => TemplateAction<TInput>;
628
+ export declare const createTemplateAction: <TInput extends JsonObject>(templateAction: TemplateAction_2<TInput>) => TemplateAction_2<TInput>;
651
629
 
652
630
  /**
653
631
  * CreateWorkerOptions
@@ -694,7 +672,7 @@ export declare interface CurrentClaimedTask {
694
672
  /**
695
673
  * The secrets that are stored with the task.
696
674
  */
697
- secrets?: TaskSecrets;
675
+ secrets?: TaskSecrets_2;
698
676
  /**
699
677
  * The creator of the task.
700
678
  */
@@ -794,7 +772,7 @@ export declare interface RouterOptions {
794
772
  database: PluginDatabaseManager;
795
773
  catalogClient: CatalogApi;
796
774
  scheduler?: PluginTaskScheduler;
797
- actions?: TemplateAction<any>[];
775
+ actions?: TemplateAction_2<any>[];
798
776
  /**
799
777
  * @deprecated taskWorkers is deprecated in favor of concurrentTasksLimit option with a single TaskWorker
800
778
  * @defaultValue 1
@@ -823,12 +801,6 @@ export declare type RunCommandOptions = {
823
801
  logStream?: Writable;
824
802
  };
825
803
 
826
- /**
827
- * @alpha
828
- * Registers the ScaffolderEntitiesProcessor with the catalog processing extension point.
829
- */
830
- export declare const scaffolderCatalogModule: () => BackendFeature;
831
-
832
804
  /** @public */
833
805
  export declare class ScaffolderEntitiesProcessor implements CatalogProcessor {
834
806
  getProcessorName(): string;
@@ -839,16 +811,18 @@ export declare class ScaffolderEntitiesProcessor implements CatalogProcessor {
839
811
 
840
812
  /**
841
813
  * Catalog plugin
814
+ *
842
815
  * @alpha
843
816
  */
844
817
  export declare const scaffolderPlugin: (options: ScaffolderPluginOptions) => BackendFeature;
845
818
 
846
819
  /**
847
820
  * Catalog plugin options
821
+ *
848
822
  * @alpha
849
823
  */
850
824
  export declare type ScaffolderPluginOptions = {
851
- actions?: TemplateAction<any>[];
825
+ actions?: TemplateAction_2<any>[];
852
826
  taskWorkers?: number;
853
827
  taskBroker?: TaskBroker;
854
828
  additionalTemplateFilters?: Record<string, TemplateFilter>;
@@ -867,7 +841,7 @@ export declare type SerializedTask = {
867
841
  createdAt: string;
868
842
  lastHeartbeatAt?: string;
869
843
  createdBy?: string;
870
- secrets?: TaskSecrets;
844
+ secrets?: TaskSecrets_2;
871
845
  };
872
846
 
873
847
  /**
@@ -916,7 +890,7 @@ export declare interface TaskBroker {
916
890
  */
917
891
  export declare type TaskBrokerDispatchOptions = {
918
892
  spec: TaskSpec;
919
- secrets?: TaskSecrets;
893
+ secrets?: TaskSecrets_2;
920
894
  createdBy?: string;
921
895
  };
922
896
 
@@ -943,7 +917,7 @@ export declare type TaskCompletionState = 'failed' | 'completed';
943
917
  */
944
918
  export declare interface TaskContext {
945
919
  spec: TaskSpec;
946
- secrets?: TaskSecrets;
920
+ secrets?: TaskSecrets_2;
947
921
  createdBy?: string;
948
922
  done: boolean;
949
923
  isDryRun?: boolean;
@@ -973,7 +947,7 @@ export declare class TaskManager implements TaskContext {
973
947
  static create(task: CurrentClaimedTask, storage: TaskStore, logger: Logger): TaskManager;
974
948
  private constructor();
975
949
  get spec(): TaskSpecV1beta3;
976
- get secrets(): TaskSecrets | undefined;
950
+ get secrets(): TaskSecrets_2 | undefined;
977
951
  get createdBy(): string | undefined;
978
952
  getWorkspaceName(): Promise<string>;
979
953
  get done(): boolean;
@@ -983,13 +957,10 @@ export declare class TaskManager implements TaskContext {
983
957
  }
984
958
 
985
959
  /**
986
- * TaskSecrets
987
- *
988
960
  * @public
961
+ * @deprecated Use `TaskSecrets` from `@backstage/plugin-scaffolder-node` instead
989
962
  */
990
- export declare type TaskSecrets = Record<string, string> & {
991
- backstageToken?: string;
992
- };
963
+ export declare type TaskSecrets = TaskSecrets_2;
993
964
 
994
965
  /**
995
966
  * The status of each step of the Task
@@ -1039,7 +1010,7 @@ export declare interface TaskStore {
1039
1010
  export declare type TaskStoreCreateTaskOptions = {
1040
1011
  spec: TaskSpec;
1041
1012
  createdBy?: string;
1042
- secrets?: TaskSecrets;
1013
+ secrets?: TaskSecrets_2;
1043
1014
  };
1044
1015
 
1045
1016
  /**
@@ -1094,21 +1065,11 @@ export declare class TaskWorker {
1094
1065
  runOneTask(task: TaskContext): Promise<void>;
1095
1066
  }
1096
1067
 
1097
- /** @public */
1098
- export declare type TemplateAction<Input extends JsonObject> = {
1099
- id: string;
1100
- description?: string;
1101
- examples?: {
1102
- description: string;
1103
- example: string;
1104
- }[];
1105
- supportsDryRun?: boolean;
1106
- schema?: {
1107
- input?: Schema;
1108
- output?: Schema;
1109
- };
1110
- handler: (ctx: ActionContext<Input>) => Promise<void>;
1111
- };
1068
+ /**
1069
+ * @public
1070
+ * @deprecated Use `TemplateAction` from `@backstage/plugin-scaffolder-node` instead
1071
+ */
1072
+ export declare type TemplateAction<TInput extends JsonObject> = TemplateAction_2<TInput>;
1112
1073
 
1113
1074
  /**
1114
1075
  * Registry of all registered template actions.
@@ -1116,9 +1077,9 @@ export declare type TemplateAction<Input extends JsonObject> = {
1116
1077
  */
1117
1078
  export declare class TemplateActionRegistry {
1118
1079
  private readonly actions;
1119
- register<TInput extends JsonObject>(action: TemplateAction<TInput>): void;
1120
- get(actionId: string): TemplateAction<JsonObject>;
1121
- list(): TemplateAction<JsonObject>[];
1080
+ register<TInput extends JsonObject>(action: TemplateAction_2<TInput>): void;
1081
+ get(actionId: string): TemplateAction_2<JsonObject>;
1082
+ list(): TemplateAction_2<JsonObject>[];
1122
1083
  }
1123
1084
 
1124
1085
  /** @public */