Skip to content

Commit

Permalink
refactor: rename files
Browse files Browse the repository at this point in the history
  • Loading branch information
juanrgm committed Nov 21, 2023
1 parent cf18e38 commit 166af56
Show file tree
Hide file tree
Showing 6 changed files with 325 additions and 325 deletions.
4 changes: 2 additions & 2 deletions packages/cli/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export { DelayedValue } from "./resources/DelayedValue.js";
export { createTpl, Tpl } from "./utils/self/config.js";
export { MinimalTpl, MinimalTplConfig } from "./utils/self/tpl.js";
export { createTpl, Tpl } from "./utils/self/tpl.js";
export { MinimalTpl, MinimalTplConfig } from "./utils/self/minimal-tpl.js";
export {
AbstractRes,
type ResOptions,
Expand Down
309 changes: 0 additions & 309 deletions packages/cli/src/utils/self/config.ts

This file was deleted.

22 changes: 22 additions & 0 deletions packages/cli/src/utils/self/minimal-tpl.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import type { ResourceSystem } from "./rs.js";

export type Resources = Record<string, unknown>;
export type ResourcesResultItem = {
tpl: MinimalTpl;
resources: unknown;
};

export interface MinimalTplConfig {
name: string;
onResolve?: (
this: ResourceSystem,
items: any,
options: any,
) => Promise<void | undefined>;
}

export interface MinimalTpl<O = unknown, R = unknown> {
readonly config: MinimalTplConfig;
resources(items?: ResourcesResultItem[]): Promise<R>;
options(): Promise<O>;
}
2 changes: 1 addition & 1 deletion packages/cli/src/utils/self/resolve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { checkPath, statIfExists } from "../fs.js";
import { isPlainObject } from "../object.js";
import { isDir, isPath, stripRootBackPaths } from "../path.js";
import { makeFilter } from "../string.js";
import { MinimalTpl, ResourcesResultItem } from "./minimal-tpl.js";
import { createResourceSystem } from "./rs.js";
import { getSecretsPath, parseSecretsFile } from "./secrets.js";
import { MinimalTpl, ResourcesResultItem } from "./tpl.js";
import mm from "micromatch";
import { basename, dirname, join, relative } from "path";
import * as posix from "path/posix";
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/utils/self/rs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
isPlainObject,
JSONClass,
} from "../object.js";
import { Resources } from "./tpl.js";
import { Resources } from "./minimal-tpl.js";
import { basename } from "path";
import { join } from "path/posix";

Expand Down
Loading

0 comments on commit 166af56

Please sign in to comment.