New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@stately-cloud/schema

Package Overview
Dependencies
Maintainers
0
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stately-cloud/schema - npm Package Compare versions

Comparing version 0.14.0 to 0.15.0

dist/comments.d.ts

18

dist/driver.js

@@ -7,2 +7,3 @@ import { create, toBinary } from "@bufbuild/protobuf";

import packageJson from "../package.json" with { type: "json" };
import { buildSourceCodeInfo, extractCommentBindings } from "./comments.js";
import { SchemaError } from "./errors.js";

@@ -38,5 +39,5 @@ import { StatelyErrorDetailsSchema } from "./errors/error_details_pb.js";

process.env.PACKAGE = fileName ? `stately.generated.${fileName}` : "stately.generated";
process.stderr.write(`Building schema from ${fullInputPath}`);
process.stderr.write(`Building schema from ${inputPath}\n`);
// Use TypeScript to parse the input files.
const program = ts.createProgram([fullInputPath], {
const tsOpts = {
strict: true,

@@ -55,3 +56,4 @@ esModuleInterop: true,

useUnknownInCatchVariables: true,
});
};
const program = ts.createProgram([fullInputPath], tsOpts);
// Validate and type check the program

@@ -120,2 +122,12 @@ const allDiagnostics = ts.getPreEmitDiagnostics(program);

}
// Add comment information to the FileDescriptorProto, statically extracted
// from the TypeScript AST.
try {
const commentBindings = extractCommentBindings(program);
fd.sourceCodeInfo = buildSourceCodeInfo(fd, commentBindings);
}
catch (e) {
await respondWithError(e, "SchemaComment", "An error occurred while extracting comments from your schema code.");
return;
}
// Collect and expand all the migrations from the latest version. In the

@@ -122,0 +134,0 @@ // future I suppose we can pass a specific from-version argument.

@@ -48,1 +48,2 @@ import { SchemaType } from "./types.js";

}, config?: EnumConfig): SchemaType;
export declare function enumValueName(enumName: string, valueName: string): string;

@@ -44,4 +44,9 @@ import { create } from "@bufbuild/protobuf";

}
// Note that enum values are a sibling to the enum parent in the proto
// namespace - they must be globally unique. We follow the
// https://buf.build/docs/lint/rules/#enum_value_prefix rule and prefix all
// enum values with the enum name. This produces some awkward names in
// generated code, which we should fix in our own codegen.
enumValues.push(create(EnumValueDescriptorProtoSchema, {
name: `${name}_${valueName}`,
name: enumValueName(name, valueName),
number: valueNum,

@@ -58,3 +63,3 @@ options: config.deprecatedValues?.includes(valueName)

enumValues.unshift(create(EnumValueDescriptorProtoSchema, {
name: `${name}_UNSPECIFIED`,
name: enumValueName(name, "UNSPECIFIED"),
number: 0,

@@ -76,3 +81,6 @@ }));

}
export function enumValueName(enumName, valueName) {
return `${enumName}_${valueName}`;
}
// TODO: Implement flagsType, which is like an enum but the values are flags in a bitfield
//# sourceMappingURL=enum.js.map

2

package.json
{
"name": "@stately-cloud/schema",
"version": "0.14.0",
"version": "0.15.0",
"author": "Stately Cloud <support@stately.cloud> (https://stately.cloud/)",

@@ -5,0 +5,0 @@ "description": "Schema language for StatelyDB",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc