@snowcone-app/sdk 0.17.2 → 0.18.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.
- package/CHANGELOG.md +12 -0
- package/dist/index.cjs +3 -3
- package/dist/index.js +3 -3
- package/dist/server.cjs +4 -0
- package/dist/server.d.cts +3 -0
- package/dist/server.d.ts +3 -0
- package/dist/server.js +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.18.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#857](https://github.com/snowcone-app/snowcone-monorepo/pull/857) [`723efd3`](https://github.com/snowcone-app/snowcone-monorepo/commit/723efd37a0c9c15589403748e339348e29e08147) Thanks [@kevinsproles](https://github.com/kevinsproles)! - Update the public catalog key value (the Meilisearch master key was rotated, which re-derives every API key's value). Same read-only `search` + `documents.get` scope as before.
|
|
8
|
+
|
|
9
|
+
## 0.18.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#827](https://github.com/snowcone-app/snowcone-monorepo/pull/827) [`ab06b92`](https://github.com/snowcone-app/snowcone-monorepo/commit/ab06b92881105250fecb2d2ef2cdd186bca3f460) Thanks [@kevinsproles](https://github.com/kevinsproles)! - Export the L3 signature primitives `canonicalForSig` and `signDevSig` from `@snowcone-app/sdk/server` (re-exported from `@snowcone-app/mockup-url`). First-party server surfaces that can't depend on `mockup-url` directly (apps/www RSC signing, the apps/api worker) now import them from the SDK server entry instead of keeping byte-exact vendored copies in lockstep.
|
|
14
|
+
|
|
3
15
|
## 0.17.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -6205,7 +6205,7 @@ function validateProductLoose(product) {
|
|
|
6205
6205
|
async function listProducts(config) {
|
|
6206
6206
|
const f = getFetcher(config);
|
|
6207
6207
|
const meilisearchHost = config?.meilisearch?.host || typeof process !== "undefined" && process.env?.NEXT_PUBLIC_MEILISEARCH_HOST || "https://search.snowcone.app";
|
|
6208
|
-
const meilisearchApiKey = config?.meilisearch?.apiKey || typeof process !== "undefined" && process.env?.NEXT_PUBLIC_MEILISEARCH_API_KEY || "
|
|
6208
|
+
const meilisearchApiKey = config?.meilisearch?.apiKey || typeof process !== "undefined" && process.env?.NEXT_PUBLIC_MEILISEARCH_API_KEY || "73f573ead9be75531c56ee89d104caa49d79154db387f119a013d33eccfe654b";
|
|
6209
6209
|
const meilisearchIndex = config?.meilisearch?.index || typeof process !== "undefined" && process.env?.NEXT_PUBLIC_MEILISEARCH_INDEX || "snowcone";
|
|
6210
6210
|
const headers = {
|
|
6211
6211
|
"Content-Type": "application/json"
|
|
@@ -6231,7 +6231,7 @@ async function listProducts(config) {
|
|
|
6231
6231
|
async function getProduct(idOrSlug, config) {
|
|
6232
6232
|
const f = getFetcher(config);
|
|
6233
6233
|
const meilisearchHost = config?.meilisearch?.host || typeof process !== "undefined" && process.env?.NEXT_PUBLIC_MEILISEARCH_HOST || "https://search.snowcone.app";
|
|
6234
|
-
const meilisearchApiKey = config?.meilisearch?.apiKey || typeof process !== "undefined" && process.env?.NEXT_PUBLIC_MEILISEARCH_API_KEY || "
|
|
6234
|
+
const meilisearchApiKey = config?.meilisearch?.apiKey || typeof process !== "undefined" && process.env?.NEXT_PUBLIC_MEILISEARCH_API_KEY || "73f573ead9be75531c56ee89d104caa49d79154db387f119a013d33eccfe654b";
|
|
6235
6235
|
const meilisearchIndex = config?.meilisearch?.index || typeof process !== "undefined" && process.env?.NEXT_PUBLIC_MEILISEARCH_INDEX || "snowcone";
|
|
6236
6236
|
const headers = {
|
|
6237
6237
|
"Content-Type": "application/json"
|
|
@@ -6255,7 +6255,7 @@ async function getProduct(idOrSlug, config) {
|
|
|
6255
6255
|
async function searchDesigns(query = "", options) {
|
|
6256
6256
|
const f = getFetcher(options);
|
|
6257
6257
|
const meilisearchHost = options?.meilisearch?.host || typeof process !== "undefined" && process.env?.NEXT_PUBLIC_MEILISEARCH_HOST || "https://search.snowcone.app";
|
|
6258
|
-
const meilisearchApiKey = options?.meilisearch?.apiKey || typeof process !== "undefined" && process.env?.NEXT_PUBLIC_MEILISEARCH_API_KEY || "
|
|
6258
|
+
const meilisearchApiKey = options?.meilisearch?.apiKey || typeof process !== "undefined" && process.env?.NEXT_PUBLIC_MEILISEARCH_API_KEY || "73f573ead9be75531c56ee89d104caa49d79154db387f119a013d33eccfe654b";
|
|
6259
6259
|
const designsIndex = options?.meilisearch?.designsIndex || typeof process !== "undefined" && process.env?.NEXT_PUBLIC_MEILISEARCH_DESIGNS_INDEX || "snowcone-designs";
|
|
6260
6260
|
const headers = {
|
|
6261
6261
|
"Content-Type": "application/json"
|
package/dist/index.js
CHANGED
|
@@ -5039,7 +5039,7 @@ function validateProductLoose(product) {
|
|
|
5039
5039
|
async function listProducts(config) {
|
|
5040
5040
|
const f = getFetcher(config);
|
|
5041
5041
|
const meilisearchHost = config?.meilisearch?.host || typeof process !== "undefined" && process.env?.NEXT_PUBLIC_MEILISEARCH_HOST || "https://search.snowcone.app";
|
|
5042
|
-
const meilisearchApiKey = config?.meilisearch?.apiKey || typeof process !== "undefined" && process.env?.NEXT_PUBLIC_MEILISEARCH_API_KEY || "
|
|
5042
|
+
const meilisearchApiKey = config?.meilisearch?.apiKey || typeof process !== "undefined" && process.env?.NEXT_PUBLIC_MEILISEARCH_API_KEY || "73f573ead9be75531c56ee89d104caa49d79154db387f119a013d33eccfe654b";
|
|
5043
5043
|
const meilisearchIndex = config?.meilisearch?.index || typeof process !== "undefined" && process.env?.NEXT_PUBLIC_MEILISEARCH_INDEX || "snowcone";
|
|
5044
5044
|
const headers = {
|
|
5045
5045
|
"Content-Type": "application/json"
|
|
@@ -5065,7 +5065,7 @@ async function listProducts(config) {
|
|
|
5065
5065
|
async function getProduct(idOrSlug, config) {
|
|
5066
5066
|
const f = getFetcher(config);
|
|
5067
5067
|
const meilisearchHost = config?.meilisearch?.host || typeof process !== "undefined" && process.env?.NEXT_PUBLIC_MEILISEARCH_HOST || "https://search.snowcone.app";
|
|
5068
|
-
const meilisearchApiKey = config?.meilisearch?.apiKey || typeof process !== "undefined" && process.env?.NEXT_PUBLIC_MEILISEARCH_API_KEY || "
|
|
5068
|
+
const meilisearchApiKey = config?.meilisearch?.apiKey || typeof process !== "undefined" && process.env?.NEXT_PUBLIC_MEILISEARCH_API_KEY || "73f573ead9be75531c56ee89d104caa49d79154db387f119a013d33eccfe654b";
|
|
5069
5069
|
const meilisearchIndex = config?.meilisearch?.index || typeof process !== "undefined" && process.env?.NEXT_PUBLIC_MEILISEARCH_INDEX || "snowcone";
|
|
5070
5070
|
const headers = {
|
|
5071
5071
|
"Content-Type": "application/json"
|
|
@@ -5089,7 +5089,7 @@ async function getProduct(idOrSlug, config) {
|
|
|
5089
5089
|
async function searchDesigns(query = "", options) {
|
|
5090
5090
|
const f = getFetcher(options);
|
|
5091
5091
|
const meilisearchHost = options?.meilisearch?.host || typeof process !== "undefined" && process.env?.NEXT_PUBLIC_MEILISEARCH_HOST || "https://search.snowcone.app";
|
|
5092
|
-
const meilisearchApiKey = options?.meilisearch?.apiKey || typeof process !== "undefined" && process.env?.NEXT_PUBLIC_MEILISEARCH_API_KEY || "
|
|
5092
|
+
const meilisearchApiKey = options?.meilisearch?.apiKey || typeof process !== "undefined" && process.env?.NEXT_PUBLIC_MEILISEARCH_API_KEY || "73f573ead9be75531c56ee89d104caa49d79154db387f119a013d33eccfe654b";
|
|
5093
5093
|
const designsIndex = options?.meilisearch?.designsIndex || typeof process !== "undefined" && process.env?.NEXT_PUBLIC_MEILISEARCH_DESIGNS_INDEX || "snowcone-designs";
|
|
5094
5094
|
const headers = {
|
|
5095
5095
|
"Content-Type": "application/json"
|
package/dist/server.cjs
CHANGED
|
@@ -20,10 +20,12 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/server.ts
|
|
21
21
|
var server_exports = {};
|
|
22
22
|
__export(server_exports, {
|
|
23
|
+
canonicalForSig: () => canonicalForSig,
|
|
23
24
|
createBgRemoveHandler: () => createBgRemoveHandler,
|
|
24
25
|
createImageSearchHandler: () => createImageSearchHandler,
|
|
25
26
|
createMockupSignHandler: () => createMockupSignHandler,
|
|
26
27
|
createRealtimeGrantHandler: () => createRealtimeGrantHandler,
|
|
28
|
+
signDevSig: () => signDevSig,
|
|
27
29
|
signGrantRequest: () => signGrantRequest,
|
|
28
30
|
signMockupUrl: () => signMockupUrl
|
|
29
31
|
});
|
|
@@ -448,10 +450,12 @@ function createBgRemoveHandler(opts) {
|
|
|
448
450
|
}
|
|
449
451
|
// Annotate the CommonJS export names for ESM import in node:
|
|
450
452
|
0 && (module.exports = {
|
|
453
|
+
canonicalForSig,
|
|
451
454
|
createBgRemoveHandler,
|
|
452
455
|
createImageSearchHandler,
|
|
453
456
|
createMockupSignHandler,
|
|
454
457
|
createRealtimeGrantHandler,
|
|
458
|
+
signDevSig,
|
|
455
459
|
signGrantRequest,
|
|
456
460
|
signMockupUrl
|
|
457
461
|
});
|
package/dist/server.d.cts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { canonicalForSig, signDevSig } from '@snowcone-app/mockup-url';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* `@snowcone-app/sdk/server` — server-only signing helpers + drop-in route
|
|
3
5
|
* handlers for **L3 (signed-URL) shops**.
|
|
@@ -32,6 +34,7 @@
|
|
|
32
34
|
* "remove background" button (your shop-scoped `ai:bg-remove` key stays
|
|
33
35
|
* server-side).
|
|
34
36
|
*/
|
|
37
|
+
|
|
35
38
|
/**
|
|
36
39
|
* Append the L3 `&signature` to a built mockup URL (HMAC over the canonical,
|
|
37
40
|
* host-independent form). Idempotent — an already-signed URL is returned as-is.
|
package/dist/server.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { canonicalForSig, signDevSig } from '@snowcone-app/mockup-url';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* `@snowcone-app/sdk/server` — server-only signing helpers + drop-in route
|
|
3
5
|
* handlers for **L3 (signed-URL) shops**.
|
|
@@ -32,6 +34,7 @@
|
|
|
32
34
|
* "remove background" button (your shop-scoped `ai:bg-remove` key stays
|
|
33
35
|
* server-side).
|
|
34
36
|
*/
|
|
37
|
+
|
|
35
38
|
/**
|
|
36
39
|
* Append the L3 `&signature` to a built mockup URL (HMAC over the canonical,
|
|
37
40
|
* host-independent form). Idempotent — an already-signed URL is returned as-is.
|
package/dist/server.js
CHANGED
|
@@ -316,10 +316,12 @@ function createBgRemoveHandler(opts) {
|
|
|
316
316
|
};
|
|
317
317
|
}
|
|
318
318
|
export {
|
|
319
|
+
canonicalForSig,
|
|
319
320
|
createBgRemoveHandler,
|
|
320
321
|
createImageSearchHandler,
|
|
321
322
|
createMockupSignHandler,
|
|
322
323
|
createRealtimeGrantHandler,
|
|
324
|
+
signDevSig,
|
|
323
325
|
signGrantRequest,
|
|
324
326
|
signMockupUrl
|
|
325
327
|
};
|