@sphereon/ssi-sdk.issuance-branding 0.32.1-next.54 → 0.33.1-feature.vcdm2.4
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.
|
@@ -1,23 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.IssuanceBranding = exports.issuanceBrandingMethods = void 0;
|
|
16
|
-
const ssi_sdk_core_1 = require("@sphereon/ssi-sdk.core");
|
|
17
|
-
const index_1 = require("../index");
|
|
18
|
-
const debug_1 = __importDefault(require("debug"));
|
|
19
|
-
const debug = (0, debug_1.default)('sphereon:ssi-sdk:issuance-branding');
|
|
20
|
-
exports.issuanceBrandingMethods = [
|
|
1
|
+
import { downloadImage, getImageDimensions, getImageMediaType } from '@sphereon/ssi-sdk.core';
|
|
2
|
+
import { schema } from '../index';
|
|
3
|
+
import Debug from 'debug';
|
|
4
|
+
const debug = Debug('sphereon:ssi-sdk:issuance-branding');
|
|
5
|
+
export const issuanceBrandingMethods = [
|
|
21
6
|
'ibAddCredentialBranding',
|
|
22
7
|
'ibGetCredentialBranding',
|
|
23
8
|
'ibUpdateCredentialBranding',
|
|
@@ -45,244 +30,238 @@ const EMPTY_IMAGE_ATTRIBUTES = {
|
|
|
45
30
|
/**
|
|
46
31
|
* {@inheritDoc IIssuanceBranding}
|
|
47
32
|
*/
|
|
48
|
-
class IssuanceBranding {
|
|
33
|
+
export class IssuanceBranding {
|
|
34
|
+
schema = schema.IIssuanceBranding;
|
|
35
|
+
methods = {
|
|
36
|
+
ibAddCredentialBranding: this.ibAddCredentialBranding.bind(this),
|
|
37
|
+
ibGetCredentialBranding: this.ibGetCredentialBranding.bind(this),
|
|
38
|
+
ibUpdateCredentialBranding: this.ibUpdateCredentialBranding.bind(this),
|
|
39
|
+
ibRemoveCredentialBranding: this.ibRemoveCredentialBranding.bind(this),
|
|
40
|
+
ibAddCredentialLocaleBranding: this.ibAddCredentialLocaleBranding.bind(this),
|
|
41
|
+
ibGetCredentialLocaleBranding: this.ibGetCredentialLocaleBranding.bind(this),
|
|
42
|
+
ibRemoveCredentialLocaleBranding: this.ibRemoveCredentialLocaleBranding.bind(this),
|
|
43
|
+
ibUpdateCredentialLocaleBranding: this.ibUpdateCredentialLocaleBranding.bind(this),
|
|
44
|
+
ibCredentialLocaleBrandingFrom: this.ibCredentialLocaleBrandingFrom.bind(this),
|
|
45
|
+
ibAddIssuerBranding: this.ibAddIssuerBranding.bind(this),
|
|
46
|
+
ibGetIssuerBranding: this.ibGetIssuerBranding.bind(this),
|
|
47
|
+
ibUpdateIssuerBranding: this.ibUpdateIssuerBranding.bind(this),
|
|
48
|
+
ibRemoveIssuerBranding: this.inRemoveIssuerBranding.bind(this),
|
|
49
|
+
ibAddIssuerLocaleBranding: this.ibAddIssuerLocaleBranding.bind(this),
|
|
50
|
+
ibGetIssuerLocaleBranding: this.ibAGetIssuerLocaleBranding.bind(this),
|
|
51
|
+
ibRemoveIssuerLocaleBranding: this.ibRemoveIssuerLocaleBranding.bind(this),
|
|
52
|
+
ibUpdateIssuerLocaleBranding: this.ibUpdateIssuerLocaleBranding.bind(this),
|
|
53
|
+
ibIssuerLocaleBrandingFrom: this.ibIssuerLocaleBrandingFrom.bind(this),
|
|
54
|
+
};
|
|
55
|
+
store;
|
|
49
56
|
constructor(options) {
|
|
50
|
-
this.schema = index_1.schema.IIssuanceBranding;
|
|
51
|
-
this.methods = {
|
|
52
|
-
ibAddCredentialBranding: this.ibAddCredentialBranding.bind(this),
|
|
53
|
-
ibGetCredentialBranding: this.ibGetCredentialBranding.bind(this),
|
|
54
|
-
ibUpdateCredentialBranding: this.ibUpdateCredentialBranding.bind(this),
|
|
55
|
-
ibRemoveCredentialBranding: this.ibRemoveCredentialBranding.bind(this),
|
|
56
|
-
ibAddCredentialLocaleBranding: this.ibAddCredentialLocaleBranding.bind(this),
|
|
57
|
-
ibGetCredentialLocaleBranding: this.ibGetCredentialLocaleBranding.bind(this),
|
|
58
|
-
ibRemoveCredentialLocaleBranding: this.ibRemoveCredentialLocaleBranding.bind(this),
|
|
59
|
-
ibUpdateCredentialLocaleBranding: this.ibUpdateCredentialLocaleBranding.bind(this),
|
|
60
|
-
ibCredentialLocaleBrandingFrom: this.ibCredentialLocaleBrandingFrom.bind(this),
|
|
61
|
-
ibAddIssuerBranding: this.ibAddIssuerBranding.bind(this),
|
|
62
|
-
ibGetIssuerBranding: this.ibGetIssuerBranding.bind(this),
|
|
63
|
-
ibUpdateIssuerBranding: this.ibUpdateIssuerBranding.bind(this),
|
|
64
|
-
ibRemoveIssuerBranding: this.inRemoveIssuerBranding.bind(this),
|
|
65
|
-
ibAddIssuerLocaleBranding: this.ibAddIssuerLocaleBranding.bind(this),
|
|
66
|
-
ibGetIssuerLocaleBranding: this.ibAGetIssuerLocaleBranding.bind(this),
|
|
67
|
-
ibRemoveIssuerLocaleBranding: this.ibRemoveIssuerLocaleBranding.bind(this),
|
|
68
|
-
ibUpdateIssuerLocaleBranding: this.ibUpdateIssuerLocaleBranding.bind(this),
|
|
69
|
-
ibIssuerLocaleBrandingFrom: this.ibIssuerLocaleBrandingFrom.bind(this),
|
|
70
|
-
};
|
|
71
57
|
this.store = options.store;
|
|
72
58
|
}
|
|
73
59
|
/** {@inheritDoc IIssuanceBranding.ibAddCredentialBranding} */
|
|
74
|
-
ibAddCredentialBranding(args, context) {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
60
|
+
async ibAddCredentialBranding(args, context) {
|
|
61
|
+
const localeBranding = await Promise.all(args.localeBranding.map((localeBranding) => this.setAdditionalImageAttributes(localeBranding)));
|
|
62
|
+
const credentialBranding = {
|
|
63
|
+
...args,
|
|
64
|
+
localeBranding,
|
|
65
|
+
};
|
|
66
|
+
debug('Adding credential branding', credentialBranding);
|
|
67
|
+
return this.store.addCredentialBranding(credentialBranding);
|
|
81
68
|
}
|
|
82
69
|
/** {@inheritDoc IIssuanceBranding.ibGetCredentialBranding} */
|
|
83
|
-
ibGetCredentialBranding(args) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
return this.store.getCredentialBranding(args);
|
|
87
|
-
});
|
|
70
|
+
async ibGetCredentialBranding(args) {
|
|
71
|
+
debug('Getting credential branding', args);
|
|
72
|
+
return this.store.getCredentialBranding(args);
|
|
88
73
|
}
|
|
89
74
|
/** {@inheritDoc IIssuanceBranding.ibUpdateCredentialBranding} */
|
|
90
|
-
ibUpdateCredentialBranding(args, context) {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
return this.store.updateCredentialBranding(args);
|
|
94
|
-
});
|
|
75
|
+
async ibUpdateCredentialBranding(args, context) {
|
|
76
|
+
debug('Updating credential branding', args);
|
|
77
|
+
return this.store.updateCredentialBranding(args);
|
|
95
78
|
}
|
|
96
79
|
/** {@inheritDoc IIssuanceBranding.ibRemoveCredentialBranding} */
|
|
97
|
-
ibRemoveCredentialBranding(args, context) {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
.catch((error) => ({ result: false, error: error.message }));
|
|
104
|
-
});
|
|
80
|
+
async ibRemoveCredentialBranding(args, context) {
|
|
81
|
+
debug('Removing credential branding', args);
|
|
82
|
+
return this.store
|
|
83
|
+
.removeCredentialBranding(args)
|
|
84
|
+
.then(() => ({ result: true }))
|
|
85
|
+
.catch((error) => ({ result: false, error: error.message }));
|
|
105
86
|
}
|
|
106
87
|
/** {@inheritDoc IIssuanceBranding.ibAddCredentialLocaleBranding} */
|
|
107
|
-
ibAddCredentialLocaleBranding(args, context) {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
88
|
+
async ibAddCredentialLocaleBranding(args, context) {
|
|
89
|
+
const localeBranding = await Promise.all(args.localeBranding.map((localeBranding) => this.setAdditionalImageAttributes(localeBranding)));
|
|
90
|
+
const addCredentialLocaleBrandingArgs = {
|
|
91
|
+
...args,
|
|
92
|
+
localeBranding,
|
|
93
|
+
};
|
|
94
|
+
debug('Adding credential locale branding', addCredentialLocaleBrandingArgs);
|
|
95
|
+
return this.store.addCredentialLocaleBranding(addCredentialLocaleBrandingArgs);
|
|
114
96
|
}
|
|
115
97
|
/** {@inheritDoc IIssuanceBranding.ibGetCredentialLocaleBranding} */
|
|
116
|
-
ibGetCredentialLocaleBranding(args) {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
return this.store.getCredentialLocaleBranding(args);
|
|
120
|
-
});
|
|
98
|
+
async ibGetCredentialLocaleBranding(args) {
|
|
99
|
+
debug('Getting credential locale branding', args);
|
|
100
|
+
return this.store.getCredentialLocaleBranding(args);
|
|
121
101
|
}
|
|
122
102
|
/** {@inheritDoc IIssuanceBranding.ibRemoveCredentialLocaleBranding} */
|
|
123
|
-
ibRemoveCredentialLocaleBranding(args, context) {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
.catch((error) => ({ result: false, error: error.message }));
|
|
130
|
-
});
|
|
103
|
+
async ibRemoveCredentialLocaleBranding(args, context) {
|
|
104
|
+
debug('Removing credential locale branding', args);
|
|
105
|
+
return this.store
|
|
106
|
+
.removeCredentialLocaleBranding(args)
|
|
107
|
+
.then(() => ({ result: true }))
|
|
108
|
+
.catch((error) => ({ result: false, error: error.message }));
|
|
131
109
|
}
|
|
132
110
|
/** {@inheritDoc IIssuanceBranding.ibUpdateCredentialLocaleBranding} */
|
|
133
|
-
ibUpdateCredentialLocaleBranding(args, context) {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
111
|
+
async ibUpdateCredentialLocaleBranding(args, context) {
|
|
112
|
+
const localeBranding = (await this.setAdditionalImageAttributes(args.localeBranding));
|
|
113
|
+
const updateCredentialLocaleBrandingArgs = {
|
|
114
|
+
...args,
|
|
115
|
+
localeBranding,
|
|
116
|
+
};
|
|
117
|
+
debug('Updating credential locale branding', updateCredentialLocaleBrandingArgs);
|
|
118
|
+
return this.store.updateCredentialLocaleBranding(updateCredentialLocaleBrandingArgs);
|
|
140
119
|
}
|
|
141
120
|
/** {@inheritDoc IIssuanceBranding.ibCredentialLocaleBrandingFrom} */
|
|
142
|
-
ibCredentialLocaleBrandingFrom(args, context) {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
return this.setAdditionalImageAttributes(args.localeBranding);
|
|
146
|
-
});
|
|
121
|
+
async ibCredentialLocaleBrandingFrom(args, context) {
|
|
122
|
+
debug('get credential locale branding from', args);
|
|
123
|
+
return this.setAdditionalImageAttributes(args.localeBranding);
|
|
147
124
|
}
|
|
148
125
|
/** {@inheritDoc IIssuanceBranding.ibAddIssuerBranding} */
|
|
149
|
-
ibAddIssuerBranding(args, context) {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
126
|
+
async ibAddIssuerBranding(args, context) {
|
|
127
|
+
const localeBranding = await Promise.all(args.localeBranding.map((localeBranding) => this.setAdditionalImageAttributes(localeBranding)));
|
|
128
|
+
const issuerBranding = {
|
|
129
|
+
...args,
|
|
130
|
+
localeBranding,
|
|
131
|
+
};
|
|
132
|
+
debug('Adding issuer branding', issuerBranding);
|
|
133
|
+
return this.store.addIssuerBranding(issuerBranding);
|
|
156
134
|
}
|
|
157
135
|
/** {@inheritDoc IIssuanceBranding.ibGetIssuerBranding} */
|
|
158
|
-
ibGetIssuerBranding(args) {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
return this.store.getIssuerBranding(args);
|
|
162
|
-
});
|
|
136
|
+
async ibGetIssuerBranding(args) {
|
|
137
|
+
debug('Getting issuer branding', args);
|
|
138
|
+
return this.store.getIssuerBranding(args);
|
|
163
139
|
}
|
|
164
140
|
/** {@inheritDoc IIssuanceBranding.ibUpdateIssuerBranding} */
|
|
165
|
-
ibUpdateIssuerBranding(args, context) {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
return this.store.updateIssuerBranding(args);
|
|
169
|
-
});
|
|
141
|
+
async ibUpdateIssuerBranding(args, context) {
|
|
142
|
+
debug('Updating issuer branding', args);
|
|
143
|
+
return this.store.updateIssuerBranding(args);
|
|
170
144
|
}
|
|
171
145
|
/** {@inheritDoc IIssuanceBranding.inRemoveIssuerBranding} */
|
|
172
|
-
inRemoveIssuerBranding(args, context) {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
.catch((error) => ({ result: false, error: error.message }));
|
|
179
|
-
});
|
|
146
|
+
async inRemoveIssuerBranding(args, context) {
|
|
147
|
+
debug('Removing issuer branding', args);
|
|
148
|
+
return this.store
|
|
149
|
+
.removeIssuerBranding(args)
|
|
150
|
+
.then(() => ({ result: true }))
|
|
151
|
+
.catch((error) => ({ result: false, error: error.message }));
|
|
180
152
|
}
|
|
181
153
|
/** {@inheritDoc IIssuanceBranding.ibAddIssuerLocaleBranding} */
|
|
182
|
-
ibAddIssuerLocaleBranding(args, context) {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
154
|
+
async ibAddIssuerLocaleBranding(args, context) {
|
|
155
|
+
const localeBranding = await Promise.all(args.localeBranding.map((localeBranding) => this.setAdditionalImageAttributes(localeBranding)));
|
|
156
|
+
const addIssuerLocaleBrandingArgs = {
|
|
157
|
+
...args,
|
|
158
|
+
localeBranding,
|
|
159
|
+
};
|
|
160
|
+
debug('Adding issuer locale branding', addIssuerLocaleBrandingArgs);
|
|
161
|
+
return this.store.addIssuerLocaleBranding(addIssuerLocaleBrandingArgs);
|
|
189
162
|
}
|
|
190
163
|
/** {@inheritDoc IIssuanceBranding.ibAGetIssuerLocaleBranding} */
|
|
191
|
-
ibAGetIssuerLocaleBranding(args) {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
return this.store.getIssuerLocaleBranding(args);
|
|
195
|
-
});
|
|
164
|
+
async ibAGetIssuerLocaleBranding(args) {
|
|
165
|
+
debug('Getting issuer locale branding', args);
|
|
166
|
+
return this.store.getIssuerLocaleBranding(args);
|
|
196
167
|
}
|
|
197
168
|
/** {@inheritDoc IIssuanceBranding.ibRemoveIssuerLocaleBranding} */
|
|
198
|
-
ibRemoveIssuerLocaleBranding(args, context) {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
.catch((error) => ({ result: false, error: error.message }));
|
|
205
|
-
});
|
|
169
|
+
async ibRemoveIssuerLocaleBranding(args, context) {
|
|
170
|
+
debug('Removing issuer locale branding', args);
|
|
171
|
+
return this.store
|
|
172
|
+
.removeIssuerLocaleBranding(args)
|
|
173
|
+
.then(() => ({ result: true }))
|
|
174
|
+
.catch((error) => ({ result: false, error: error.message }));
|
|
206
175
|
}
|
|
207
176
|
/** {@inheritDoc IIssuanceBranding.ibUpdateIssuerLocaleBranding} */
|
|
208
|
-
ibUpdateIssuerLocaleBranding(args, context) {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
177
|
+
async ibUpdateIssuerLocaleBranding(args, context) {
|
|
178
|
+
const localeBranding = (await this.setAdditionalImageAttributes(args.localeBranding));
|
|
179
|
+
const updateIssuerLocaleBrandingArgs = {
|
|
180
|
+
...args,
|
|
181
|
+
localeBranding,
|
|
182
|
+
};
|
|
183
|
+
debug('Updating issuer locale branding', updateIssuerLocaleBrandingArgs);
|
|
184
|
+
return this.store.updateIssuerLocaleBranding(updateIssuerLocaleBrandingArgs);
|
|
215
185
|
}
|
|
216
186
|
/** {@inheritDoc IIssuanceBranding.ibIssuerLocaleBrandingFrom} */
|
|
217
|
-
ibIssuerLocaleBrandingFrom(args, context) {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
return this.setAdditionalImageAttributes(args.localeBranding);
|
|
221
|
-
});
|
|
187
|
+
async ibIssuerLocaleBrandingFrom(args, context) {
|
|
188
|
+
debug('get issuer locale branding from', args);
|
|
189
|
+
return this.setAdditionalImageAttributes(args.localeBranding);
|
|
222
190
|
}
|
|
223
191
|
// todo: We really should add a cache for urls. We now fetch the same images multiple times in case the logo/background image is the same for multiple locales.
|
|
224
|
-
setAdditionalImageAttributes(localeBranding) {
|
|
225
|
-
return
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
192
|
+
async setAdditionalImageAttributes(localeBranding) {
|
|
193
|
+
return {
|
|
194
|
+
...localeBranding,
|
|
195
|
+
...(localeBranding.logo && {
|
|
196
|
+
logo: {
|
|
197
|
+
...localeBranding.logo,
|
|
198
|
+
...(localeBranding.logo.uri
|
|
199
|
+
? {
|
|
200
|
+
...(await this.getAdditionalImageAttributes(localeBranding.logo)),
|
|
201
|
+
}
|
|
202
|
+
: EMPTY_IMAGE_ATTRIBUTES),
|
|
203
|
+
},
|
|
204
|
+
}),
|
|
205
|
+
...(localeBranding.background && {
|
|
206
|
+
background: {
|
|
207
|
+
...localeBranding.background,
|
|
208
|
+
...(localeBranding.background.image && {
|
|
209
|
+
image: {
|
|
210
|
+
...localeBranding.background.image,
|
|
211
|
+
...(localeBranding.background.image.uri
|
|
212
|
+
? {
|
|
213
|
+
...(await this.getAdditionalImageAttributes(localeBranding.background.image)),
|
|
214
|
+
}
|
|
215
|
+
: EMPTY_IMAGE_ATTRIBUTES),
|
|
216
|
+
},
|
|
217
|
+
}),
|
|
218
|
+
},
|
|
219
|
+
}),
|
|
220
|
+
};
|
|
236
221
|
}
|
|
237
|
-
getAdditionalImageAttributes(image) {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
const dimensions = (_a = image.dimensions) !== null && _a !== void 0 ? _a : (yield (0, ssi_sdk_core_1.getImageDimensions)(base64Content));
|
|
249
|
-
const mediaType = (_b = image.mediaType) !== null && _b !== void 0 ? _b : (yield this.getDataTypeFromDataURI(image.uri));
|
|
250
|
-
return {
|
|
251
|
-
mediaType,
|
|
252
|
-
dimensions,
|
|
253
|
-
};
|
|
254
|
-
}
|
|
255
|
-
debug('Setting additional image properties for url', image.uri);
|
|
256
|
-
const resource = !image.dataUri ? yield (0, ssi_sdk_core_1.downloadImage)(image.uri) : undefined;
|
|
257
|
-
const dimensions = (_c = image.dimensions) !== null && _c !== void 0 ? _c : (yield (0, ssi_sdk_core_1.getImageDimensions)((_d = resource === null || resource === void 0 ? void 0 : resource.base64Content) !== null && _d !== void 0 ? _d : (yield this.extractBase64FromDataURI(image.dataUri))));
|
|
258
|
-
const mediaType = (_f = (_e = image.mediaType) !== null && _e !== void 0 ? _e : resource === null || resource === void 0 ? void 0 : resource.contentType) !== null && _f !== void 0 ? _f : ((resource === null || resource === void 0 ? void 0 : resource.base64Content) ? yield (0, ssi_sdk_core_1.getImageMediaType)(resource === null || resource === void 0 ? void 0 : resource.base64Content) : yield this.getDataTypeFromDataURI(image.uri));
|
|
222
|
+
async getAdditionalImageAttributes(image) {
|
|
223
|
+
if (!image.uri) {
|
|
224
|
+
debug(`No image URI present, returning empty attributes`);
|
|
225
|
+
return EMPTY_IMAGE_ATTRIBUTES;
|
|
226
|
+
}
|
|
227
|
+
const data_uri_regex = /^data:image\/[^;]+;base64,/;
|
|
228
|
+
if (data_uri_regex.test(image.uri)) {
|
|
229
|
+
debug('Setting additional image properties for uri', image.uri);
|
|
230
|
+
const base64Content = await this.extractBase64FromDataURI(image.uri);
|
|
231
|
+
const dimensions = image.dimensions ?? (await getImageDimensions(base64Content));
|
|
232
|
+
const mediaType = image.mediaType ?? (await this.getDataTypeFromDataURI(image.uri));
|
|
259
233
|
return {
|
|
260
234
|
mediaType,
|
|
261
|
-
dataUri: (_g = image.dataUri) !== null && _g !== void 0 ? _g : `data:${mediaType};base64,${resource.base64Content}`,
|
|
262
235
|
dimensions,
|
|
263
236
|
};
|
|
264
|
-
}
|
|
237
|
+
}
|
|
238
|
+
debug('Setting additional image properties for url', image.uri);
|
|
239
|
+
const resource = !image.dataUri ? await downloadImage(image.uri) : undefined;
|
|
240
|
+
const dimensions = image.dimensions ?? (await getImageDimensions(resource?.base64Content ?? (await this.extractBase64FromDataURI(image.dataUri))));
|
|
241
|
+
const mediaType = image.mediaType ??
|
|
242
|
+
resource?.contentType ??
|
|
243
|
+
(resource?.base64Content ? await getImageMediaType(resource?.base64Content) : await this.getDataTypeFromDataURI(image.uri));
|
|
244
|
+
return {
|
|
245
|
+
mediaType,
|
|
246
|
+
dataUri: image.dataUri ?? `data:${mediaType};base64,${resource.base64Content}`,
|
|
247
|
+
dimensions,
|
|
248
|
+
};
|
|
265
249
|
}
|
|
266
|
-
extractBase64FromDataURI(uri) {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
return matches[1];
|
|
274
|
-
});
|
|
250
|
+
async extractBase64FromDataURI(uri) {
|
|
251
|
+
const data_uri_base64_regex = /^data:[^;]+;base64,([\w+/=-]+)$/i;
|
|
252
|
+
const matches = uri.match(data_uri_base64_regex);
|
|
253
|
+
if (!matches || matches.length <= 1) {
|
|
254
|
+
return Promise.reject(Error('invalid base64 uri'));
|
|
255
|
+
}
|
|
256
|
+
return matches[1];
|
|
275
257
|
}
|
|
276
|
-
getDataTypeFromDataURI(uri) {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
return matches[1];
|
|
284
|
-
});
|
|
258
|
+
async getDataTypeFromDataURI(uri) {
|
|
259
|
+
const data_uri_data_type_regex = /^data:([^;]+);base64,([\w+/=-]+)$/i;
|
|
260
|
+
const matches = uri.match(data_uri_data_type_regex);
|
|
261
|
+
if (!matches || matches.length <= 1) {
|
|
262
|
+
return Promise.reject(Error('invalid base64 uri'));
|
|
263
|
+
}
|
|
264
|
+
return matches[1];
|
|
285
265
|
}
|
|
286
266
|
}
|
|
287
|
-
exports.IssuanceBranding = IssuanceBranding;
|
|
288
267
|
//# sourceMappingURL=IssuanceBranding.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IssuanceBranding.js","sourceRoot":"","sources":["../../src/agent/IssuanceBranding.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IssuanceBranding.js","sourceRoot":"","sources":["../../src/agent/IssuanceBranding.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,iBAAiB,EAAoC,MAAM,wBAAwB,CAAA;AAkB/H,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAqBjC,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,KAAK,GAAmB,KAAK,CAAC,oCAAoC,CAAC,CAAA;AAEzE,MAAM,CAAC,MAAM,uBAAuB,GAAkB;IACpD,yBAAyB;IACzB,yBAAyB;IACzB,4BAA4B;IAC5B,4BAA4B;IAC5B,+BAA+B;IAC/B,+BAA+B;IAC/B,kCAAkC;IAClC,kCAAkC;IAClC,gCAAgC;IAChC,qBAAqB;IACrB,qBAAqB;IACrB,wBAAwB;IACxB,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AW;QAChD,MAAM,qBAAqB,GAAW,kCAAkC,CAAA;QACxE,MAAM,OAAO,GAA4B,GAAG,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAA;QAEzE,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;YACpC,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,CAAA;QACpD,CAAC;QAED,OAAO,OAAO,CAAC,CAAC,CAAC,CAAA;IACnB,CAAC;IAEO,KAAK,CAAC,sBAAsB,CAAC,GAAW;QAC9C,MAAM,wBAAwB,GAAW,oCAAoC,CAAA;QAC7E,MAAM,OAAO,GAA4B,GAAG,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAA;QAE5E,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;YACpC,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,CAAA;QACpD,CAAC;QAED,OAAO,OAAO,CAAC,CAAC,CAAC,CAAA;IACnB,CAAC;CACF"}
|
package/dist/index.js
CHANGED
|
@@ -1,27 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.issuanceBrandingMethods = exports.IssuanceBranding = exports.schema = void 0;
|
|
18
1
|
/**
|
|
19
2
|
* @public
|
|
20
3
|
*/
|
|
21
4
|
const schema = require('../plugin.schema.json');
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
Object.defineProperty(exports, "issuanceBrandingMethods", { enumerable: true, get: function () { return IssuanceBranding_1.issuanceBrandingMethods; } });
|
|
26
|
-
__exportStar(require("./types/IIssuanceBranding"), exports);
|
|
5
|
+
export { schema };
|
|
6
|
+
export { IssuanceBranding, issuanceBrandingMethods } from './agent/IssuanceBranding';
|
|
7
|
+
export * from './types/IIssuanceBranding';
|
|
27
8
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAA;AAC/C,OAAO,EAAE,MAAM,EAAE,CAAA;AACjB,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AACpF,cAAc,2BAA2B,CAAA"}
|
package/dist/tsdoc-metadata.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ssi-sdk.issuance-branding",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.1-feature.vcdm2.4+9f634bdb",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
"generate-plugin-schema": "ts-node ../../packages/dev/bin/sphereon.js dev generate-plugin-schema"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@sphereon/ssi-sdk.core": "0.
|
|
19
|
-
"@sphereon/ssi-sdk.data-store": "0.
|
|
18
|
+
"@sphereon/ssi-sdk.core": "0.33.1-feature.vcdm2.4+9f634bdb",
|
|
19
|
+
"@sphereon/ssi-sdk.data-store": "0.33.1-feature.vcdm2.4+9f634bdb",
|
|
20
20
|
"debug": "^4.3.5",
|
|
21
|
-
"typeorm": "^0.3.
|
|
21
|
+
"typeorm": "^0.3.21"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@sphereon/ssi-sdk.agent-config": "0.
|
|
24
|
+
"@sphereon/ssi-sdk.agent-config": "0.33.1-feature.vcdm2.4+9f634bdb",
|
|
25
25
|
"@veramo/remote-client": "4.2.0",
|
|
26
26
|
"@veramo/remote-server": "4.2.0"
|
|
27
27
|
},
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"SSI"
|
|
51
51
|
],
|
|
52
52
|
"nx": {},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "9f634bdb714061141e277508c124b08d626f6036"
|
|
54
54
|
}
|