@fern-api/fern-api-dev 4.77.0 → 4.78.0-11-g41f4e9e6031
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/cli.cjs +323 -23
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -477592,6 +477592,7 @@ __export(api_exports, {
|
|
|
477592
477592
|
HttpMethod: () => HttpMethod2,
|
|
477593
477593
|
HttpRequestBody: () => HttpRequestBody,
|
|
477594
477594
|
HttpResponseBody: () => HttpResponseBody,
|
|
477595
|
+
InvocationSource: () => InvocationSource,
|
|
477595
477596
|
JsonResponse: () => JsonResponse,
|
|
477596
477597
|
Literal: () => Literal,
|
|
477597
477598
|
NamedTypeDefault: () => NamedTypeDefault,
|
|
@@ -480204,7 +480205,8 @@ __export(ir_exports2, {
|
|
|
480204
480205
|
ApiDefinitionSource: () => ApiDefinitionSource,
|
|
480205
480206
|
ApiVersionScheme: () => ApiVersionScheme,
|
|
480206
480207
|
ErrorDiscriminationStrategy: () => ErrorDiscriminationStrategy,
|
|
480207
|
-
ExampleStyle: () => ExampleStyle
|
|
480208
|
+
ExampleStyle: () => ExampleStyle,
|
|
480209
|
+
InvocationSource: () => InvocationSource
|
|
480208
480210
|
});
|
|
480209
480211
|
|
|
480210
480212
|
// ../../ir-sdk/lib/sdk/api/resources/ir/types/ApiDefinitionSource.js
|
|
@@ -480309,6 +480311,31 @@ var ExampleStyle = {
|
|
|
480309
480311
|
}
|
|
480310
480312
|
};
|
|
480311
480313
|
|
|
480314
|
+
// ../../ir-sdk/lib/sdk/api/resources/ir/types/InvocationSource.js
|
|
480315
|
+
var InvocationSourceValues = {
|
|
480316
|
+
Autopilot: "autopilot",
|
|
480317
|
+
Autorelease: "autorelease",
|
|
480318
|
+
Ci: "ci",
|
|
480319
|
+
Manual: "manual"
|
|
480320
|
+
};
|
|
480321
|
+
var InvocationSource = {
|
|
480322
|
+
...InvocationSourceValues,
|
|
480323
|
+
_visit: (value, visitor) => {
|
|
480324
|
+
switch (value) {
|
|
480325
|
+
case InvocationSource.Autopilot:
|
|
480326
|
+
return visitor.autopilot();
|
|
480327
|
+
case InvocationSource.Autorelease:
|
|
480328
|
+
return visitor.autorelease();
|
|
480329
|
+
case InvocationSource.Ci:
|
|
480330
|
+
return visitor.ci();
|
|
480331
|
+
case InvocationSource.Manual:
|
|
480332
|
+
return visitor.manual();
|
|
480333
|
+
default:
|
|
480334
|
+
return visitor._other();
|
|
480335
|
+
}
|
|
480336
|
+
}
|
|
480337
|
+
};
|
|
480338
|
+
|
|
480312
480339
|
// ../../ir-sdk/lib/sdk/api/resources/proto/index.js
|
|
480313
480340
|
var proto_exports = {};
|
|
480314
480341
|
__export(proto_exports, {
|
|
@@ -482409,6 +482436,7 @@ __export(serialization_exports2, {
|
|
|
482409
482436
|
IntegerType: () => IntegerType,
|
|
482410
482437
|
IntegerValidationRules: () => IntegerValidationRules,
|
|
482411
482438
|
IntermediateRepresentation: () => IntermediateRepresentation,
|
|
482439
|
+
InvocationSource: () => InvocationSource2,
|
|
482412
482440
|
JsonEncoding: () => JsonEncoding,
|
|
482413
482441
|
JsonResponse: () => JsonResponse2,
|
|
482414
482442
|
JsonResponseBody: () => JsonResponseBody,
|
|
@@ -487174,6 +487202,7 @@ __export(ir_exports4, {
|
|
|
487174
487202
|
GenerationMetadata: () => GenerationMetadata,
|
|
487175
487203
|
HeaderApiVersionScheme: () => HeaderApiVersionScheme,
|
|
487176
487204
|
IntermediateRepresentation: () => IntermediateRepresentation,
|
|
487205
|
+
InvocationSource: () => InvocationSource2,
|
|
487177
487206
|
Package: () => Package,
|
|
487178
487207
|
PackageNavigationConfig: () => PackageNavigationConfig,
|
|
487179
487208
|
PlatformHeaders: () => PlatformHeaders,
|
|
@@ -487281,13 +487310,20 @@ var ErrorDiscriminationStrategy2 = schemas_exports3.union("type", {
|
|
|
487281
487310
|
// ../../ir-sdk/lib/sdk/serialization/resources/ir/types/ExampleStyle.js
|
|
487282
487311
|
var ExampleStyle2 = schemas_exports3.enum_(["minimal", "comprehensive"]);
|
|
487283
487312
|
|
|
487313
|
+
// ../../ir-sdk/lib/sdk/serialization/resources/ir/types/InvocationSource.js
|
|
487314
|
+
var InvocationSource2 = schemas_exports3.enum_(["autopilot", "autorelease", "ci", "manual"]);
|
|
487315
|
+
|
|
487284
487316
|
// ../../ir-sdk/lib/sdk/serialization/resources/ir/types/GenerationMetadata.js
|
|
487285
487317
|
var GenerationMetadata = schemas_exports3.objectWithoutOptionalProperties({
|
|
487286
487318
|
cliVersion: schemas_exports3.string(),
|
|
487287
487319
|
generatorName: schemas_exports3.string(),
|
|
487288
487320
|
generatorVersion: schemas_exports3.string(),
|
|
487289
487321
|
generatorConfig: schemas_exports3.unknown().optional(),
|
|
487290
|
-
originGitCommit: schemas_exports3.string().optional()
|
|
487322
|
+
originGitCommit: schemas_exports3.string().optional(),
|
|
487323
|
+
originGitCommitIsDirty: schemas_exports3.boolean().optional(),
|
|
487324
|
+
invokedBy: InvocationSource2.optional(),
|
|
487325
|
+
requestedVersion: schemas_exports3.string().optional(),
|
|
487326
|
+
ciProvider: schemas_exports3.string().optional()
|
|
487291
487327
|
});
|
|
487292
487328
|
|
|
487293
487329
|
// ../../ir-sdk/lib/sdk/serialization/resources/publish/types/CratesPublishTarget.js
|
|
@@ -492120,6 +492156,81 @@ function getGithubRepository(generatorInvocation) {
|
|
|
492120
492156
|
return void 0;
|
|
492121
492157
|
}
|
|
492122
492158
|
|
|
492159
|
+
// ../../commons/api-workspace-commons/lib/detectInvocationSource.js
|
|
492160
|
+
function detectInvocationSource() {
|
|
492161
|
+
const fromEnv = normalizeInvoker(process.env.FERN_INVOKER);
|
|
492162
|
+
if (fromEnv != null) {
|
|
492163
|
+
return fromEnv;
|
|
492164
|
+
}
|
|
492165
|
+
if (isCIEnvironment()) {
|
|
492166
|
+
return "ci";
|
|
492167
|
+
}
|
|
492168
|
+
return "manual";
|
|
492169
|
+
}
|
|
492170
|
+
function detectCiProvider() {
|
|
492171
|
+
if (process.env.GITHUB_ACTIONS === "true") {
|
|
492172
|
+
return "github";
|
|
492173
|
+
}
|
|
492174
|
+
if (process.env.GITLAB_CI === "true") {
|
|
492175
|
+
return "gitlab";
|
|
492176
|
+
}
|
|
492177
|
+
if (process.env.BITBUCKET_BUILD_NUMBER != null) {
|
|
492178
|
+
return "bitbucket";
|
|
492179
|
+
}
|
|
492180
|
+
if (process.env.CIRCLECI === "true") {
|
|
492181
|
+
return "circleci";
|
|
492182
|
+
}
|
|
492183
|
+
if (process.env.TRAVIS === "true") {
|
|
492184
|
+
return "travis";
|
|
492185
|
+
}
|
|
492186
|
+
if (process.env.JENKINS_URL != null || process.env.JENKINS_HOME != null) {
|
|
492187
|
+
return "jenkins";
|
|
492188
|
+
}
|
|
492189
|
+
if (process.env.TF_BUILD != null) {
|
|
492190
|
+
return "azure-pipelines";
|
|
492191
|
+
}
|
|
492192
|
+
if (process.env.BUILDKITE === "true") {
|
|
492193
|
+
return "buildkite";
|
|
492194
|
+
}
|
|
492195
|
+
if (process.env.CODEBUILD_BUILD_ID != null) {
|
|
492196
|
+
return "codebuild";
|
|
492197
|
+
}
|
|
492198
|
+
if (process.env.TEAMCITY_VERSION != null) {
|
|
492199
|
+
return "teamcity";
|
|
492200
|
+
}
|
|
492201
|
+
if (process.env.DRONE === "true") {
|
|
492202
|
+
return "drone";
|
|
492203
|
+
}
|
|
492204
|
+
if (process.env.SEMAPHORE === "true") {
|
|
492205
|
+
return "semaphore";
|
|
492206
|
+
}
|
|
492207
|
+
if (process.env.APPVEYOR === "true" || process.env.APPVEYOR === "True") {
|
|
492208
|
+
return "appveyor";
|
|
492209
|
+
}
|
|
492210
|
+
if (isCIEnvironment()) {
|
|
492211
|
+
return "unknown";
|
|
492212
|
+
}
|
|
492213
|
+
return void 0;
|
|
492214
|
+
}
|
|
492215
|
+
function normalizeInvoker(raw) {
|
|
492216
|
+
if (raw == null) {
|
|
492217
|
+
return void 0;
|
|
492218
|
+
}
|
|
492219
|
+
const normalized = raw.trim().toLowerCase();
|
|
492220
|
+
switch (normalized) {
|
|
492221
|
+
case "autopilot":
|
|
492222
|
+
case "autorelease":
|
|
492223
|
+
case "ci":
|
|
492224
|
+
case "manual":
|
|
492225
|
+
return normalized;
|
|
492226
|
+
default:
|
|
492227
|
+
return void 0;
|
|
492228
|
+
}
|
|
492229
|
+
}
|
|
492230
|
+
function isCIEnvironment() {
|
|
492231
|
+
return !!(process.env.CI || process.env.CONTINUOUS_INTEGRATION || process.env.GITHUB_ACTIONS || process.env.GITLAB_CI || process.env.CIRCLECI || process.env.TRAVIS || process.env.JENKINS_URL || process.env.JENKINS_HOME || process.env.TF_BUILD || process.env.BUILDKITE || process.env.CODEBUILD_BUILD_ID || process.env.TEAMCITY_VERSION || process.env.BITBUCKET_BUILD_NUMBER || process.env.DRONE || process.env.SEMAPHORE || process.env.APPVEYOR || process.env.BUDDY_WORKSPACE_ID || process.env.WERCKER_RUN_ID);
|
|
492232
|
+
}
|
|
492233
|
+
|
|
492123
492234
|
// ../../commons/api-workspace-commons/lib/FernWorkspace.js
|
|
492124
492235
|
var FernWorkspace = class extends AbstractAPIWorkspace {
|
|
492125
492236
|
definition;
|
|
@@ -492163,6 +492274,20 @@ function getOriginGitCommit() {
|
|
|
492163
492274
|
return void 0;
|
|
492164
492275
|
}
|
|
492165
492276
|
}
|
|
492277
|
+
function getOriginGitCommitIsDirty() {
|
|
492278
|
+
if (process.env.IGNORE_GIT_IN_METADATA === "true") {
|
|
492279
|
+
return void 0;
|
|
492280
|
+
}
|
|
492281
|
+
try {
|
|
492282
|
+
const status = (0, import_child_process3.execSync)("git status --porcelain", {
|
|
492283
|
+
encoding: "utf-8",
|
|
492284
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
492285
|
+
});
|
|
492286
|
+
return status.trim().length > 0;
|
|
492287
|
+
} catch {
|
|
492288
|
+
return void 0;
|
|
492289
|
+
}
|
|
492290
|
+
}
|
|
492166
492291
|
|
|
492167
492292
|
// ../configuration/lib/constants.js
|
|
492168
492293
|
var FERN_DIRECTORY = "fern";
|
|
@@ -622064,7 +622189,7 @@ var AccessTokenPosthogManager = class {
|
|
|
622064
622189
|
properties: {
|
|
622065
622190
|
...event,
|
|
622066
622191
|
...event.properties,
|
|
622067
|
-
version: "4.
|
|
622192
|
+
version: "4.78.0-11-g41f4e9e6031",
|
|
622068
622193
|
usingAccessToken: true
|
|
622069
622194
|
}
|
|
622070
622195
|
});
|
|
@@ -622118,7 +622243,7 @@ var UserPosthogManager = class {
|
|
|
622118
622243
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
622119
622244
|
event: "CLI",
|
|
622120
622245
|
properties: {
|
|
622121
|
-
version: "4.
|
|
622246
|
+
version: "4.78.0-11-g41f4e9e6031",
|
|
622122
622247
|
...event,
|
|
622123
622248
|
...event.properties,
|
|
622124
622249
|
usingAccessToken: false,
|
|
@@ -754057,7 +754182,16 @@ function inflateIr(ir15, casingsGenerator) {
|
|
|
754057
754182
|
dynamic: ir15.dynamic != null ? inflateDynamicIr(ir15.dynamic) : void 0,
|
|
754058
754183
|
selfHosted: ir15.selfHosted,
|
|
754059
754184
|
audiences: ir15.audiences,
|
|
754060
|
-
|
|
754185
|
+
// V65 only knows about cliVersion/generatorName/generatorVersion/generatorConfig/originGitCommit.
|
|
754186
|
+
// Strip the V66-only fields (originGitCommitIsDirty, invokedBy, requestedVersion, ciProvider)
|
|
754187
|
+
// to preserve the V65 contract for older generators.
|
|
754188
|
+
generationMetadata: ir15.generationMetadata != null ? {
|
|
754189
|
+
cliVersion: ir15.generationMetadata.cliVersion,
|
|
754190
|
+
generatorName: ir15.generationMetadata.generatorName,
|
|
754191
|
+
generatorVersion: ir15.generationMetadata.generatorVersion,
|
|
754192
|
+
generatorConfig: ir15.generationMetadata.generatorConfig,
|
|
754193
|
+
originGitCommit: ir15.generationMetadata.originGitCommit
|
|
754194
|
+
} : void 0,
|
|
754061
754195
|
apiPlayground: ir15.apiPlayground
|
|
754062
754196
|
};
|
|
754063
754197
|
}
|
|
@@ -839336,7 +839470,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
839336
839470
|
var LOGS_FOLDER_NAME = "logs";
|
|
839337
839471
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
839338
839472
|
function getCliSource() {
|
|
839339
|
-
const version7 = "4.
|
|
839473
|
+
const version7 = "4.78.0-11-g41f4e9e6031";
|
|
839340
839474
|
return `cli@${version7}`;
|
|
839341
839475
|
}
|
|
839342
839476
|
var DebugLogger = class {
|
|
@@ -849247,7 +849381,11 @@ async function runRemoteGenerationForGenerator({ projectConfig, organization, wo
|
|
|
849247
849381
|
generatorName: generatorInvocation.name,
|
|
849248
849382
|
generatorVersion: generatorInvocation.version,
|
|
849249
849383
|
generatorConfig: generatorInvocation.config,
|
|
849250
|
-
originGitCommit: getOriginGitCommit()
|
|
849384
|
+
originGitCommit: getOriginGitCommit(),
|
|
849385
|
+
originGitCommitIsDirty: getOriginGitCommitIsDirty(),
|
|
849386
|
+
invokedBy: detectInvocationSource(),
|
|
849387
|
+
requestedVersion: version7,
|
|
849388
|
+
ciProvider: detectCiProvider()
|
|
849251
849389
|
}
|
|
849252
849390
|
});
|
|
849253
849391
|
const venus = createVenusService({ token: token.value });
|
|
@@ -850651,7 +850789,7 @@ var LegacyDocsPublisher = class {
|
|
|
850651
850789
|
previewId,
|
|
850652
850790
|
disableTemplates: void 0,
|
|
850653
850791
|
skipUpload,
|
|
850654
|
-
cliVersion: "4.
|
|
850792
|
+
cliVersion: "4.78.0-11-g41f4e9e6031"
|
|
850655
850793
|
});
|
|
850656
850794
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
850657
850795
|
return { success: false };
|
|
@@ -886312,12 +886450,13 @@ var DynamicSnippetsGeneratorContext5 = class _DynamicSnippetsGeneratorContext ex
|
|
|
886312
886450
|
}
|
|
886313
886451
|
getDiscriminatedUnionVariantClassReference({ unionDeclaration, discriminantValue }) {
|
|
886314
886452
|
const unionClassName = this.getClassName(unionDeclaration.name);
|
|
886315
|
-
const
|
|
886453
|
+
const variantName = discriminantValue.name.pascalCase.safeName;
|
|
886316
886454
|
const modulePath = [
|
|
886317
886455
|
...this.getRootModulePath(),
|
|
886318
886456
|
...unionDeclaration.fernFilepath.allParts.map((part) => part.snakeCase.safeName)
|
|
886319
886457
|
];
|
|
886320
|
-
|
|
886458
|
+
const name2 = this.customConfig.pydantic_config?.union_naming === "v1" ? `${variantName}${unionClassName}` : `${unionClassName}_${variantName}`;
|
|
886459
|
+
return python_exports2.reference({ name: name2, modulePath });
|
|
886321
886460
|
}
|
|
886322
886461
|
useTypedDictRequests() {
|
|
886323
886462
|
return this.customConfig.use_typeddict_requests === true;
|
|
@@ -889084,18 +889223,156 @@ var DynamicTypeLiteralMapper4 = class _DynamicTypeLiteralMapper {
|
|
|
889084
889223
|
});
|
|
889085
889224
|
return ruby_exports.TypeLiteral.nop();
|
|
889086
889225
|
}
|
|
889087
|
-
|
|
889226
|
+
const entries23 = this.convertObjectEntries({ object: object22, value });
|
|
889227
|
+
return ruby_exports.TypeLiteral.hash(entries23);
|
|
889228
|
+
}
|
|
889229
|
+
convertObjectEntries({ object: object22, value }) {
|
|
889230
|
+
const record22 = typeof value === "object" && value != null ? value : {};
|
|
889231
|
+
const providedWireValues = new Set(Object.keys(record22));
|
|
889232
|
+
const entries23 = [];
|
|
889233
|
+
for (const [key2, val] of Object.entries(record22)) {
|
|
889088
889234
|
this.context.errors.scope(key2);
|
|
889089
889235
|
const property24 = object22.properties.find((p10) => p10.name.wireValue === key2);
|
|
889090
889236
|
const typeReference2 = property24?.typeReference ?? { type: "unknown" };
|
|
889091
889237
|
const propertyName = property24?.name.name.snakeCase.safeName ?? key2;
|
|
889092
|
-
const
|
|
889093
|
-
|
|
889094
|
-
|
|
889095
|
-
|
|
889238
|
+
const converted = this.convert({ typeReference: typeReference2, value: val });
|
|
889239
|
+
if (!ruby_exports.TypeLiteral.isNop(converted)) {
|
|
889240
|
+
entries23.push({
|
|
889241
|
+
key: ruby_exports.TypeLiteral.string(propertyName),
|
|
889242
|
+
value: converted
|
|
889243
|
+
});
|
|
889244
|
+
}
|
|
889096
889245
|
this.context.errors.unscope();
|
|
889097
|
-
|
|
889098
|
-
|
|
889246
|
+
}
|
|
889247
|
+
for (const property24 of object22.properties) {
|
|
889248
|
+
if (providedWireValues.has(property24.name.wireValue)) {
|
|
889249
|
+
continue;
|
|
889250
|
+
}
|
|
889251
|
+
if (this.context.isOptional(property24.typeReference) || this.context.isNullable(property24.typeReference)) {
|
|
889252
|
+
continue;
|
|
889253
|
+
}
|
|
889254
|
+
const defaultValue = this.synthesizeDefaultValue(property24.typeReference);
|
|
889255
|
+
if (!ruby_exports.TypeLiteral.isNop(defaultValue)) {
|
|
889256
|
+
entries23.push({
|
|
889257
|
+
key: ruby_exports.TypeLiteral.string(property24.name.name.snakeCase.safeName),
|
|
889258
|
+
value: defaultValue
|
|
889259
|
+
});
|
|
889260
|
+
}
|
|
889261
|
+
}
|
|
889262
|
+
return entries23.filter((entry) => !ruby_exports.TypeLiteral.isNop(entry.value));
|
|
889263
|
+
}
|
|
889264
|
+
// =============================================================================
|
|
889265
|
+
// DEFAULT VALUE SYNTHESIS
|
|
889266
|
+
// =============================================================================
|
|
889267
|
+
/**
|
|
889268
|
+
* Synthesizes a reasonable default value for a given type reference.
|
|
889269
|
+
* Used to populate required fields that are missing from examples,
|
|
889270
|
+
* preventing invalid code generation (e.g. empty hashes for types
|
|
889271
|
+
* with required fields).
|
|
889272
|
+
*/
|
|
889273
|
+
synthesizeDefaultValue(typeReference2, seen = /* @__PURE__ */ new Set()) {
|
|
889274
|
+
switch (typeReference2.type) {
|
|
889275
|
+
case "optional":
|
|
889276
|
+
case "nullable":
|
|
889277
|
+
return ruby_exports.TypeLiteral.nop();
|
|
889278
|
+
case "primitive":
|
|
889279
|
+
return this.synthesizeDefaultPrimitive(typeReference2.value);
|
|
889280
|
+
case "literal":
|
|
889281
|
+
return this.synthesizeDefaultLiteral(typeReference2.value);
|
|
889282
|
+
case "list":
|
|
889283
|
+
return ruby_exports.TypeLiteral.list([]);
|
|
889284
|
+
case "set":
|
|
889285
|
+
return ruby_exports.TypeLiteral.list([]);
|
|
889286
|
+
case "map":
|
|
889287
|
+
return ruby_exports.TypeLiteral.hash([]);
|
|
889288
|
+
case "named": {
|
|
889289
|
+
if (seen.has(typeReference2.value)) {
|
|
889290
|
+
return ruby_exports.TypeLiteral.nop();
|
|
889291
|
+
}
|
|
889292
|
+
const named = this.context.resolveNamedType({ typeId: typeReference2.value });
|
|
889293
|
+
if (named == null) {
|
|
889294
|
+
return ruby_exports.TypeLiteral.nop();
|
|
889295
|
+
}
|
|
889296
|
+
return this.synthesizeDefaultNamed({ named, typeId: typeReference2.value, seen });
|
|
889297
|
+
}
|
|
889298
|
+
case "unknown":
|
|
889299
|
+
return ruby_exports.TypeLiteral.nop();
|
|
889300
|
+
default:
|
|
889301
|
+
assertNever(typeReference2);
|
|
889302
|
+
}
|
|
889303
|
+
}
|
|
889304
|
+
synthesizeDefaultPrimitive(primitive) {
|
|
889305
|
+
switch (primitive) {
|
|
889306
|
+
case "STRING":
|
|
889307
|
+
case "BASE_64":
|
|
889308
|
+
case "BIG_INTEGER":
|
|
889309
|
+
return ruby_exports.TypeLiteral.string("string");
|
|
889310
|
+
case "INTEGER":
|
|
889311
|
+
case "LONG":
|
|
889312
|
+
case "UINT":
|
|
889313
|
+
case "UINT_64":
|
|
889314
|
+
return ruby_exports.TypeLiteral.integer(1);
|
|
889315
|
+
case "FLOAT":
|
|
889316
|
+
case "DOUBLE":
|
|
889317
|
+
return ruby_exports.TypeLiteral.float(1.1);
|
|
889318
|
+
case "BOOLEAN":
|
|
889319
|
+
return ruby_exports.TypeLiteral.boolean(true);
|
|
889320
|
+
case "DATE":
|
|
889321
|
+
return ruby_exports.TypeLiteral.string("2024-01-15");
|
|
889322
|
+
case "DATE_TIME":
|
|
889323
|
+
case "DATE_TIME_RFC_2822":
|
|
889324
|
+
return ruby_exports.TypeLiteral.string("2024-01-15T09:30:00Z");
|
|
889325
|
+
case "UUID":
|
|
889326
|
+
return ruby_exports.TypeLiteral.string("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32");
|
|
889327
|
+
default:
|
|
889328
|
+
assertNever(primitive);
|
|
889329
|
+
}
|
|
889330
|
+
}
|
|
889331
|
+
synthesizeDefaultLiteral(literalType2) {
|
|
889332
|
+
switch (literalType2.type) {
|
|
889333
|
+
case "boolean":
|
|
889334
|
+
return ruby_exports.TypeLiteral.boolean(literalType2.value);
|
|
889335
|
+
case "string":
|
|
889336
|
+
return ruby_exports.TypeLiteral.string(literalType2.value);
|
|
889337
|
+
default:
|
|
889338
|
+
assertNever(literalType2);
|
|
889339
|
+
}
|
|
889340
|
+
}
|
|
889341
|
+
synthesizeDefaultNamed({ named, typeId, seen }) {
|
|
889342
|
+
const newSeen = new Set(seen);
|
|
889343
|
+
newSeen.add(typeId);
|
|
889344
|
+
switch (named.type) {
|
|
889345
|
+
case "alias":
|
|
889346
|
+
return this.synthesizeDefaultValue(named.typeReference, newSeen);
|
|
889347
|
+
case "enum": {
|
|
889348
|
+
const firstValue = named.values[0];
|
|
889349
|
+
if (firstValue == null) {
|
|
889350
|
+
return ruby_exports.TypeLiteral.nop();
|
|
889351
|
+
}
|
|
889352
|
+
return ruby_exports.TypeLiteral.string(firstValue.wireValue);
|
|
889353
|
+
}
|
|
889354
|
+
case "object": {
|
|
889355
|
+
const entries23 = [];
|
|
889356
|
+
for (const property24 of named.properties) {
|
|
889357
|
+
if (this.context.isOptional(property24.typeReference) || this.context.isNullable(property24.typeReference)) {
|
|
889358
|
+
continue;
|
|
889359
|
+
}
|
|
889360
|
+
const defaultValue = this.synthesizeDefaultValue(property24.typeReference, newSeen);
|
|
889361
|
+
if (!ruby_exports.TypeLiteral.isNop(defaultValue)) {
|
|
889362
|
+
entries23.push({
|
|
889363
|
+
key: ruby_exports.TypeLiteral.string(property24.name.name.snakeCase.safeName),
|
|
889364
|
+
value: defaultValue
|
|
889365
|
+
});
|
|
889366
|
+
}
|
|
889367
|
+
}
|
|
889368
|
+
return ruby_exports.TypeLiteral.hash(entries23);
|
|
889369
|
+
}
|
|
889370
|
+
case "discriminatedUnion":
|
|
889371
|
+
case "undiscriminatedUnion":
|
|
889372
|
+
return ruby_exports.TypeLiteral.nop();
|
|
889373
|
+
default:
|
|
889374
|
+
assertNever(named);
|
|
889375
|
+
}
|
|
889099
889376
|
}
|
|
889100
889377
|
getValueAsNumber({ value, as: as8 }) {
|
|
889101
889378
|
const num = as8 === "key" ? typeof value === "string" ? Number(value) : value : value;
|
|
@@ -889587,9 +889864,10 @@ var EndpointSnippetGenerator7 = class {
|
|
|
889587
889864
|
}
|
|
889588
889865
|
getMethodArgsForPropertiesRequest({ request: request7, snippet: snippet2 }) {
|
|
889589
889866
|
const args = [];
|
|
889867
|
+
const record22 = this.context.getRecord(snippet2.requestBody) ?? {};
|
|
889590
889868
|
const bodyProperties = this.context.associateByWireValue({
|
|
889591
889869
|
parameters: request7.value,
|
|
889592
|
-
values:
|
|
889870
|
+
values: record22
|
|
889593
889871
|
});
|
|
889594
889872
|
for (const parameter6 of bodyProperties) {
|
|
889595
889873
|
const value = this.context.dynamicTypeLiteralMapper.convert(parameter6);
|
|
@@ -902495,7 +902773,11 @@ async function getIntermediateRepresentation({ workspace, audiences, generatorIn
|
|
|
902495
902773
|
generatorName: generatorInvocation.name,
|
|
902496
902774
|
generatorVersion: generatorInvocation.version,
|
|
902497
902775
|
generatorConfig: generatorInvocation.config,
|
|
902498
|
-
originGitCommit: getOriginGitCommit()
|
|
902776
|
+
originGitCommit: getOriginGitCommit(),
|
|
902777
|
+
originGitCommitIsDirty: getOriginGitCommitIsDirty(),
|
|
902778
|
+
invokedBy: detectInvocationSource(),
|
|
902779
|
+
requestedVersion: version7,
|
|
902780
|
+
ciProvider: detectCiProvider()
|
|
902499
902781
|
}
|
|
902500
902782
|
});
|
|
902501
902783
|
if (sourceConfig != null) {
|
|
@@ -902506,7 +902788,17 @@ async function getIntermediateRepresentation({ workspace, audiences, generatorIn
|
|
|
902506
902788
|
generatorName: generatorInvocation.name,
|
|
902507
902789
|
generatorVersion: generatorInvocation.version,
|
|
902508
902790
|
generatorConfig: generatorInvocation.config,
|
|
902509
|
-
originGitCommit: getOriginGitCommit()
|
|
902791
|
+
originGitCommit: getOriginGitCommit(),
|
|
902792
|
+
originGitCommitIsDirty: getOriginGitCommitIsDirty(),
|
|
902793
|
+
invokedBy: detectInvocationSource(),
|
|
902794
|
+
// `requestedVersion` must reflect the raw `--version` flag passed by the user. The
|
|
902795
|
+
// `version` parameter here may have been resolved (e.g. via `computeSemanticVersion`)
|
|
902796
|
+
// so we never fall back to it. When the IR is freshly generated above, this field is
|
|
902797
|
+
// populated with the raw flag value. When the IR is pre-generated, the caller is
|
|
902798
|
+
// responsible for having set this correctly; a pre-existing `undefined` means the
|
|
902799
|
+
// user did not pass `--version`.
|
|
902800
|
+
requestedVersion: intermediateRepresentation.generationMetadata?.requestedVersion,
|
|
902801
|
+
ciProvider: detectCiProvider()
|
|
902510
902802
|
};
|
|
902511
902803
|
context3.logger.debug("Generated IR");
|
|
902512
902804
|
const irVersionFromFdr = await getIrVersionForGenerator(generatorInvocation).then((version8) => version8 == null ? void 0 : "v" + version8.toString());
|
|
@@ -903917,7 +904209,11 @@ async function runLocalGenerationForWorkspace({ token, projectConfig, workspace,
|
|
|
903917
904209
|
generatorName: generatorInvocation.name,
|
|
903918
904210
|
generatorVersion: generatorInvocation.version,
|
|
903919
904211
|
generatorConfig: generatorInvocation.config,
|
|
903920
|
-
originGitCommit: getOriginGitCommit()
|
|
904212
|
+
originGitCommit: getOriginGitCommit(),
|
|
904213
|
+
originGitCommitIsDirty: getOriginGitCommitIsDirty(),
|
|
904214
|
+
invokedBy: detectInvocationSource(),
|
|
904215
|
+
requestedVersion: userProvidedVersion,
|
|
904216
|
+
ciProvider: detectCiProvider()
|
|
903921
904217
|
}
|
|
903922
904218
|
});
|
|
903923
904219
|
const venus = createVenusService({ token: token?.value });
|
|
@@ -904348,7 +904644,11 @@ var GenerationRunner = class {
|
|
|
904348
904644
|
generatorName: generatorInvocation.name,
|
|
904349
904645
|
generatorVersion: generatorInvocation.version,
|
|
904350
904646
|
generatorConfig: generatorInvocation.config,
|
|
904351
|
-
originGitCommit: getOriginGitCommit()
|
|
904647
|
+
originGitCommit: getOriginGitCommit(),
|
|
904648
|
+
originGitCommitIsDirty: getOriginGitCommitIsDirty(),
|
|
904649
|
+
invokedBy: detectInvocationSource(),
|
|
904650
|
+
requestedVersion: outputVersionOverride,
|
|
904651
|
+
ciProvider: detectCiProvider()
|
|
904352
904652
|
}
|
|
904353
904653
|
});
|
|
904354
904654
|
const workspaceTempDir = await getWorkspaceTempDir();
|
|
@@ -925562,7 +925862,7 @@ var CliContext = class _CliContext {
|
|
|
925562
925862
|
if (false) {
|
|
925563
925863
|
this.logger.error("CLI_VERSION is not defined");
|
|
925564
925864
|
}
|
|
925565
|
-
return "4.
|
|
925865
|
+
return "4.78.0-11-g41f4e9e6031";
|
|
925566
925866
|
}
|
|
925567
925867
|
getCliName() {
|
|
925568
925868
|
if (false) {
|
package/package.json
CHANGED