@stately-cloud/schema
Advanced tools
Comparing version 0.13.0 to 0.14.0
@@ -89,5 +89,5 @@ import { create, toBinary } from "@bufbuild/protobuf"; | ||
// We cannot compare types of values with "instanceof" because the | ||
// DeferredMigration type used in the customer's schema file is | ||
// DeferredMigration type used in the customer's schema file is | ||
// a different copy of the class from the one we've imported here. | ||
// One is imported directly and the other is interpreted through | ||
// One is imported directly and the other is interpreted through | ||
// "tsImport". So instead we use the constructor name to compare types. | ||
@@ -94,0 +94,0 @@ if (value.constructor.name === "DeferredMigration") { |
@@ -70,2 +70,7 @@ import { Migration } from "./migration_pb.js"; | ||
/** | ||
* Mark an entire type (item, object, or enum type) as having been added since | ||
* the "from" version. | ||
*/ | ||
addType(name: string): void; | ||
/** | ||
* Mark the entire type (item, object, or enum type) as having been renamed | ||
@@ -72,0 +77,0 @@ * since the "from" version. This should occur before a changeType call for |
@@ -13,3 +13,2 @@ import { create } from "@bufbuild/protobuf"; | ||
constructor(name, migration) { | ||
// TODO: this hardcoded package name is gonna bite us someday | ||
const typeName = `${getPackageName()}.${name}`; | ||
@@ -130,2 +129,19 @@ this.command = create(MigrationCommandSchema, { | ||
/** | ||
* Mark an entire type (item, object, or enum type) as having been added since | ||
* the "from" version. | ||
*/ | ||
addType(name) { | ||
this.migration.commands.push(create(MigrationCommandSchema, { | ||
typeName: `${getPackageName()}.${name}`, | ||
actions: [ | ||
{ | ||
action: { | ||
case: "addType", | ||
value: {}, | ||
}, | ||
}, | ||
], | ||
})); | ||
} | ||
/** | ||
* Mark the entire type (item, object, or enum type) as having been renamed | ||
@@ -132,0 +148,0 @@ * since the "from" version. This should occur before a changeType call for |
@@ -11,3 +11,3 @@ // @generated by protoc-gen-es v2.2.3 with parameter "target=js+dts,import_extension=.js" | ||
/*@__PURE__*/ | ||
fileDesc("Cg9taWdyYXRpb24ucHJvdG8SE3N0YXRlbHkuc2NoZW1hbW9kZWwifwoJTWlncmF0aW9uEiMKE2Zyb21fc2NoZW1hX3ZlcnNpb24YASABKAR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0aW9uEgW6SAIIASIgCghBZGRGaWVsZBIUCgRuYW1lGAEgASgJQga6SAPIAQEiIwoLUmVtb3ZlRmllbGQSFAoEbmFtZRgBIAEoCUIGukgDyAEBIkEKC1JlbmFtZUZpZWxkEhgKCG9sZF9uYW1lGAEgASgJQga6SAPIAQESGAoIbmV3X25hbWUYAiABKAlCBrpIA8gBASImCgpSZW5hbWVUeXBlEhgKCG5ld19uYW1lGAIgASgJQga6SAPIAQEiDAoKUmVtb3ZlVHlwZSIJCgdBZGRUeXBlQpYBChdjb20uc3RhdGVseS5zY2hlbWFtb2RlbEIOTWlncmF0aW9uUHJvdG9QAaICA1NTWKoCE1N0YXRlbHkuU2NoZW1hbW9kZWzKAhNTdGF0ZWx5XFNjaGVtYW1vZGVs4gIfU3RhdGVseVxTY2hlbWFtb2RlbFxHUEJNZXRhZGF0YeoCFFN0YXRlbHk6OlNjaGVtYW1vZGVsYgZwcm90bzM", [file_buf_validate_validate]); | ||
/** | ||
@@ -14,0 +14,0 @@ * Describes the message stately.schemamodel.Migration. |
{ | ||
"name": "@stately-cloud/schema", | ||
"version": "0.13.0", | ||
"version": "0.14.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
Sorry, the diff of this file is not supported yet
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
264398
3300