@atproto/lex-schema 0.0.8 → 0.0.9

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,12 @@
1
1
  # @atproto/lex-schema
2
2
 
3
+ ## 0.0.9
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`dfd4bee`](https://github.com/bluesky-social/atproto/commit/dfd4bee4abbc1a3e53531bb499a6f3169c13ed9e), [`dfd4bee`](https://github.com/bluesky-social/atproto/commit/dfd4bee4abbc1a3e53531bb499a6f3169c13ed9e), [`dfd4bee`](https://github.com/bluesky-social/atproto/commit/dfd4bee4abbc1a3e53531bb499a6f3169c13ed9e), [`dfd4bee`](https://github.com/bluesky-social/atproto/commit/dfd4bee4abbc1a3e53531bb499a6f3169c13ed9e)]:
8
+ - @atproto/lex-data@0.0.8
9
+
3
10
  ## 0.0.8
4
11
 
5
12
  ### Patch Changes
@@ -1,8 +1,10 @@
1
- import { Cid, CidCheckOptions, InferCheckedCid } from '@atproto/lex-data';
1
+ import { CheckCidOptions, Cid, InferCheckedCid } from '@atproto/lex-data';
2
2
  import { Schema, ValidationResult, ValidatorContext } from '../core.js';
3
3
  export type { Cid };
4
- export type CidSchemaOptions = CidCheckOptions;
5
- export type CidSchemaOutput<TOptions extends CidSchemaOptions> = InferCheckedCid<TOptions>;
4
+ export type CidSchemaOptions = CheckCidOptions;
5
+ export type CidSchemaOutput<TOptions extends CidSchemaOptions = {
6
+ flavor: undefined;
7
+ }> = InferCheckedCid<TOptions>;
6
8
  export declare class CidSchema<TOptions extends CidSchemaOptions> extends Schema<CidSchemaOutput<TOptions>> {
7
9
  readonly options: TOptions;
8
10
  constructor(options: TOptions);
@@ -1 +1 @@
1
- {"version":3,"file":"cid.d.ts","sourceRoot":"","sources":["../../src/schema/cid.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,eAAe,EAAS,MAAM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B,GACpB,gBAAgB,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;CAO/C"}
@@ -1 +1 @@
1
- {"version":3,"file":"cid.js","sourceRoot":"","sources":["../../src/schema/cid.ts"],"names":[],"mappings":";;;AAAA,gDAAgF;AAChF,wCAAuE;AAQvE,MAAa,SAA6C,SAAQ,gBAEjE;IACsB;IAArB,YAAqB,OAAiB;QACpC,KAAK,EAAE,CAAA;QADY,YAAO,GAAP,OAAO,CAAU;IAEtC,CAAC;IAED,iBAAiB,CACf,KAAc,EACd,GAAqB;QAErB,IAAI,CAAC,IAAA,gBAAK,EAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;YAChC,OAAO,GAAG,CAAC,gBAAgB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;QAC3C,CAAC;QAED,OAAO,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC3B,CAAC;CACF;AAjBD,8BAiBC","sourcesContent":["import { Cid, CidCheckOptions, InferCheckedCid, isCid } from '@atproto/lex-data'\nimport { Schema, ValidationResult, ValidatorContext } from '../core.js'\n\nexport type { Cid }\n\nexport type CidSchemaOptions = CidCheckOptions\nexport type CidSchemaOutput<TOptions extends CidSchemaOptions> =\n InferCheckedCid<TOptions>\n\nexport class CidSchema<TOptions extends CidSchemaOptions> extends Schema<\n CidSchemaOutput<TOptions>\n> {\n constructor(readonly options: TOptions) {\n super()\n }\n\n validateInContext(\n input: unknown,\n ctx: ValidatorContext,\n ): ValidationResult<CidSchemaOutput<TOptions>> {\n if (!isCid(input, this.options)) {\n return ctx.issueInvalidType(input, 'cid')\n }\n\n return ctx.success(input)\n }\n}\n"]}
1
+ {"version":3,"file":"cid.js","sourceRoot":"","sources":["../../src/schema/cid.ts"],"names":[],"mappings":";;;AAAA,gDAAgF;AAChF,wCAAuE;AASvE,MAAa,SAA6C,SAAQ,gBAEjE;IACsB;IAArB,YAAqB,OAAiB;QACpC,KAAK,EAAE,CAAA;QADY,YAAO,GAAP,OAAO,CAAU;IAEtC,CAAC;IAED,iBAAiB,CACf,KAAc,EACd,GAAqB;QAErB,IAAI,CAAC,IAAA,gBAAK,EAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;YAChC,OAAO,GAAG,CAAC,gBAAgB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;QAC3C,CAAC;QAED,OAAO,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC3B,CAAC;CACF;AAjBD,8BAiBC","sourcesContent":["import { CheckCidOptions, Cid, InferCheckedCid, isCid } from '@atproto/lex-data'\nimport { Schema, ValidationResult, ValidatorContext } from '../core.js'\n\nexport type { Cid }\n\nexport type CidSchemaOptions = CheckCidOptions\nexport type CidSchemaOutput<\n TOptions extends CidSchemaOptions = { flavor: undefined },\n> = InferCheckedCid<TOptions>\n\nexport class CidSchema<TOptions extends CidSchemaOptions> extends Schema<\n CidSchemaOutput<TOptions>\n> {\n constructor(readonly options: TOptions) {\n super()\n }\n\n validateInContext(\n input: unknown,\n ctx: ValidatorContext,\n ): ValidationResult<CidSchemaOutput<TOptions>> {\n if (!isCid(input, this.options)) {\n return ctx.issueInvalidType(input, 'cid')\n }\n\n return ctx.success(input)\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/lex-schema",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "license": "MIT",
5
5
  "description": "Lexicon schema system for AT Lexicons",
6
6
  "keywords": [
@@ -37,7 +37,7 @@
37
37
  "dependencies": {
38
38
  "tslib": "^2.8.1",
39
39
  "@atproto/syntax": "0.4.2",
40
- "@atproto/lex-data": "0.0.7"
40
+ "@atproto/lex-data": "0.0.8"
41
41
  },
42
42
  "devDependencies": {
43
43
  "vitest": "^4.0.16"
package/src/schema/cid.ts CHANGED
@@ -1,11 +1,12 @@
1
- import { Cid, CidCheckOptions, InferCheckedCid, isCid } from '@atproto/lex-data'
1
+ import { CheckCidOptions, Cid, InferCheckedCid, isCid } from '@atproto/lex-data'
2
2
  import { Schema, ValidationResult, ValidatorContext } from '../core.js'
3
3
 
4
4
  export type { Cid }
5
5
 
6
- export type CidSchemaOptions = CidCheckOptions
7
- export type CidSchemaOutput<TOptions extends CidSchemaOptions> =
8
- InferCheckedCid<TOptions>
6
+ export type CidSchemaOptions = CheckCidOptions
7
+ export type CidSchemaOutput<
8
+ TOptions extends CidSchemaOptions = { flavor: undefined },
9
+ > = InferCheckedCid<TOptions>
9
10
 
10
11
  export class CidSchema<TOptions extends CidSchemaOptions> extends Schema<
11
12
  CidSchemaOutput<TOptions>