Skip to content

Commit

Permalink
Added missing import
Browse files Browse the repository at this point in the history
  • Loading branch information
taras committed Aug 31, 2023
1 parent 036788e commit 6f6756d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/scaffolder-yaml-actions/src/actions/_helpers.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
const isUrl = (maybeUrl: string) => /^(?:[a-z+]+:)?\/\//.test(maybeUrl)
export const isUrl = (maybeUrl: string) => /^(?:[a-z+]+:)?\/\//.test(maybeUrl)
3 changes: 2 additions & 1 deletion plugins/scaffolder-yaml-actions/src/actions/append.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import _path from 'path';
import { Logger } from 'winston';
import { z } from 'zod';
import { append } from '../operations/append';
import { isUrl } from './_helpers';

interface CreateYamAppendActionOptions {
logger: Logger;
Expand All @@ -18,7 +19,7 @@ interface CreateYamAppendActionOptions {
}

const InputSchema = z.object({
url: z.string().describe('URL of the YAML file to update'),
url: z.string().describe('URL of the YAML file to set or file system path (relative or absolute)'),
path: z.string().describe('The path of the collection to append to'),
value: z
.union([z.string(), z.number(), z.null(), z.record(z.any())])
Expand Down
3 changes: 2 additions & 1 deletion plugins/scaffolder-yaml-actions/src/actions/set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import _path from 'path';
import { Logger } from 'winston';
import { z } from 'zod';
import { set } from '../operations/set';
import { isUrl } from './_helpers';

interface CreateYamlSetActionOptions {
logger: Logger;
Expand All @@ -18,7 +19,7 @@ interface CreateYamlSetActionOptions {
}

const InputSchema = z.object({
url: z.string().describe('URL of the YAML file to set'),
url: z.string().describe('URL of the YAML file to set or file system path (relative or absolute)'),
path: z.string().describe('The path of the property to set'),
value: z
.union([z.string(), z.number(), z.null()])
Expand Down

0 comments on commit 6f6756d

Please sign in to comment.