@civitai/sdk 0.11.0 → 0.11.1

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.
@@ -2,6 +2,7 @@ import { isHostMessage, parseBlockInitFragment, stripBlockInitFragment, } from '
2
2
  import { EMPTY_SNAPSHOT, snapshotFromInit, tokenFromWrapped, } from '../transport.js';
3
3
  import { BridgeError, classifyHostError } from '../errors.js';
4
4
  import { OriginMatcher } from '../origin-matcher.js';
5
+ import { VERSION } from '../../version.generated.js';
5
6
  /**
6
7
  * The framing the host had before this package owned the protocol: fields
7
8
  * straight in the payload, and failure as the server's own sentence. Converting
@@ -271,7 +272,9 @@ export class IframeTransport {
271
272
  this.#emit();
272
273
  this.#flushOutbound();
273
274
  // height 0 is a placeholder; the real measurement follows once the app mounts.
274
- this.#dispatch('BLOCK_READY', { height: 0 });
275
+ // `sdkName`/`sdkVersion` are informational: the host counts which SDK
276
+ // versions are in the wild. Nothing is negotiated on them.
277
+ this.#dispatch('BLOCK_READY', { height: 0, sdkName: 'sdk', sdkVersion: VERSION });
275
278
  }
276
279
  return;
277
280
  }
@@ -0,0 +1,2 @@
1
+ /** This package's version, reported to the host as `sdkVersion` in `BLOCK_READY`. */
2
+ export declare const VERSION = "0.11.1";
@@ -0,0 +1,3 @@
1
+ /* AUTOGENERATED from package.json by scripts/gen-version.mjs. DO NOT EDIT. */
2
+ /** This package's version, reported to the host as `sdkVersion` in `BLOCK_READY`. */
3
+ export const VERSION = "0.11.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@civitai/sdk",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "description": "The Civitai SDK: an app holds a token and calls the Civitai API and the orchestrator; a block asks its host only to show host UI.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -60,7 +60,8 @@
60
60
  "@civitai/orchestration-client": "0.2.0-beta.101"
61
61
  },
62
62
  "scripts": {
63
- "build": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.json",
63
+ "generate": "node ../../scripts/gen-version.mjs",
64
+ "build": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && node ../../scripts/gen-version.mjs && tsc -p tsconfig.json",
64
65
  "api": "node scripts/api-report.mjs",
65
66
  "api:check": "node scripts/api-report.mjs --check",
66
67
  "check:layering": "node scripts/check-layering.mjs",