@basketry/sorbet
Advanced tools
Comparing version 0.0.14 to 0.0.15
@@ -29,2 +29,5 @@ "use strict"; | ||
} | ||
warning() { | ||
return (0, warning_1.warning)(this.service, require('../package.json'), this.options); | ||
} | ||
*comment(text) { | ||
@@ -60,3 +63,3 @@ if (Array.isArray(text)) { | ||
const self = this; | ||
yield (0, warning_1.warning)(this.service, require('../package.json')); | ||
yield this.warning(); | ||
yield ''; | ||
@@ -159,3 +162,3 @@ yield* this.magicComments(); | ||
const self = this; | ||
yield (0, warning_1.warning)(this.service, require('../package.json')); | ||
yield this.warning(); | ||
yield ''; | ||
@@ -199,3 +202,3 @@ yield* this.magicComments(); | ||
var _a, _b, _c; | ||
yield (0, warning_1.warning)(this.service, require('../package.json')); | ||
yield this.warning(); | ||
yield ''; | ||
@@ -227,3 +230,3 @@ yield* this.magicComments(); | ||
const self = this; | ||
yield (0, warning_1.warning)(this.service, require('../package.json')); | ||
yield this.warning(); | ||
yield ''; | ||
@@ -230,0 +233,0 @@ if ((_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.sorbet) === null || _b === void 0 ? void 0 : _b.magicComments) === null || _c === void 0 ? void 0 : _c.length) { |
@@ -5,9 +5,2 @@ "use strict"; | ||
const case_1 = require("case"); | ||
const path_1 = require("path"); | ||
function subfolder(options) { | ||
var _a; | ||
return (((_a = options === null || options === void 0 ? void 0 : options.basketry) === null || _a === void 0 ? void 0 : _a.subfolder) || '') | ||
.split(path_1.sep) | ||
.filter((x) => !!x && x !== '.' && x !== '..'); | ||
} | ||
function buildNamespace(subModule, service, options) { | ||
@@ -38,3 +31,2 @@ var _a; | ||
return [ | ||
...subfolder(options), | ||
...namespace.split('::').map(case_1.snake), | ||
@@ -52,7 +44,3 @@ `${(0, case_1.snake)(buildInterfaceName(int))}.rb`, | ||
const namespace = buildTypeNamespace(service, options); | ||
return [ | ||
...subfolder(options), | ||
...namespace.split('::').map(case_1.snake), | ||
`${(0, case_1.snake)(type.name.value)}.rb`, | ||
]; | ||
return [...namespace.split('::').map(case_1.snake), `${(0, case_1.snake)(type.name.value)}.rb`]; | ||
} | ||
@@ -118,7 +106,3 @@ exports.buildTypeFilepath = buildTypeFilepath; | ||
const namespace = buildEnumNamespace(service, options); | ||
return [ | ||
...subfolder(options), | ||
...namespace.split('::').map(case_1.snake), | ||
`${(0, case_1.snake)(e.name.value)}.rb`, | ||
]; | ||
return [...namespace.split('::').map(case_1.snake), `${(0, case_1.snake)(e.name.value)}.rb`]; | ||
} | ||
@@ -137,3 +121,2 @@ exports.buildEnumFilepath = buildEnumFilepath; | ||
return [ | ||
...subfolder(options), | ||
...namespace.split('::').map(case_1.snake), | ||
@@ -140,0 +123,0 @@ `${(0, case_1.snake)(buildServiceLocatorName())}.rb`, |
@@ -1,2 +0,2 @@ | ||
import { Service } from 'basketry'; | ||
import { NamespacedBasketryOptions, Service } from 'basketry'; | ||
export declare const warning: (service: Service, pkg: { | ||
@@ -6,2 +6,2 @@ name: string; | ||
homepage?: string; | ||
}) => string; | ||
}, options?: NamespacedBasketryOptions | undefined) => string; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.warning = void 0; | ||
const warning = (service, pkg) => `# This code was generated by ${pkg.name}@${pkg.version} | ||
# | ||
# Changes to this file may cause incorrect behavior and will be lost if | ||
# the code is regenerated. | ||
# | ||
# To make changes to the contents of this file: | ||
# 1. Edit ${service.sourcePath} | ||
# 2. Run the Basketry CLI | ||
# | ||
# About Basketry: ${require('basketry/package.json').homepage}${pkg.homepage ? `\n# About ${pkg.name}: ${pkg.homepage}` : ''}`; | ||
const basketry_1 = require("basketry"); | ||
const warning = (service, pkg, options) => Array.from((0, basketry_1.warning)(service, pkg, options || {})) | ||
.map((x) => `# ${x}`.trim()) | ||
.join('\n'); | ||
exports.warning = warning; | ||
//# sourceMappingURL=warning.js.map |
{ | ||
"name": "@basketry/sorbet", | ||
"version": "0.0.14", | ||
"version": "0.0.15", | ||
"description": "Basketry generator for generating Sorbet types and interfaces", | ||
@@ -51,3 +51,3 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"basketry": "^0.0.24", | ||
"basketry": "^0.0.32", | ||
"case": "^1.6.3", | ||
@@ -54,0 +54,0 @@ "prettier": "^2.5.1" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
51207
547
+ Addedbasketry@0.0.32(transitive)
- Removedbasketry@0.0.24(transitive)
Updatedbasketry@^0.0.32