vovk-cli 0.1.3 → 0.2.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/bundle/index.d.mts +1 -1
- package/dist/bundle/index.mjs +3 -3
- package/dist/dev/{ensureSchemaFiles.d.mts → ensure-schema-files.d.mts} +1 -1
- package/dist/dev/{ensureSchemaFiles.mjs → ensure-schema-files.mjs} +3 -3
- package/dist/dev/index.mjs +11 -11
- package/dist/dev/log-diff-result.d.mts +3 -0
- package/dist/dev/{logDiffResult.mjs → log-diff-result.mjs} +2 -2
- package/dist/dev/{writeMetaJson.d.mts → write-meta-json.d.mts} +1 -1
- package/dist/dev/{writeMetaJson.mjs → write-meta-json.mjs} +3 -3
- package/dist/dev/{writeOneSegmentSchemaFile.d.mts → write-one-segment-schema-file.d.mts} +1 -1
- package/dist/dev/{writeOneSegmentSchemaFile.mjs → write-one-segment-schema-file.mjs} +2 -2
- package/dist/generate/ensure-client.d.mts +3 -0
- package/dist/generate/{ensureClient.mjs → ensure-client.mjs} +1 -1
- package/dist/generate/generate.d.mts +2 -2
- package/dist/generate/generate.mjs +8 -8
- package/dist/generate/{getClientTemplateFiles.d.mts → get-client-template-files.d.mts} +1 -1
- package/dist/generate/{getClientTemplateFiles.mjs → get-client-template-files.mjs} +3 -3
- package/dist/generate/{getProjectFullSchema.d.mts → get-project-full-schema.d.mts} +1 -1
- package/dist/generate/{getProjectFullSchema.mjs → get-project-full-schema.mjs} +2 -2
- package/dist/generate/{getTemplateClientImports.mjs → get-template-client-imports.mjs} +2 -2
- package/dist/generate/index.d.mts +1 -1
- package/dist/generate/index.mjs +3 -3
- package/dist/generate/{writeOneClientFile.d.mts → write-one-client-file.d.mts} +3 -3
- package/dist/generate/{writeOneClientFile.mjs → write-one-client-file.mjs} +4 -4
- package/dist/{getProjectInfo/getConfig/getRelativeSrcRoot.mjs → get-project-info/get-config/get-relative-src-root.mjs} +1 -1
- package/dist/{getProjectInfo/getConfig/getTemplateDefs.mjs → get-project-info/get-config/get-template-defs.mjs} +17 -17
- package/dist/{getProjectInfo/getConfig/getUserConfig.mjs → get-project-info/get-config/get-user-config.mjs} +1 -1
- package/dist/{getProjectInfo/getConfig → get-project-info/get-config}/index.d.mts +1 -1
- package/dist/{getProjectInfo/getConfig → get-project-info/get-config}/index.mjs +6 -6
- package/dist/{getProjectInfo → get-project-info}/index.mjs +2 -2
- package/dist/index.mjs +3 -3
- package/dist/init/{createConfig.d.mts → create-config.d.mts} +1 -1
- package/dist/init/{createConfig.mjs → create-config.mjs} +2 -2
- package/dist/init/index.d.mts +1 -1
- package/dist/init/index.mjs +11 -11
- package/dist/init/{installDependencies.d.mts → install-dependencies.d.mts} +1 -1
- package/dist/init/{installDependencies.mjs → install-dependencies.mjs} +1 -1
- package/dist/init/{logUpdateDependenciesError.d.mts → log-update-dependencies-error.d.mts} +2 -2
- package/dist/init/{logUpdateDependenciesError.mjs → log-update-dependencies-error.mjs} +1 -1
- package/dist/init/{updateDependenciesWithoutInstalling.d.mts → update-dependencies-without-installing.d.mts} +1 -1
- package/dist/init/{updateDependenciesWithoutInstalling.mjs → update-dependencies-without-installing.mjs} +1 -1
- package/dist/new/index.d.mts +1 -1
- package/dist/new/index.mjs +2 -2
- package/dist/new/{newModule.d.mts → new-module.d.mts} +1 -1
- package/dist/new/{newModule.mjs → new-module.mjs} +17 -6
- package/dist/new/{newSegment.d.mts → new-segment.d.mts} +1 -1
- package/dist/new/{newSegment.mjs → new-segment.mjs} +3 -3
- package/dist/new/render.mjs +2 -2
- package/dist/utils/{compileJSONSchemaToTypeScriptType.mjs → compile-json-schema-to-typescript-type.mjs} +1 -1
- package/dist/utils/{formatLoggedSegmentName.mjs → format-logged-segment-name.mjs} +1 -1
- package/dist/utils/{getPackageJson.d.mts → get-package-json.d.mts} +1 -1
- package/dist/utils/{getPackageJson.mjs → get-package-json.mjs} +1 -1
- package/dist/utils/{locateSegments.d.mts → locate-segments.d.mts} +1 -1
- package/dist/utils/{locateSegments.mjs → locate-segments.mjs} +1 -1
- package/dist/utils/{normalizeOpenAPIMixin.d.mts → normalize-openapi-mixin.d.mts} +1 -1
- package/dist/utils/{normalizeOpenAPIMixin.mjs → normalize-openapi-mixin.mjs} +2 -2
- package/dist/utils/{removeUnlistedDirectories.mjs → remove-unlisted-directories.mjs} +1 -1
- package/dist/utils/{resolveAbsoluteModulePath.mjs → resolve-absolute-module-path.mjs} +1 -1
- package/module-templates/arktype/controller.ts.ejs +2 -2
- package/module-templates/type/controller.ts.ejs +2 -2
- package/module-templates/type/service.ts.ejs +2 -2
- package/module-templates/valibot/controller.ts.ejs +2 -2
- package/module-templates/zod/controller.ts.ejs +2 -2
- package/package.json +1 -1
- package/dist/dev/logDiffResult.d.mts +0 -3
- package/dist/generate/ensureClient.d.mts +0 -3
- /package/client-templates/{jsBase → js-base}/index.d.ts.ejs +0 -0
- /package/client-templates/{jsBase → js-base}/index.js.ejs +0 -0
- /package/client-templates/{openapiJs → openapi-js}/openapi.d.ts.ejs +0 -0
- /package/client-templates/{openapiJs → openapi-js}/openapi.js.ejs +0 -0
- /package/client-templates/{openapiJson → openapi-json}/openapi.json.ejs +0 -0
- /package/client-templates/{openapiTs → openapi-ts}/openapi.ts.ejs +0 -0
- /package/client-templates/{packageJson → package-json}/package.json.ejs +0 -0
- /package/client-templates/{schemaJs → schema-js}/schema.d.ts.ejs +0 -0
- /package/client-templates/{schemaJs → schema-js}/schema.js.ejs +0 -0
- /package/client-templates/{schemaJson → schema-json}/schema.json.ejs +0 -0
- /package/client-templates/{schemaTs → schema-ts}/schema.ts.ejs +0 -0
- /package/client-templates/{tsBase → ts-base}/index.ts.ejs +0 -0
- /package/dist/dev/{diffSegmentSchema.d.mts → diff-segment-schema.d.mts} +0 -0
- /package/dist/dev/{diffSegmentSchema.mjs → diff-segment-schema.mjs} +0 -0
- /package/dist/generate/{getTemplateClientImports.d.mts → get-template-client-imports.d.mts} +0 -0
- /package/dist/{getProjectInfo/getConfig/getConfigAbsolutePaths.d.mts → get-project-info/get-config/get-config-absolute-paths.d.mts} +0 -0
- /package/dist/{getProjectInfo/getConfig/getConfigAbsolutePaths.mjs → get-project-info/get-config/get-config-absolute-paths.mjs} +0 -0
- /package/dist/{getProjectInfo/getConfig/getRelativeSrcRoot.d.mts → get-project-info/get-config/get-relative-src-root.d.mts} +0 -0
- /package/dist/{getProjectInfo/getConfig/getTemplateDefs.d.mts → get-project-info/get-config/get-template-defs.d.mts} +0 -0
- /package/dist/{getProjectInfo/getConfig/getUserConfig.d.mts → get-project-info/get-config/get-user-config.d.mts} +0 -0
- /package/dist/{getProjectInfo/getMetaSchema.d.mts → get-project-info/get-meta-schema.d.mts} +0 -0
- /package/dist/{getProjectInfo/getMetaSchema.mjs → get-project-info/get-meta-schema.mjs} +0 -0
- /package/dist/{getProjectInfo → get-project-info}/index.d.mts +0 -0
- /package/dist/init/{checkTSConfigForExperimentalDecorators.d.mts → check-tsconfig-for-experimental-decorators.d.mts} +0 -0
- /package/dist/init/{checkTSConfigForExperimentalDecorators.mjs → check-tsconfig-for-experimental-decorators.mjs} +0 -0
- /package/dist/init/{updateNPMScripts.d.mts → update-npm-scripts.d.mts} +0 -0
- /package/dist/init/{updateNPMScripts.mjs → update-npm-scripts.mjs} +0 -0
- /package/dist/init/{updateTypeScriptConfig.d.mts → update-typescript-config.d.mts} +0 -0
- /package/dist/init/{updateTypeScriptConfig.mjs → update-typescript-config.mjs} +0 -0
- /package/dist/new/{addClassToSegmentCode.d.mts → add-class-to-segment-code.d.mts} +0 -0
- /package/dist/new/{addClassToSegmentCode.mjs → add-class-to-segment-code.mjs} +0 -0
- /package/dist/new/{addCommonTerms.d.mts → add-common-terms.d.mts} +0 -0
- /package/dist/new/{addCommonTerms.mjs → add-common-terms.mjs} +0 -0
- /package/dist/utils/{chalkHighlightThing.d.mts → chalk-highlight-thing.d.mts} +0 -0
- /package/dist/utils/{chalkHighlightThing.mjs → chalk-highlight-thing.mjs} +0 -0
- /package/dist/utils/{compileJSONSchemaToTypeScriptType.d.mts → compile-json-schema-to-typescript-type.d.mts} +0 -0
- /package/dist/utils/{compileTs.d.mts → compile-ts.d.mts} +0 -0
- /package/dist/utils/{compileTs.mjs → compile-ts.mjs} +0 -0
- /package/dist/utils/{debounceWithArgs.d.mts → debounce-with-args.d.mts} +0 -0
- /package/dist/utils/{debounceWithArgs.mjs → debounce-with-args.mjs} +0 -0
- /package/dist/utils/{formatLoggedSegmentName.d.mts → format-logged-segment-name.d.mts} +0 -0
- /package/dist/utils/{generateFnName.d.mts → generate-fn-name.d.mts} +0 -0
- /package/dist/utils/{generateFnName.mjs → generate-fn-name.mjs} +0 -0
- /package/dist/utils/{getAvailablePort.d.mts → get-available-port.d.mts} +0 -0
- /package/dist/utils/{getAvailablePort.mjs → get-available-port.mjs} +0 -0
- /package/dist/utils/{getFileSystemEntryType.d.mts → get-file-system-entry-type.d.mts} +0 -0
- /package/dist/utils/{getFileSystemEntryType.mjs → get-file-system-entry-type.mjs} +0 -0
- /package/dist/utils/{getLogger.d.mts → get-logger.d.mts} +0 -0
- /package/dist/utils/{getLogger.mjs → get-logger.mjs} +0 -0
- /package/dist/utils/{getNPMPackageMetadata.d.mts → get-npm-package-metadata.d.mts} +0 -0
- /package/dist/utils/{getNPMPackageMetadata.mjs → get-npm-package-metadata.mjs} +0 -0
- /package/dist/utils/{getPublicModuleNameFromPath.d.mts → get-public-module-name-from-path.d.mts} +0 -0
- /package/dist/utils/{getPublicModuleNameFromPath.mjs → get-public-module-name-from-path.mjs} +0 -0
- /package/dist/utils/{pickSegmentFullSchema.d.mts → pick-segment-full-schema.d.mts} +0 -0
- /package/dist/utils/{pickSegmentFullSchema.mjs → pick-segment-full-schema.mjs} +0 -0
- /package/dist/utils/{removeUnlistedDirectories.d.mts → remove-unlisted-directories.d.mts} +0 -0
- /package/dist/utils/{resolveAbsoluteModulePath.d.mts → resolve-absolute-module-path.d.mts} +0 -0
- /package/dist/utils/{updateConfigProperty.d.mts → update-config-property.d.mts} +0 -0
- /package/dist/utils/{updateConfigProperty.mjs → update-config-property.mjs} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ProjectInfo } from '../
|
|
1
|
+
import type { ProjectInfo } from '../get-project-info/index.mjs';
|
|
2
2
|
export declare function newModule({ projectInfo, what, moduleNameWithOptionalSegment, dryRun, outDir: outDirFlag, templates: templatesFlag, noSegmentUpdate, overwrite, empty, }: {
|
|
3
3
|
projectInfo: ProjectInfo;
|
|
4
4
|
what: string[];
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import fs from 'node:fs/promises';
|
|
3
3
|
import chalk from 'chalk';
|
|
4
|
+
import _ from 'lodash';
|
|
4
5
|
import { getTsconfig } from 'get-tsconfig';
|
|
5
6
|
import { render } from './render.mjs';
|
|
6
|
-
import { addClassToSegmentCode } from './
|
|
7
|
-
import { chalkHighlightThing } from '../utils/
|
|
8
|
-
import { formatLoggedSegmentName } from '../utils/
|
|
9
|
-
import { getFileSystemEntryType } from '../utils/
|
|
7
|
+
import { addClassToSegmentCode } from './add-class-to-segment-code.mjs';
|
|
8
|
+
import { chalkHighlightThing } from '../utils/chalk-highlight-thing.mjs';
|
|
9
|
+
import { formatLoggedSegmentName } from '../utils/format-logged-segment-name.mjs';
|
|
10
|
+
import { getFileSystemEntryType } from '../utils/get-file-system-entry-type.mjs';
|
|
10
11
|
import { prettify } from '../utils/prettify.mjs';
|
|
11
|
-
import { resolveAbsoluteModulePath } from '../utils/
|
|
12
|
-
import { locateSegments } from '../utils/
|
|
12
|
+
import { resolveAbsoluteModulePath } from '../utils/resolve-absolute-module-path.mjs';
|
|
13
|
+
import { locateSegments } from '../utils/locate-segments.mjs';
|
|
13
14
|
function splitByLast(str, delimiter = '/') {
|
|
14
15
|
const index = str.lastIndexOf(delimiter);
|
|
15
16
|
if (index === -1) {
|
|
@@ -81,6 +82,16 @@ export async function newModule({ projectInfo, what, moduleNameWithOptionalSegme
|
|
|
81
82
|
}
|
|
82
83
|
const absoluteModuleDir = path.join(cwd, outDir);
|
|
83
84
|
const absoluteModulePath = path.join(absoluteModuleDir, fileName);
|
|
85
|
+
// Pre-kebab-case projects keep modules at e.g. userProfile/UserProfileController.ts; scaffolding
|
|
86
|
+
// user-profile/user-profile-controller.ts next to it would register a duplicate class in the segment.
|
|
87
|
+
const legacySuffix = type === 'controller' ? 'Controller' : type === 'service' ? 'Service' : null;
|
|
88
|
+
if (!outDirFlag && legacySuffix && path.basename(absoluteModuleDir) === _.kebabCase(moduleName)) {
|
|
89
|
+
const legacyModulePath = path.join(path.dirname(absoluteModuleDir), _.camelCase(moduleName), `${_.upperFirst(_.camelCase(moduleName))}${legacySuffix}.ts`);
|
|
90
|
+
if (await getFileSystemEntryType(legacyModulePath)) {
|
|
91
|
+
log.error(`Found ${chalkHighlightThing(legacyModulePath)} created with the pre-kebab-case naming convention. Rename it to ${chalkHighlightThing(absoluteModulePath)} manually or pass --out-dir to scaffold elsewhere.`);
|
|
92
|
+
return process.exit(1);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
84
95
|
const prettiedCode = await prettify(code, absoluteModulePath);
|
|
85
96
|
if (!dryRun) {
|
|
86
97
|
if (!overwrite && (await getFileSystemEntryType(absoluteModulePath))) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ProjectInfo } from '../
|
|
1
|
+
import type { ProjectInfo } from '../get-project-info/index.mjs';
|
|
2
2
|
export declare function newSegment({ projectInfo, segmentName, isStaticSegment, overwrite, dryRun, }: {
|
|
3
3
|
projectInfo: ProjectInfo;
|
|
4
4
|
segmentName: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import fs from 'node:fs/promises';
|
|
3
|
-
import { getFileSystemEntryType } from '../utils/
|
|
4
|
-
import { chalkHighlightThing } from '../utils/
|
|
5
|
-
import { formatLoggedSegmentName } from '../utils/
|
|
3
|
+
import { getFileSystemEntryType } from '../utils/get-file-system-entry-type.mjs';
|
|
4
|
+
import { chalkHighlightThing } from '../utils/chalk-highlight-thing.mjs';
|
|
5
|
+
import { formatLoggedSegmentName } from '../utils/format-logged-segment-name.mjs';
|
|
6
6
|
import { prettify } from '../utils/prettify.mjs';
|
|
7
7
|
import chalk from 'chalk';
|
|
8
8
|
export async function newSegment({ projectInfo, segmentName, isStaticSegment, overwrite, dryRun, }) {
|
package/dist/new/render.mjs
CHANGED
|
@@ -2,11 +2,11 @@ import ejs from 'ejs';
|
|
|
2
2
|
import matter from 'gray-matter';
|
|
3
3
|
import _ from 'lodash';
|
|
4
4
|
import pluralize from 'pluralize';
|
|
5
|
-
import { addCommonTerms } from './
|
|
5
|
+
import { addCommonTerms } from './add-common-terms.mjs';
|
|
6
6
|
import path from 'node:path';
|
|
7
7
|
addCommonTerms();
|
|
8
8
|
export async function render(codeTemplate, { cwd, config, withService, segmentName, moduleName, empty, templateFileName, isNodeNextResolution, srcRoot, }) {
|
|
9
|
-
const defaultOutDir = [config.modulesDir, segmentName || config.rootSegmentModulesDirName, _.
|
|
9
|
+
const defaultOutDir = [config.modulesDir, segmentName || config.rootSegmentModulesDirName, _.kebabCase(moduleName)]
|
|
10
10
|
.filter(Boolean)
|
|
11
11
|
.join('/');
|
|
12
12
|
const relativePathToSourceRoot = path.relative(path.resolve(cwd, defaultOutDir), path.join(cwd, srcRoot ?? '.')) || '.';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import upperFirstLodash from 'lodash/upperFirst.js';
|
|
2
|
-
import { chalkHighlightThing } from './
|
|
2
|
+
import { chalkHighlightThing } from './chalk-highlight-thing.mjs';
|
|
3
3
|
export function formatLoggedSegmentName(segmentName, { withChalk = true, upperFirst = false, isStatic = false, segmentType = 'segment', // TODO: Apply to all formatLoggedSegmentName invocations
|
|
4
4
|
} = {}) {
|
|
5
5
|
let text = segmentName ? `${isStatic ? 'static ' : ''}${segmentType} "${segmentName}"` : 'the root segment';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PackageJson } from 'type-fest';
|
|
2
|
-
import type { ProjectInfo } from '../
|
|
2
|
+
import type { ProjectInfo } from '../get-project-info/index.mjs';
|
|
3
3
|
export declare function getPackageJson(cwd: string, log: ProjectInfo['log']): Promise<PackageJson>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import fs from 'node:fs/promises';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
import { chalkHighlightThing } from './
|
|
3
|
+
import { chalkHighlightThing } from './chalk-highlight-thing.mjs';
|
|
4
4
|
let cachedPromise;
|
|
5
5
|
export function getPackageJson(cwd, log) {
|
|
6
6
|
const pkgPath = path.join(cwd, 'package.json');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import fs from 'node:fs/promises';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
import { getFileSystemEntryType } from './
|
|
3
|
+
import { getFileSystemEntryType } from './get-file-system-entry-type.mjs';
|
|
4
4
|
export async function locateSegments({ dir, rootDir, config, log, }) {
|
|
5
5
|
let results = [];
|
|
6
6
|
if (!dir)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { HttpMethod, VovkConfig } from 'vovk';
|
|
2
2
|
import type { VovkOperationObject, VovkStrictConfig } from 'vovk/internal';
|
|
3
3
|
import type { OpenAPIObject } from 'openapi3-ts/oas31';
|
|
4
|
-
import type { ProjectInfo } from '../
|
|
4
|
+
import type { ProjectInfo } from '../get-project-info/index.mjs';
|
|
5
5
|
export type GetOpenAPINameFn = (config: {
|
|
6
6
|
operationObject: VovkOperationObject;
|
|
7
7
|
method: HttpMethod;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import fs from 'node:fs/promises';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import * as YAML from 'yaml';
|
|
4
|
-
import { chalkHighlightThing } from './
|
|
4
|
+
import { chalkHighlightThing } from './chalk-highlight-thing.mjs';
|
|
5
5
|
import camelCase from 'lodash/camelCase.js';
|
|
6
|
-
import { generateFnName } from './
|
|
6
|
+
import { generateFnName } from './generate-fn-name.mjs';
|
|
7
7
|
const normalizeGetModuleName = (getModuleName) => {
|
|
8
8
|
if (typeof getModuleName === 'string') {
|
|
9
9
|
const moduleName = getModuleName;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import fs from 'node:fs/promises';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
import { getFileSystemEntryType, FileSystemEntryType } from './
|
|
3
|
+
import { getFileSystemEntryType, FileSystemEntryType } from './get-file-system-entry-type.mjs';
|
|
4
4
|
/**
|
|
5
5
|
* Removes all directories in a folder that aren't in the provided allowlist
|
|
6
6
|
* Supports nested directory paths like 'foo/bar/baz'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { getPublicModuleNameFromPath } from './
|
|
3
|
+
import { getPublicModuleNameFromPath } from './get-public-module-name-from-path.mjs';
|
|
4
4
|
// Returns the path up to and including the last occurrence of the given module name
|
|
5
5
|
export function getPathUpToModule(moduleName, fullPath) {
|
|
6
6
|
const idx = fullPath.lastIndexOf(moduleName);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
}; %>
|
|
5
5
|
---
|
|
6
6
|
outDir: <%= t.defaultOutDir %>
|
|
7
|
-
fileName: <%=
|
|
7
|
+
fileName: <%= t['the-thing'] + '-controller.ts' %>
|
|
8
8
|
sourceName: <%= vars.ModuleName %>
|
|
9
9
|
compiledName: <%= t.TheThing + 'RPC' %>
|
|
10
10
|
---
|
|
@@ -12,7 +12,7 @@ compiledName: <%= t.TheThing + 'RPC' %>
|
|
|
12
12
|
import { procedure, prefix, get, put, post, del, operation } from 'vovk';
|
|
13
13
|
import { type } from 'arktype';
|
|
14
14
|
<% if(t.withService) { %>
|
|
15
|
-
import <%= vars.ServiceName %> from './<%=
|
|
15
|
+
import <%= vars.ServiceName %> from './<%= t['the-thing'] %>-service<%= t.nodeNextResolutionExt.ts %>';
|
|
16
16
|
<% } %>
|
|
17
17
|
|
|
18
18
|
@prefix('<%= t['the-things'] %>')
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
}; %>
|
|
5
5
|
---
|
|
6
6
|
outDir: <%= t.defaultOutDir %>
|
|
7
|
-
fileName: <%=
|
|
7
|
+
fileName: <%= t['the-thing'] + '-controller.ts' %>
|
|
8
8
|
sourceName: <%= vars.ControllerName %>
|
|
9
9
|
compiledName: <%= t.TheThing + 'RPC' %>
|
|
10
10
|
---
|
|
11
11
|
|
|
12
12
|
import { prefix, get, put, post, del, operation, type VovkRequest } from 'vovk';
|
|
13
13
|
<% if(t.withService) { %>
|
|
14
|
-
import <%= vars.ServiceName %> from './<%=
|
|
14
|
+
import <%= vars.ServiceName %> from './<%= t['the-thing'] %>-service<%= t.nodeNextResolutionExt.ts %>';
|
|
15
15
|
<% } %>
|
|
16
16
|
|
|
17
17
|
@prefix('<%= t['the-things'] %>')
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
}; %>
|
|
5
5
|
---
|
|
6
6
|
outDir: <%= t.defaultOutDir %>
|
|
7
|
-
fileName: <%=
|
|
7
|
+
fileName: <%= t['the-thing'] + '-service.ts' %>
|
|
8
8
|
sourceName: <%= vars.ServiceName %>
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
import type { VovkBody, VovkParams } from 'vovk';
|
|
12
|
-
import type <%= vars.ControllerName %> from './<%=
|
|
12
|
+
import type <%= vars.ControllerName %> from './<%= t['the-thing'] %>-controller<%= t.nodeNextResolutionExt.ts %>';
|
|
13
13
|
|
|
14
14
|
export default class <%= vars.ServiceName %> {
|
|
15
15
|
static get<%= t.TheThings %> = () => {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
}; %>
|
|
5
5
|
---
|
|
6
6
|
outDir: <%= t.defaultOutDir %>
|
|
7
|
-
fileName: <%=
|
|
7
|
+
fileName: <%= t['the-thing'] + '-controller.ts' %>
|
|
8
8
|
sourceName: <%= vars.ModuleName %>
|
|
9
9
|
compiledName: <%= t.TheThing + 'RPC' %>
|
|
10
10
|
---
|
|
@@ -13,7 +13,7 @@ import { procedure, prefix, get, put, post, del, operation } from 'vovk';
|
|
|
13
13
|
import * as v from 'valibot';
|
|
14
14
|
import { toStandardJsonSchema } from '@valibot/to-json-schema';
|
|
15
15
|
<% if(t.withService) { %>
|
|
16
|
-
import <%= vars.ServiceName %> from './<%=
|
|
16
|
+
import <%= vars.ServiceName %> from './<%= t['the-thing'] %>-service<%= t.nodeNextResolutionExt.ts %>';
|
|
17
17
|
<% } %>
|
|
18
18
|
|
|
19
19
|
@prefix('<%= t['the-things'] %>')
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
}; %>
|
|
5
5
|
---
|
|
6
6
|
outDir: <%= t.defaultOutDir %>
|
|
7
|
-
fileName: <%=
|
|
7
|
+
fileName: <%= t['the-thing'] + '-controller.ts' %>
|
|
8
8
|
sourceName: <%= vars.ModuleName %>
|
|
9
9
|
compiledName: <%= t.TheThing + 'RPC' %>
|
|
10
10
|
---
|
|
@@ -12,7 +12,7 @@ compiledName: <%= t.TheThing + 'RPC' %>
|
|
|
12
12
|
import { procedure, prefix, get, put, post, del, operation } from 'vovk';
|
|
13
13
|
import { z } from 'zod';
|
|
14
14
|
<% if(t.withService) { %>
|
|
15
|
-
import <%= vars.ServiceName %> from './<%=
|
|
15
|
+
import <%= vars.ServiceName %> from './<%= t['the-thing'] %>-service<%= t.nodeNextResolutionExt.ts %>';
|
|
16
16
|
<% } %>
|
|
17
17
|
|
|
18
18
|
@prefix('<%= t['the-things'] %>')
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/utils/{getPublicModuleNameFromPath.d.mts → get-public-module-name-from-path.d.mts}
RENAMED
|
File without changes
|
/package/dist/utils/{getPublicModuleNameFromPath.mjs → get-public-module-name-from-path.mjs}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|