@degallery/node 0.1.0
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/README.md +11 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/lib/node.d.ts +8 -0
- package/dist/lib/node.d.ts.map +1 -0
- package/dist/lib/node.js +11 -0
- package/package.json +24 -0
package/README.md
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/lib/node.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,wBAAgB,mBAAmB,CACjC,KAAK,EAAE;IACL,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB,EACD,MAAM,EAAE,MAAM,UAIf"}
|
package/dist/lib/node.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GalleryClient = void 0;
|
|
4
|
+
exports.createDeliveryToken = createDeliveryToken;
|
|
5
|
+
const node_crypto_1 = require("node:crypto");
|
|
6
|
+
var sdk_1 = require("@thegallery/sdk");
|
|
7
|
+
Object.defineProperty(exports, "GalleryClient", { enumerable: true, get: function () { return sdk_1.GalleryClient; } });
|
|
8
|
+
function createDeliveryToken(input, secret) {
|
|
9
|
+
const payload = Buffer.from(JSON.stringify(input)).toString('base64url');
|
|
10
|
+
return `${payload}.${(0, node_crypto_1.createHmac)('sha256', secret).update(payload).digest('base64url')}`;
|
|
11
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@degallery/node",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"main": "./dist/index.js",
|
|
5
|
+
"module": "./dist/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
"./package.json": "./package.json",
|
|
9
|
+
".": {
|
|
10
|
+
"@degallery/source": "./src/index.ts",
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"default": "./dist/index.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"!**/*.tsbuildinfo"
|
|
19
|
+
],
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"tslib": "^2.3.0",
|
|
22
|
+
"@degallery/sdk": "0.1.0"
|
|
23
|
+
}
|
|
24
|
+
}
|