@basketry/sorbet
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -44,3 +44,3 @@ "use strict"; | ||
const self = this; | ||
yield warning_1.warning; | ||
yield (0, warning_1.warning)(this.service, require('../package.json')); | ||
yield ''; | ||
@@ -136,3 +136,3 @@ yield '# typed: strict'; | ||
const self = this; | ||
yield warning_1.warning; | ||
yield (0, warning_1.warning)(this.service, require('../package.json')); | ||
yield ''; | ||
@@ -175,3 +175,3 @@ yield '# typed: strict'; | ||
var _a, _b, _c; | ||
yield warning_1.warning; | ||
yield (0, warning_1.warning)(this.service, require('../package.json')); | ||
yield ''; | ||
@@ -178,0 +178,0 @@ yield '# typed: strict'; |
@@ -1,2 +0,2 @@ | ||
import { Enum, Interface, Method, Parameter, Property, ReturnType, Service, Type } from 'basketry'; | ||
import { Enum, Interface, Method, Parameter, Property, Service, Type, TypedValue } from 'basketry'; | ||
import { SorbetOptions } from './types'; | ||
@@ -10,3 +10,3 @@ export declare function buildNamespace(subModule: string | undefined, service: Service, options?: SorbetOptions): string; | ||
export declare function buildTypeName({ type, service, options, skipArrayify, }: { | ||
type: Parameter | Property | ReturnType; | ||
type: TypedValue; | ||
service: Service; | ||
@@ -13,0 +13,0 @@ options: SorbetOptions | undefined; |
@@ -79,2 +79,8 @@ "use strict"; | ||
else { | ||
const union = service.unions.find((u) => u.name.value === type.typeName.value); | ||
if (union) { | ||
return `T.any(${union.members | ||
.map((v) => buildTypeName({ type: v, service, options })) | ||
.join(', ')})`; | ||
} | ||
let moduleNamespace; | ||
@@ -81,0 +87,0 @@ if (service.types.some((t) => t.name.value === type.typeName.value)) { |
@@ -1,1 +0,6 @@ | ||
export declare const warning: string; | ||
import { Service } from 'basketry'; | ||
export declare const warning: (service: Service, pkg: { | ||
name: string; | ||
version: string; | ||
homepage?: string; | ||
}) => string; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.warning = void 0; | ||
exports.warning = `# This code was generated by a tool. | ||
# ${require('../package.json').name}@${require('../package.json').version} | ||
const os_1 = require("os"); | ||
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.`; | ||
# 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 ? `${os_1.EOL}# About ${pkg.name}: ${pkg.homepage}` : ''}`; | ||
exports.warning = warning; | ||
//# sourceMappingURL=warning.js.map |
{ | ||
"name": "@basketry/sorbet", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "Basketry generator for generating Sorbet types and interfaces", | ||
@@ -51,3 +51,3 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"basketry": "^0.0.21", | ||
"basketry": "^0.0.23", | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42092
439
+ Addedbasketry@0.0.23(transitive)
- Removedbasketry@0.0.21(transitive)
Updatedbasketry@^0.0.23