@beff/cli 0.0.115 → 0.0.116

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @beff/cli
2
2
 
3
+ ## 0.0.116
4
+
5
+ ### Patch Changes
6
+
7
+ - fix hash bug
8
+
3
9
  ## 0.0.115
4
10
 
5
11
  ### Patch Changes
package/dist-cli/cli.js CHANGED
@@ -45781,7 +45781,7 @@ var fs = __toESM(require("fs"));
45781
45781
  var path = __toESM(require("path"));
45782
45782
 
45783
45783
  // ts-node/generated/bundle.ts
45784
- var bundle_default = { "codegen-v2.js": '"use strict";\n\nimport {\n TypeofRuntype,\n AnyRuntype,\n NullishRuntype,\n NeverRuntype,\n ConstRuntype,\n RegexRuntype,\n DateRuntype,\n BigIntRuntype,\n StringWithFormatRuntype,\n NumberWithFormatRuntype,\n AnyOfConstsRuntype,\n TupleRuntype,\n AllOfRuntype,\n AnyOfRuntype,\n ArrayRuntype,\n AnyOfDiscriminatedRuntype,\n ObjectRuntype,\n OptionalFieldRuntype,\n registerStringFormatter,\n registerNumberFormatter,\n buildParserFromRuntype,\n} from "@beff/client/codegen-v2";\n\n\nclass RefRuntype {\n refName\n constructor(refName) {\n this.refName = refName;\n }\n describe(ctx) {\n const name = this.refName;\n const to = namedRuntypes[this.refName];\n if (ctx.measure) {\n ctx.deps_counter[name] = (ctx.deps_counter[name] || 0) + 1;\n if (ctx.deps[name]) {\n return name;\n }\n ctx.deps[name] = true;\n ctx.deps[name] = to.describe(ctx);\n return name;\n } else {\n if (ctx.deps_counter[name] > 1) {\n if (!ctx.deps[name]) {\n ctx.deps[name] = true;\n ctx.deps[name] = to.describe(ctx);\n }\n return name;\n } else {\n return to.describe(ctx);\n }\n }\n }\n schema(ctx) {\n const name = this.refName;\n const to = namedRuntypes[this.refName];\n if (ctx.seen[name]) {\n return {};\n }\n ctx.seen[name] = true;\n var tmp = to.schema(ctx);\n delete ctx.seen[name];\n return tmp;\n }\n hash(ctx) {\n const name = this.refName;\n const to = namedRuntypes[this.refName];\n if (ctx.seen[name]) {\n return generateHashFromString(name);\n }\n ctx.seen[name] = true;\n var tmp = to.hash(ctx);\n delete ctx.seen[name];\n return tmp;\n }\n validate(ctx, input) {\n const to = namedRuntypes[this.refName];\n return to.validate(ctx, input);\n }\n parseAfterValidation(ctx, input) {\n const to = namedRuntypes[this.refName];\n return to.parseAfterValidation(ctx, input);\n }\n reportDecodeError(ctx, input) {\n const to = namedRuntypes[this.refName];\n return to.reportDecodeError(ctx, input);\n }\n}\n\nconst buildParsers = (args) => {\n const stringFormats = args?.stringFormats ?? {};\n for (const k of RequiredStringFormats) {\n if (stringFormats[k] == null) {\n throw new Error(`Missing custom format ${k}`);\n }\n }\n Object.keys(stringFormats).forEach((k) => {\n const v = stringFormats[k];\n registerStringFormatter(k, v);\n });\n const numberFormats = args?.numberFormats ?? {};\n for (const k of RequiredNumberFormats) {\n if (numberFormats[k] == null) {\n throw new Error(`Missing custom format ${k}`);\n }\n }\n Object.keys(numberFormats).forEach((k) => {\n const v = numberFormats[k];\n registerNumberFormatter(k, v);\n });\n let acc = {};\n for (const k of Object.keys(buildParsersInput)) {\n const it = buildParserFromRuntype(buildParsersInput[k], k, false);\n acc[k] = it;\n }\n return acc;\n};\n', "parser.d.ts": 'import { BuildParserFunction } from "@beff/client";\n\ndeclare const _exports: {\n buildParsers: BuildParserFunction;\n};\n\nexport default _exports;\n' };
45784
+ var bundle_default = { "codegen-v2.js": '"use strict";\n\nimport {\n TypeofRuntype,\n AnyRuntype,\n NullishRuntype,\n NeverRuntype,\n ConstRuntype,\n RegexRuntype,\n DateRuntype,\n BigIntRuntype,\n StringWithFormatRuntype,\n NumberWithFormatRuntype,\n AnyOfConstsRuntype,\n TupleRuntype,\n AllOfRuntype,\n AnyOfRuntype,\n ArrayRuntype,\n AnyOfDiscriminatedRuntype,\n ObjectRuntype,\n OptionalFieldRuntype,\n registerStringFormatter,\n registerNumberFormatter,\n buildParserFromRuntype,\n generateHashFromString,\n} from "@beff/client/codegen-v2";\n\n\nclass RefRuntype {\n refName\n constructor(refName) {\n this.refName = refName;\n }\n describe(ctx) {\n const name = this.refName;\n const to = namedRuntypes[this.refName];\n if (ctx.measure) {\n ctx.deps_counter[name] = (ctx.deps_counter[name] || 0) + 1;\n if (ctx.deps[name]) {\n return name;\n }\n ctx.deps[name] = true;\n ctx.deps[name] = to.describe(ctx);\n return name;\n } else {\n if (ctx.deps_counter[name] > 1) {\n if (!ctx.deps[name]) {\n ctx.deps[name] = true;\n ctx.deps[name] = to.describe(ctx);\n }\n return name;\n } else {\n return to.describe(ctx);\n }\n }\n }\n schema(ctx) {\n const name = this.refName;\n const to = namedRuntypes[this.refName];\n if (ctx.seen[name]) {\n return {};\n }\n ctx.seen[name] = true;\n var tmp = to.schema(ctx);\n delete ctx.seen[name];\n return tmp;\n }\n hash(ctx) {\n const name = this.refName;\n const to = namedRuntypes[this.refName];\n if (ctx.seen[name]) {\n return generateHashFromString(name);\n }\n ctx.seen[name] = true;\n var tmp = to.hash(ctx);\n delete ctx.seen[name];\n return tmp;\n }\n validate(ctx, input) {\n const to = namedRuntypes[this.refName];\n return to.validate(ctx, input);\n }\n parseAfterValidation(ctx, input) {\n const to = namedRuntypes[this.refName];\n return to.parseAfterValidation(ctx, input);\n }\n reportDecodeError(ctx, input) {\n const to = namedRuntypes[this.refName];\n return to.reportDecodeError(ctx, input);\n }\n}\n\nconst buildParsers = (args) => {\n const stringFormats = args?.stringFormats ?? {};\n for (const k of RequiredStringFormats) {\n if (stringFormats[k] == null) {\n throw new Error(`Missing custom format ${k}`);\n }\n }\n Object.keys(stringFormats).forEach((k) => {\n const v = stringFormats[k];\n registerStringFormatter(k, v);\n });\n const numberFormats = args?.numberFormats ?? {};\n for (const k of RequiredNumberFormats) {\n if (numberFormats[k] == null) {\n throw new Error(`Missing custom format ${k}`);\n }\n }\n Object.keys(numberFormats).forEach((k) => {\n const v = numberFormats[k];\n registerNumberFormatter(k, v);\n });\n let acc = {};\n for (const k of Object.keys(buildParsersInput)) {\n const it = buildParserFromRuntype(buildParsersInput[k], k, false);\n acc[k] = it;\n }\n return acc;\n};\n', "parser.d.ts": 'import { BuildParserFunction } from "@beff/client";\n\ndeclare const _exports: {\n buildParsers: BuildParserFunction;\n};\n\nexport default _exports;\n' };
45785
45785
 
45786
45786
  // ts-node/bundle-to-disk.ts
45787
45787
  var esmTag = (mod) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beff/cli",
3
- "version": "0.0.115",
3
+ "version": "0.0.116",
4
4
  "description": "",
5
5
  "bin": {
6
6
  "beff": "./bin/index.js"